casa
$Rev:20696$
|
00001 //# ImageMomentsProgress.h: Progress meter for ImageMoments class 00002 //# Copyright (C) 1996,1997,1999 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-requesemat@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id: ImageMomentsProgress.h 20299 2008-04-03 05:56:44Z gervandiepen $ 00028 00029 #ifndef IMAGES_IMAGEMOMENTSPROGRESS_H 00030 #define IMAGES_IMAGEMOMENTSPROGRESS_H 00031 00032 00033 #include <casa/aips.h> 00034 #include <lattices/Lattices/LatticeProgress.h> 00035 #include <casa/System/ProgressMeter.h> 00036 00037 namespace casa { //# NAMESPACE CASA - BEGIN 00038 00039 // <summary> Provides a progress meter for the ImageMoments class </summary> 00040 // <use visibility=export> 00041 // 00042 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00043 // </reviewed> 00044 // 00045 // <prerequisite> 00046 // <li> <linkto module=Lattices>LatticeProgress</linkto> 00047 // </prerequisite> 00048 // 00049 // <etymology> 00050 // Display a progress meter for the ImageMoments class 00051 // </etymology> 00052 // 00053 // <synopsis> 00054 // Progress meters can be displayed by the LatticeApply class 00055 // which is used by ImageMoments in order to optimally iterate 00056 // through the image by lines. To do this, one must derive a 00057 // class from LatticeProgress. LatticeApply calls methods declared 00058 // in LatticeProgress and implemented in the derived class. 00059 // </synopsis> 00060 // 00061 // <motivation> 00062 // I like progress meters ! 00063 // </motivation> 00064 // 00065 // <todo asof="1998/01/10"> 00066 // </todo> 00067 class ImageMomentsProgressMonitor; 00068 00069 class ImageMomentsProgress : public LatticeProgress 00070 { 00071 public: 00072 00073 // Constructor makes a null object 00074 ImageMomentsProgress() : itsMeter(0), progressMonitor(0) {}; 00075 00076 // Destructor deletes the ProgressMeter pointer 00077 virtual ~ImageMomentsProgress(); 00078 00079 // Initialize this object. Here we create the ProgressMeter 00080 // This function is called by the <src>init</src> in LatticeProgress 00081 virtual void initDerived(); 00082 00083 // Tell the number of steps done so far. 00084 virtual void nstepsDone (uInt nsteps); 00085 00086 // The process has ended so clean things up. 00087 virtual void done(); 00088 00089 //Set an ImageMomentsProgressMonitor that wants to receive 00090 //progress updates 00091 void setProgressMonitor( ImageMomentsProgressMonitor* monitor ); 00092 00093 private: 00094 ProgressMeter* itsMeter; 00095 ImageMomentsProgressMonitor* progressMonitor; 00096 bool maxReported; 00097 }; 00098 00099 00100 } //# NAMESPACE CASA - END 00101 00102 #endif