casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Gaussian2DFitter.h
Go to the documentation of this file.
1 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef GAUSSIAN2DFITTER_H_
27 #define GAUSSIAN2DFITTER_H_
28 
29 #include <casa/aipstype.h>
30 #include <casa/BasicSL/String.h>
32 #include <QString>
33 #include <QThread>
34 
35 namespace casacore{
36 
37  template <class T> class ImageInterface;
38 }
39 
40 namespace casa {
41 
42 
47  class Gaussian2DFitter : public QThread {
48  public:
50  void run();
51  bool isFitSuccessful() const;
52  void setFitParameters( std::shared_ptr<const casacore::ImageInterface<casacore::Float> > image, const casacore::String& box,
53  int channelNum, const casacore::String& estimatesFileName, const casacore::String& residualImageFile,
54  const casacore::Vector<casacore::Float>& includeVector, const casacore::Vector<casacore::Float>& excludeVector);
55  QString getErrorMessage() const;
56  QString getLogFilePath() const;
57  void setWriteLogFile( bool write );
58  QString getResidualImagePath() const;
60  bool writeRegionFile() const;
61  QList<RegionShape*> toDrawingDisplay( const std::shared_ptr<const casacore::ImageInterface<casacore::Float> > image, const QString& colorName) const;
62  virtual ~Gaussian2DFitter();
63 
64  private:
65  Gaussian2DFitter( const Gaussian2DFitter& other );
67  QString errorMsg;
69  bool logFile;
71  std::shared_ptr<const casacore::ImageInterface<casacore::Float> > image;
72  std::shared_ptr<std::pair<casacore::Float, casacore::Float> > includePixs;
73  std::shared_ptr<std::pair<casacore::Float, casacore::Float> > excludePixs;
79  const QString LOG_SUFFIX;
80  const QString REGION_SUFFIX;
81  };
82 
83 } // end namespace casa
84 
85 #endif /* GAUSSIAN2DFITTER_H_ */
QString getResidualImagePath() const
const QString REGION_SUFFIX
void setFilePath(casacore::String path)
void setWriteLogFile(bool write)
casacore::String residualImageFile
bool isFitSuccessful() const
casacore::String estimateFile
QList< RegionShape * > toDrawingDisplay(const std::shared_ptr< const casacore::ImageInterface< casacore::Float > > image, const QString &colorName) const
Provides convenient accessors and functionality for a ComponentList.
Performs a 2DGaussian fit of an image in a background thread.
std::shared_ptr< const casacore::ImageInterface< casacore::Float > > image
bool write(const std::vector< RegionShape * > &shapes) const
Implements RegionFileWriter::write.
std::string path(const std::string &name)
Gaussian2DFitter operator=(const Gaussian2DFitter &other)
casacore::String pixelBox
ComponentListWrapper fitResultList
QString getLogFilePath() const
bool writeRegionFile() const
casacore::String filePath
QString getErrorMessage() const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::shared_ptr< std::pair< casacore::Float, casacore::Float > > excludePixs
void setFitParameters(std::shared_ptr< const casacore::ImageInterface< casacore::Float > > image, const casacore::String &box, int channelNum, const casacore::String &estimatesFileName, const casacore::String &residualImageFile, const casacore::Vector< casacore::Float > &includeVector, const casacore::Vector< casacore::Float > &excludeVector)
std::shared_ptr< std::pair< casacore::Float, casacore::Float > > includePixs
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42