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
34
35namespace casacore { //# NAMESPACE CASACORE - BEGIN
36
37// <summary>
38// Abstract base class to define a fixed region.
39// </summary>
40
41// <use visibility=export>
42
43// <reviewed reviewer="" date="" tests="">
44// </reviewed>
45
46// <prerequisite>
47// <li> <linkto class=Slicer>Slicer</linkto>
48// </prerequisite>
49
50// <synopsis>
51// The LCRegion class is the abstract base class for various types
52// of LCRegion's (e.g. LCRegionEllipsoid, LCRegionBox).
53// It contains the minimal bounding box of the region and, if needed,
54// a mask with the same shape as the bounding box. A mask element
55// is true if the element is inside the box.
56// <p>
57// Each LCRegion object must be able to convert itself to and from a record.
58// In that way they can be made persistent (in for example a Table).
59// <p>
60// The LCRegion can be used in several Lattices and Images classes and
61// functions to limit the area to operate on.
62// </synopsis>
63
64// <example>
65// <srcblock>
66// </srcblock>
67// </example>
68
69// <motivation>
70// The Slicer class is too limited as a region, because it can only
71// describe a rectangular region. Specialized classes are needed to
72// describe arbitrary regions. They need a base class to combine them.
73// </motivation>
74
75//# <todo asof="1997/11/11">
76//# <li>
77//# </todo>
78
80{
81public:
83
84 // Construct with the lattice shape only.
86
87 // Copy constructor (copy semantics).
89
90 // Destructor
91 virtual ~LCRegionFixed();
92
93 // Comparison. Mask is not checked. Use the
94 // LCRegionSingle::masksEqual function as well if
95 // you want to check the masks
96 virtual Bool operator== (const LCRegion& other) const;
97
98 // Return the mask
100
101 protected:
102 // Assignment (copy semantics) is only useful for derived classes.
104
105 // Set the mask.
106 void setMask (const Array<Bool>& mask);
107
108private:
110};
111
112
113
114} //# NAMESPACE CASACORE - END
115
116#endif
LCRegionFixed(const LCRegionFixed &other)
Copy constructor (copy semantics).
void setMask(const Array< Bool > &mask)
Set the mask.
ArrayLattice< Bool > itsMask
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 operator==(const LCRegion &other) const
Comparison.
const IPosition & latticeShape() const
Give the full lattice shape.
Definition LCRegion.h:229
this file contains all the compiler specific defines
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