kstars
fitsprocess.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef FITSPROCESS_H
00019 #define FITSPROCESS_H
00020
00021 #include <qptrlist.h>
00022 #include <qstringlist.h>
00023 #include <kcommand.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class FITSViewer;
00034 class QImage;
00035
00036 class FITSProcess
00037 {
00038 public:
00039 FITSProcess(FITSViewer *parent, QStringList darkFiles, QStringList flatFiles, QStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode);
00040 ~FITSProcess();
00041
00042 QPtrList<float> darkFrames;
00043 QPtrList<float> flatFrames;
00044 QPtrList<float> darkflatFrames;
00045 FITSViewer *viewer;
00046
00047 int npix;
00048 int darkCombineMode;
00049 int flatCombineMode;
00050 int darkflatCombineMode;
00051 float *finalDark;
00052 float *finalFlat;
00053 float *finalDarkFlat;
00054
00055 float * combine(QPtrList<float> & frames, int mode);
00056 void subtract(float * img1, float * img2);
00057 void divide(float * img1, float * img2);
00058 void reduce();
00059 void normalize(float *buf);
00060 float quick_select(float * arr, int n);
00061 float average(float * array, int n);
00062 float min(float *buf);
00063
00064 };
00065
00066 class FITSProcessCommand : public KCommand
00067 {
00068 public:
00069
00070 FITSProcessCommand(FITSViewer *parent);
00071 ~FITSProcessCommand();
00072
00073 void execute();
00074 void unexecute();
00075 QString name() const;
00076
00077 private:
00078 FITSViewer *viewer;
00079 float * buffer;
00080 QImage *oldImage;
00081
00082 };
00083
00084 #endif