FeatherThread.h

Go to the documentation of this file.
00001 //# Copyright (C) 2005
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
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, /*LOW_CONVOLVED_DIRTY, LOW_CONVOLVED_DIRTY_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 } /* namespace casa */
00098 #endif /* FEATHERTHREAD_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1