casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProfileTaskFacilitator.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
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 * This abstract class is an interface that specifies the basic functionality that
27 * spectral line moments/fitting should implement. It is expected that it will be subclassed
28 * by implementation classes to provide specialized behavior.
29 *
30 */
31 
32 #ifndef PROFILE_TASK_FACILITATOR_H_
33 #define PROFILE_TASK_FACILITATOR_H_
34 
35 #include <QString>
36 #include <casa/BasicSL/String.h>
37 #include <casa/Arrays/Vector.h>
38 #include <casa/Containers/Record.h>
39 
40 class QDoubleValidator;
41 
42 namespace casacore{
43 
44  class LogIO;
45  template <class T> class ImageInterface;
46 }
47 
48 namespace casa {
49 
50  class QtCanvas;
51  class ProfileTaskMonitor;
52 
53 
55  public:
57  virtual ~ProfileTaskFacilitator();
58 
59  virtual void setUnits( QString units ) = 0;
60  virtual void setRange(double start, double end )=0;
61  virtual void reset() = 0;
62 
63  virtual void setCanvas( QtCanvas* pixelCanvas );
64  virtual void setTaskMonitor( ProfileTaskMonitor* monitor );
65  virtual void setCurveName( const QString& curveName );
66  virtual void addCurveName( const QString& curveName );
67  virtual void setDisplayYUnits( const QString& units );
68  virtual void setImageYUnits( const QString& units );
69  virtual void setLogger( casacore::LogIO* log );
70  virtual void plotMainCurve();
71 
72  virtual QString getFileName();
73  virtual void logWarning(casacore::String msg, bool opticalSource = false );
74  virtual void postStatus( casacore::String status, bool opticalSource = false );
80  virtual QString getYUnit() const;
81  virtual QString getYUnitPrefix() const;
82  virtual casacore::String getXAxisUnit() const;
83  virtual const std::shared_ptr<const casacore::ImageInterface<casacore::Float> > getImage( const QString& name="") const;
84  virtual const casacore::String getPixelBox() const;
85  virtual const casacore::String getRegionShape() const;
86 
87  bool isOptical();
88  void setOptical( bool optical );
89 
90  virtual void clear();
92 
93  virtual void pixelsChanged(int pixX, int pixY );
94 
95  protected:
96  bool isValidChannelRangeValue( QString str, const QString& endStr );
97  void findChannelRange( float startVal, float endVal,
98  const casacore::Vector<casacore::Float>& specValues, casacore::Int& channelStartIndex, casacore::Int& channelEndIndex );
102 
103  private:
104  bool optical;
105  QDoubleValidator *validator;
106  };
107 
108 } // end namespace casa
109 
110 #endif /* SPECFITTER_H_ */
virtual casacore::Vector< casacore::Double > getRegionXValues() const
int Int
Definition: aipstype.h:50
LatticeExprNode log(const LatticeExprNode &expr)
virtual const std::shared_ptr< const casacore::ImageInterface< casacore::Float > > getImage(const QString &name="") const
virtual void setLogger(casacore::LogIO *log)
virtual casacore::Vector< casacore::Float > getYValues() const
virtual QString getYUnit() const
virtual void setCanvas(QtCanvas *pixelCanvas)
virtual QString getYUnitPrefix() const
virtual void pixelsChanged(int pixX, int pixY)
virtual void setImageYUnits(const QString &units)
ostream-like interface to creating log messages.
Definition: LogIO.h:167
virtual casacore::Vector< casacore::Float > getZValues() const
void findChannelRange(float startVal, float endVal, const casacore::Vector< casacore::Float > &specValues, casacore::Int &channelStartIndex, casacore::Int &channelEndIndex)
virtual const casacore::String getRegionShape() const
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
void setCollapseVals(const casacore::Vector< casacore::Float > &spcVals)
const_iterator end() const
virtual void setRange(double start, double end)=0
virtual void setDisplayYUnits(const QString &units)
bool isValidChannelRangeValue(QString str, const QString &endStr)
virtual void setUnits(QString units)=0
virtual const casacore::String getPixelBox() const
virtual void addCurveName(const QString &curveName)
virtual casacore::String getXAxisUnit() const
virtual casacore::Vector< casacore::Double > getRegionYValues() const
virtual void setCurveName(const QString &curveName)
void setOptical(bool optical)
virtual QString getFileName()
String: the storage and methods of handling collections of characters.
Definition: String.h:223
virtual casacore::Vector< casacore::Float > getXValues() const
virtual void postStatus(casacore::String status, bool opticalSource=false)
virtual void setTaskMonitor(ProfileTaskMonitor *monitor)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
virtual void logWarning(casacore::String msg, bool opticalSource=false)