casacore
Loading...
Searching...
No Matches
LCPixelSet.h
Go to the documentation of this file.
1//# LCPixelSet.h: Class to define a rectangular set of pixels as a region
2//# Copyright (C) 1998,1999
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_LCPIXELSET_H
27#define LATTICES_LCPIXELSET_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/lattices/LRegions/LCBox.h>
32#include <casacore/casa/Arrays/Slicer.h>
33
34
35namespace casacore { //# NAMESPACE CASACORE - BEGIN
36
37// <summary>
38// Class to define a rectangular mask as a region
39// </summary>
40
41// <use visibility=export>
42
43// <reviewed reviewer="" date="" tests="">
44// </reviewed>
45
46// <prerequisite>
47// <li> <linkto class=LCRegion>LCRegion</linkto>
48// </prerequisite>
49
50// <synopsis>
51// The LCPixelSet class is a specialization of class
52// <linkto class=LCRegion>LCRegion</linkto>.
53// It makes it possible to define a rectangular region of interest.
54// </synopsis>
55
56// <example>
57// <srcblock>
58// </srcblock>
59// </example>
60
61// <todo asof="1997/11/11">
62// </todo>
63
65{
66public:
68
69 // Construct from the box defining the position of the mask.
70 // The shape of the region and mask must be the same.
71 LCPixelSet (const Array<Bool>& mask, const LCBox& region);
72
73 // Copy constructor (copy semantics).
74 LCPixelSet (const LCPixelSet& other);
75
76 virtual ~LCPixelSet();
77
78 // Assignment (copy semantics).
80
81 // Comparison
82 virtual Bool operator== (const LCRegion& other) const;
83
84 // Make a copy of the derived object.
85 virtual LCRegion* cloneRegion() const;
86
87 // Get the class name (to store in the record).
88 static String className();
89
90 // Get the region type. Returns className().
91 virtual String type() const;
92
93 // Convert the (derived) object to a record.
94 virtual TableRecord toRecord (const String& tableName) const;
95
96 // Convert correct object from a record.
98 const String& tablename);
99
100protected:
101 // Construct another LCPixelSet (for e.g. another lattice) by moving
102 // this one. It recalculates the bounding mask.
103 // A positive translation value indicates "to right".
104 virtual LCRegion* doTranslate (const Vector<Float>& translateVector,
105 const IPosition& newLatticeShape) const;
106
107private:
109};
110
111
112
113} //# NAMESPACE CASACORE - END
114
115#endif
virtual TableRecord toRecord(const String &tableName) const
Convert the (derived) object to a record.
virtual LCRegion * cloneRegion() const
Make a copy of the derived object.
static String className()
Get the class name (to store in the record).
LCPixelSet & operator=(const LCPixelSet &other)
Assignment (copy semantics).
LCPixelSet(const Array< Bool > &mask, const LCBox &region)
Construct from the box defining the position of the mask.
virtual String type() const
Get the region type.
LCPixelSet(const LCPixelSet &other)
Copy constructor (copy semantics).
virtual LCRegion * doTranslate(const Vector< Float > &translateVector, const IPosition &newLatticeShape) const
Construct another LCPixelSet (for e.g.
virtual Bool operator==(const LCRegion &other) const
Comparison.
static LCPixelSet * fromRecord(const TableRecord &, const String &tablename)
Convert correct object from a record.
String: the storage and methods of handling collections of characters.
Definition String.h:223
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