casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef LATTICES_LCREGIONFIXED_H
27#define LATTICES_LCREGIONFIXED_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LRegions/LCRegionSingle.h>
32#include <casacore/lattices/Lattices/ArrayLattice.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Abstract base class to define a fixed region.
38// </summary>
39
40// <use visibility=export>
41
42// <reviewed reviewer="" date="" tests="">
43// </reviewed>
44
45// <prerequisite>
46// <li> <linkto class=Slicer>Slicer</linkto>
47// </prerequisite>
48
49// <synopsis>
50// The LCRegion class is the abstract base class for various types
51// of LCRegion's (e.g. LCRegionEllipsoid, LCRegionBox).
52// It contains the minimal bounding box of the region and, if needed,
53// a mask with the same shape as the bounding box. A mask element
54// is true if the element is inside the box.
55// <p>
56// Each LCRegion object must be able to convert itself to and from a record.
57// In that way they can be made persistent (in for example a Table).
58// <p>
59// The LCRegion can be used in several Lattices and Images classes and
60// functions to limit the area to operate on.
61// </synopsis>
62
63// <example>
64// <srcblock>
65// </srcblock>
66// </example>
67
68// <motivation>
69// The Slicer class is too limited as a region, because it can only
70// describe a rectangular region. Specialized classes are needed to
71// describe arbitrary regions. They need a base class to combine them.
72// </motivation>
73
74// # <todo asof="1997/11/11">
75// # <li>
76// # </todo>
77
79 public:
81
82 // Construct with the lattice shape only.
84
85 // Copy constructor (copy semantics).
87
88 // Destructor
89 virtual ~LCRegionFixed();
90
91 // Return the mask
93
94 protected:
95 // Comparison. Mask is not checked. Use the
96 // LCRegionSingle::masksEqual function as well if
97 // you want to check the masks
98 Bool equals(const LCRegion& other) const override { return LCRegion::equals(other); }
99
100 // Assignment (copy semantics) is only useful for derived classes.
102
103 // Set the mask.
105
106 private:
108};
109
110} // namespace casacore
111
112#endif
LCRegionFixed(const LCRegionFixed &other)
Copy constructor (copy semantics).
void setMask(const Array< Bool > &mask)
Set the mask.
ArrayLattice< Bool > itsMask
Bool equals(const LCRegion &other) const override
Comparison.
virtual ~LCRegionFixed()
Destructor.
const ArrayLattice< Bool > & getMask() const
Return the mask.
LCRegionFixed(const IPosition &latticeShape)
Construct with the lattice shape only.
LCRegionFixed & operator=(const LCRegionFixed &other)
Assignment (copy semantics) is only useful for derived classes.
virtual Bool equals(const LCRegion &other) const =0
const IPosition & latticeShape() const
Give the full lattice shape.
Definition LCRegion.h:211
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40