Gaussian2DFitter.h

Go to the documentation of this file.
00001 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
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 #ifndef GAUSSIAN2DFITTER_H_
00027 #define GAUSSIAN2DFITTER_H_
00028 
00029 #include <casa/aipstype.h>
00030 #include <casa/BasicSL/String.h>
00031 #include <display/Fit/ComponentListWrapper.h>
00032 #include <QString>
00033 #include <QThread>
00034 
00035 namespace casa {
00036 
00037         template <class T> class ImageInterface;
00038 
00043         class Gaussian2DFitter : public QThread {
00044         public:
00045                 Gaussian2DFitter();
00046                 void run();
00047                 bool isFitSuccessful() const;
00048                 void setFitParameters( SHARED_PTR<const ImageInterface<Float> > image, const String& box,
00049                                        int channelNum, const String& estimatesFileName, const String& residualImageFile,
00050                                        const Vector<Float>& includeVector, const Vector<Float>& excludeVector);
00051                 QString getErrorMessage() const;
00052                 QString getLogFilePath() const;
00053                 void setWriteLogFile( bool write );
00054                 QString getResidualImagePath() const;
00055                 void setFilePath( String path );
00056                 bool writeRegionFile() const;
00057                 QList<RegionShape*> toDrawingDisplay( const SHARED_PTR<const ImageInterface<Float> > image, const QString& colorName) const;
00058                 virtual ~Gaussian2DFitter();
00059 
00060         private:
00061                 Gaussian2DFitter( const Gaussian2DFitter& other );
00062                 Gaussian2DFitter operator=( const Gaussian2DFitter& other );
00063                 QString errorMsg;
00064                 bool successfulFit;
00065                 bool logFile;
00066                 ComponentListWrapper fitResultList;
00067         SHARED_PTR<const ImageInterface<Float> > image;
00068                 SHARED_PTR<std::pair<Float, Float> > includePixs;
00069                 SHARED_PTR<std::pair<Float, Float> > excludePixs;
00070                 String pixelBox;
00071                 String filePath;
00072                 int channelNumber;
00073                 String estimateFile;
00074                 String residualImageFile;
00075                 const QString LOG_SUFFIX;
00076                 const QString REGION_SUFFIX;
00077         };
00078 
00079 } /* namespace casa */
00080 #endif /* GAUSSIAN2DFITTER_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1