casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LCRegionFixed.h
Go to the documentation of this file.
1 //# LCRegionFixed.h: Abstract base class to define a fixed region
2 //# Copyright (C) 1998,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef LATTICES_LCREGIONFIXED_H
29 #define LATTICES_LCREGIONFIXED_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
35 
36 
37 namespace casacore { //# NAMESPACE CASACORE - BEGIN
38 
39 // <summary>
40 // Abstract base class to define a fixed region.
41 // </summary>
42 
43 // <use visibility=export>
44 
45 // <reviewed reviewer="" date="" tests="">
46 // </reviewed>
47 
48 // <prerequisite>
49 // <li> <linkto class=Slicer>Slicer</linkto>
50 // </prerequisite>
51 
52 // <synopsis>
53 // The LCRegion class is the abstract base class for various types
54 // of LCRegion's (e.g. LCRegionEllipsoid, LCRegionBox).
55 // It contains the minimal bounding box of the region and, if needed,
56 // a mask with the same shape as the bounding box. A mask element
57 // is true if the element is inside the box.
58 // <p>
59 // Each LCRegion object must be able to convert itself to and from a record.
60 // In that way they can be made persistent (in for example a Table).
61 // <p>
62 // The LCRegion can be used in several Lattices and Images classes and
63 // functions to limit the area to operate on.
64 // </synopsis>
65 
66 // <example>
67 // <srcblock>
68 // </srcblock>
69 // </example>
70 
71 // <motivation>
72 // The Slicer class is too limited as a region, because it can only
73 // describe a rectangular region. Specialized classes are needed to
74 // describe arbitrary regions. They need a base class to combine them.
75 // </motivation>
76 
77 //# <todo asof="1997/11/11">
78 //# <li>
79 //# </todo>
80 
82 {
83 public:
84  LCRegionFixed();
85 
86  // Construct with the lattice shape only.
88 
89  // Copy constructor (copy semantics).
90  LCRegionFixed (const LCRegionFixed& other);
91 
92  // Destructor
93  virtual ~LCRegionFixed();
94 
95  // Comparison. Mask is not checked. Use the
96  // LCRegionSingle::masksEqual function as well if
97  // you want to check the masks
98  virtual Bool operator== (const LCRegion& other) const;
99 
100  // Return the mask
101  const ArrayLattice<Bool>& getMask() const;
102 
103  protected:
104  // Assignment (copy semantics) is only useful for derived classes.
105  LCRegionFixed& operator= (const LCRegionFixed& other);
106 
107  // Set the mask.
108  void setMask (const Array<Bool>& mask);
109 
110 private:
112 };
113 
114 
115 
116 } //# NAMESPACE CASACORE - END
117 
118 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
const ArrayLattice< Bool > & getMask() const
Return the mask.
Abstract base class to define a fixed region.
Definition: LCRegionFixed.h:81
virtual ~LCRegionFixed()
Destructor.
LCRegionFixed & operator=(const LCRegionFixed &other)
Assignment (copy semantics) is only useful for derived classes.
const IPosition & latticeShape() const
Give the full lattice shape.
Definition: LCRegion.h:231
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void setMask(const Array< Bool > &mask)
Set the mask.
virtual Bool operator==(const LCRegion &other) const
Comparison.
Abstract base class to define a single region.
ArrayLattice< Bool > itsMask
Abstract base class to define a region of interest in lattice coordinates.
Definition: LCRegion.h:87
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42