casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SIImageStore.h
Go to the documentation of this file.
00001 //# SIImageStore.h: Imager functionality sits here; 
00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
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-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#
00025 //# $Id$
00026 
00027 #ifndef SYNTHESIS_SIIMAGESTORE_H
00028 #define SYNTHESIS_SIMAGESTORE_H
00029 
00030 #include <casa/aips.h>
00031 #include <casa/OS/Timer.h>
00032 #include <casa/Containers/Record.h>
00033 #include <ms/MeasurementSets/MeasurementSet.h>
00034 #include <casa/Arrays/IPosition.h>
00035 #include <casa/Quanta/Quantum.h>
00036 #include <measures/Measures/MDirection.h>
00037 #include <coordinates/Coordinates/CoordinateSystem.h>
00038 #include <images/Images/PagedImage.h>
00039 #include <images/Images/TempImage.h>
00040 #include <images/Images/SubImage.h>
00041 #include <images/Regions/ImageRegion.h>
00042 
00043 namespace casa { //# NAMESPACE CASA - BEGIN
00044 
00045 class SIImageStore 
00046 {
00047  public:
00048   // Default constructor
00049 
00050   SIImageStore();
00051   SIImageStore(String imagename);
00052   SIImageStore(String imagename, 
00053                CoordinateSystem &imcoordsys, 
00054                IPosition imshape);
00055 
00056   ~SIImageStore();
00057 
00058 
00059   IPosition getShape();
00060   String getName();
00061 
00062   CountedPtr<PagedImage<Float> > psf();
00063   CountedPtr<PagedImage<Float> > residual();
00064   CountedPtr<PagedImage<Float> > weight();
00065   CountedPtr<PagedImage<Float> > model();
00066   CountedPtr<PagedImage<Float> > image();
00067 
00068   void setModelImage( String modelname );
00069 
00070   Bool hasWeight(){return itsWeightExists;};
00071 
00072   Bool doImagesExist();
00073   Bool doesImageExist(String imagename);
00074 
00075   void allocateRestoredImage();
00076 
00077   void resetImages( Bool resetpsf, Bool resetresidual, Bool resetweight );
00078   void addImages( CountedPtr<SIImageStore> imagestoadd, 
00079                   Bool addpsf, Bool addresidual, Bool addweight );
00080 
00081   void divideResidualByWeight(Float weightlimit);
00082   void divideModelByWeight(Float weightlimit);
00083 
00084   Bool isValid(){return itsValidity;}
00085 
00086 protected:
00087 
00089 
00090   IPosition itsImageShape;
00091   String itsImageName;
00092   CountedPtr<PagedImage<Float> > itsPsf, itsModel, itsResidual, itsWeight, itsImage;
00093   Bool itsWeightExists;
00094 
00095   Bool itsValidity;
00096 
00097 };
00098 
00099 
00100 } //# NAMESPACE CASA - END
00101 
00102 #endif