FeatherThread.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
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef FEATHERTHREAD_H_
00028 #define FEATHERTHREAD_H_
00029
00030 #include <QThread>
00031 #include <QMap>
00032 #include <guitools/Feather/FeatheredData.h>
00033 #include <guitools/Feather/FeatherDataType.h>
00034
00035 namespace casa {
00036
00037 class Feather;
00038 template <class T> class ImageInterface;
00039
00045 class FeatherThread : public QThread {
00046
00047 friend class FeatherManager;
00048
00049
00050 public:
00055 ImageInterface<float>* makeConvolvedImage(ImageInterface<float>* firstImage, ImageInterface<float>* secondImage );
00056 FeatherThread();
00057 enum DataTypes { SD_WEIGHT, INT_WEIGHT, SD_CUT, INT_CUT, DIRTY_CUT,
00058 SD_ORIGINAL, INT_ORIGINAL, INT_CONVOLVED_LOW, INT_CONVOLVED_LOW_WEIGHTED,
00059 DIRTY_ORIGINAL, DIRTY_CONVOLVED_LOW, DIRTY_CONVOLVED_LOW_WEIGHTED, LOW_CONVOLVED_HIGH,
00060 LOW_CONVOLVED_HIGH_WEIGHTED, END_DATA };
00061 void setImages(ImageInterface<float>* lowImage, ImageInterface<float>* highImage, ImageInterface<float>* dirtyImage );
00062 void setFeatherWorker( Feather* worker );
00063 static void setLogger( LogIO* logger );
00064 void setRadial( bool radialPlot );
00065 bool isSuccess() const;
00066 QString getErrorMessage() const;
00067 void setSaveOutput( bool save, const QString& outputPath = "");
00068 void run();
00069 ~FeatherThread();
00070
00071 private:
00072 FeatherThread( const FeatherThread& other );
00073 FeatherThread operator=( const FeatherThread& other );
00074 bool collectLowHighData();
00075 bool collectLowDirtyData();
00076 static ImageInterface<float>* addMissingAxes( ImageInterface<float>* firstImage );
00077 bool collectConvolvedData( DataTypes original, DataTypes cut);
00078 bool setWorkerImages( ImageInterface<float>* imageLow, ImageInterface<float>* imageHigh );
00079 Feather* featherWorker;
00080 static LogIO* logger;
00081 ImageInterface<float>* lowImage;
00082 ImageInterface<float>* highImage;
00083 ImageInterface<float>* dirtyImage;
00084
00085
00086 QMap<DataTypes, FeatheredData> dataMap;
00087
00088 bool radial;
00089 bool saveOutput;
00090 bool fileSaved;
00091 bool success;
00092 QString saveFilePath;
00093 QString errorMessage;
00094 };
00095
00096
00097 }
00098 #endif