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