ProfileTaskFacilitator.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 *  This abstract class is an interface that specifies the basic functionality that
00027 *  spectral line moments/fitting should implement.  It is expected that it will be subclassed
00028 *  by implementation classes to provide specialized behavior.
00029 *
00030 */
00031 
00032 #ifndef PROFILE_TASK_FACILITATOR_H_
00033 #define PROFILE_TASK_FACILITATOR_H_
00034 
00035 #include <QString>
00036 #include <casa/BasicSL/String.h>
00037 #include <casa/Arrays/Vector.h>
00038 #include <casa/Containers/Record.h>
00039 
00040 class QDoubleValidator;
00041 
00042 namespace casa {
00043 
00044         class QtCanvas;
00045         class ProfileTaskMonitor;
00046         class LogIO;
00047 
00048         template <class T> class ImageInterface;
00049 
00050         class ProfileTaskFacilitator {
00051         public:
00052                 ProfileTaskFacilitator();
00053                 virtual ~ProfileTaskFacilitator();
00054 
00055                 virtual void setUnits( QString units ) = 0;
00056                 virtual void setRange(double start, double end )=0;
00057                 virtual void reset() = 0;
00058 
00059                 virtual void setCanvas( QtCanvas* pixelCanvas );
00060                 virtual void setTaskMonitor( ProfileTaskMonitor* monitor );
00061                 virtual void setCurveName( const QString& curveName );
00062                 virtual void addCurveName( const QString& curveName );
00063                 virtual void setDisplayYUnits( const QString& units );
00064                 virtual void setImageYUnits( const QString& units );
00065                 virtual void setLogger( LogIO* log );
00066                 virtual void plotMainCurve();
00067 
00068                 virtual QString getFileName();
00069                 virtual void logWarning(String msg, bool opticalSource = false );
00070                 virtual void postStatus( String status, bool opticalSource = false );
00071                 virtual Vector<Float> getXValues() const;
00072                 virtual Vector<Float> getYValues() const;
00073                 virtual Vector<Float> getZValues() const;
00074                 virtual Vector<Double> getRegionXValues() const;
00075                 virtual Vector<Double> getRegionYValues() const;
00076                 virtual QString getYUnit() const;
00077                 virtual QString getYUnitPrefix() const;
00078                 virtual String getXAxisUnit() const;
00079                 virtual const SHARED_PTR<const ImageInterface<Float> > getImage( const QString& name="") const;
00080                 virtual const String getPixelBox() const;
00081                 virtual const String getRegionShape() const;
00082 
00083                 bool isOptical();
00084                 void setOptical( bool optical );
00085 
00086                 virtual void clear();
00087                 void setCollapseVals(const Vector<Float> &spcVals);
00088 
00089                 virtual void pixelsChanged(int pixX, int pixY );
00090 
00091         protected:
00092                 bool isValidChannelRangeValue( QString str, const QString& endStr );
00093                 void findChannelRange( float startVal, float endVal,
00094                                        const Vector<Float>& specValues, Int& channelStartIndex, Int& channelEndIndex );
00095                 QtCanvas* pixelCanvas;
00096                 ProfileTaskMonitor* taskMonitor;
00097                 LogIO* logger;
00098 
00099         private:
00100                 bool optical;
00101                 QDoubleValidator *validator;
00102         };
00103 
00104 } /* namespace casa */
00105 #endif /* SPECFITTER_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1