LCRegionFixed.h

Go to the documentation of this file.
00001 //# LCRegionFixed.h: Abstract base class to define a fixed region
00002 //# Copyright (C) 1998,2000
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 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef LATTICES_LCREGIONFIXED_H
00029 #define LATTICES_LCREGIONFIXED_H
00030 
00031 //# Includes
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/lattices/LRegions/LCRegionSingle.h>
00034 #include <casacore/lattices/Lattices/ArrayLattice.h>
00035 
00036 
00037 namespace casacore { //# NAMESPACE CASACORE - BEGIN
00038 
00039 // <summary>
00040 // Abstract base class to define a fixed region.
00041 // </summary>
00042 
00043 // <use visibility=export>
00044 
00045 // <reviewed reviewer="" date="" tests="">
00046 // </reviewed>
00047 
00048 // <prerequisite>
00049 //   <li> <linkto class=Slicer>Slicer</linkto>
00050 // </prerequisite>
00051 
00052 // <synopsis> 
00053 // The LCRegion class is the abstract base class for various types
00054 // of LCRegion's (e.g. LCRegionEllipsoid, LCRegionBox).
00055 // It contains the minimal bounding box of the region and, if needed,
00056 // a mask with the same shape as the bounding box. A mask element
00057 // is true if the element is inside the box.
00058 // <p>
00059 // Each LCRegion object must be able to convert itself to and from a record.
00060 // In that way they can be made persistent (in for example a Table).
00061 // <p>
00062 // The LCRegion can be used in several Lattices and Images classes and
00063 // functions to limit the area to operate on.
00064 // </synopsis> 
00065 
00066 // <example>
00067 // <srcblock>
00068 // </srcblock>
00069 // </example>
00070 
00071 // <motivation>
00072 // The Slicer class is too limited as a region, because it can only
00073 // describe a rectangular region. Specialized classes are needed to
00074 // describe arbitrary regions. They need a base class to combine them.
00075 // </motivation>
00076 
00077 //# <todo asof="1997/11/11">
00078 //# <li>
00079 //# </todo>
00080 
00081 class LCRegionFixed : public LCRegionSingle
00082 {
00083 public:
00084     LCRegionFixed();
00085 
00086     // Construct with the lattice shape only.
00087     LCRegionFixed (const IPosition& latticeShape);
00088 
00089     // Copy constructor (copy semantics).
00090     LCRegionFixed (const LCRegionFixed& other);
00091 
00092     // Destructor
00093     virtual ~LCRegionFixed();
00094 
00095     // Comparison. Mask is not checked. Use the 
00096     // LCRegionSingle::masksEqual function as well if 
00097     // you want to check the masks
00098     virtual Bool operator== (const LCRegion& other) const;
00099 
00100  protected:
00101     // Assignment (copy semantics) is only useful for derived classes.
00102     LCRegionFixed& operator= (const LCRegionFixed& other);
00103 
00104     // Set the mask.
00105     void setMask (const Array<Bool>& mask);
00106 
00107 private:
00108     ArrayLattice<Bool> itsMask;
00109 };
00110 
00111 
00112 
00113 } //# NAMESPACE CASACORE - END
00114 
00115 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1