#include <LCSlicer.h>
Collaboration diagram for casa::LCSlicer:

Part of API
The LCSlicer makes it possible to define a rectangular box with strides. Note that this class is not derived from LCRegion , so it cannot be used in a compound region object like LCUnion . The reason is that strides make it impossible to use a region in a compound.
The slicer region has to be defined from an LCBox object defining the blc/trc and a vector (of the same length) containing the strides. The LCSlicer can be of any type (thus relative, fractional, unspecified), while the strides can be defined as a number or a fraction.
It is also possible to construct it directly from a Slicer object,
Definition at line 83 of file LCSlicer.h.
Public Member Functions | |
| LCSlicer () | |
| LCSlicer (const LCSlicer &other) | |
| Copy constructor (reference semantics). | |
| ~LCSlicer () | |
| LCSlicer & | operator= (const LCSlicer &other) |
| Assignment (copy semantics). | |
| Bool | isComplete () const |
| The region is completely specified if it is absolute, not fractional, and has no unspecified values. | |
| uInt | ndim () const |
| Get the dimensionality of the region. | |
| String | type () const |
| Get the region type. | |
| TableRecord | toRecord (const String &tableName) const |
| Convert the object to a record. | |
| LCSlicer (const Vector< Float > &blc, const Vector< Float > &trc, Bool fractionalBlcTrc=False, RegionType::AbsRelType=RegionType::Abs) | |
| Construct a slicer from the blc, trc, and stride (default 1). | |
| LCSlicer (const Vector< Float > &blc, const Vector< Float > &trc, const Vector< Float > &inc, Bool fractionalBlcTrc=False, RegionType::AbsRelType=RegionType::Abs) | |
| LCSlicer (const Vector< Float > &blc, const Vector< Float > &trc, const Vector< Float > &inc, const Vector< Bool > &fractionalBlc, const Vector< Bool > &fractionalTrc, const Vector< Bool > &fractionalInc, const Vector< Int > &absRelBlc, const Vector< Int > &absRelTrc) | |
| LCSlicer (const Vector< Double > &blc, const Vector< Double > &trc, Bool fractionalBlcTrc=False, RegionType::AbsRelType=RegionType::Abs) | |
| LCSlicer (const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Double > &inc, Bool fractionalBlcTrc=False, RegionType::AbsRelType=RegionType::Abs) | |
| LCSlicer (const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Double > &inc, const Vector< Bool > &fractionalBlc, const Vector< Bool > &fractionalTrc, const Vector< Bool > &fractionalInc, const Vector< Int > &absRelBlc, const Vector< Int > &absRelTrc) | |
| LCSlicer (const Slicer &slicer) | |
| LCSlicer (const IPosition &blc, const IPosition &trc, RegionType::AbsRelType=RegionType::Abs) | |
| LCSlicer (const IPosition &blc, const IPosition &trc, const IPosition &inc, RegionType::AbsRelType=RegionType::Abs) | |
| LCSlicer (const IPosition &blc, const IPosition &trc, const IPosition &inc, const Vector< Int > &absRelBlc, const Vector< Int > &absRelTrc) | |
| Bool | operator== (const LCSlicer &other) const |
| Test for equality. | |
| Bool | operator!= (const LCSlicer &other) const |
| const Vector< Float > & | blc () const |
| Simple accessor functions. | |
| const Vector< Float > & | trc () const |
| const Vector< Float > & | inc () const |
| Bool | isFractional () const |
| Bool | isAbsolute () const |
| Bool | isUnspecified () const |
| Bool | isStrided () const |
| const String & | comment () const |
| Get or set the comment. | |
| void | setComment (const String &comment) |
| Slicer | toSlicer (const IPosition &referencePixel, const IPosition &latticeShape) const |
| Make the region complete using the given reference pixel and shape. | |
| Slicer | toSlicer (const Vector< Double > &referencePixel, const IPosition &latticeShape) const |
| Slicer | toSlicer (const Vector< Float > &referencePixel, const IPosition &newLatticeShape) const |
Static Public Member Functions | |
| static String | className () |
| Get the class name (to store in the record). | |
| static LCSlicer * | fromRecord (const TableRecord &, const String &tablename) |
| Convert to correct object from a record. | |
Private Member Functions | |
| void | fillFlags (Bool fractional, Int absRel, uInt nrblc, uInt nrtrc, uInt nrinc) |
| Fill the pixel based flags from the general ones. | |
| void | fillFromDouble (const Vector< Double > &blc, const Vector< Double > &trc, const Vector< Double > &inc) |
| Fill the vectors from the values given as doubles. | |
| void | fillFromIPosition (const IPosition &blc, const IPosition &trc, const IPosition &inc) |
| Fill the vectors from the values given as IPositions. | |
| void | fill () |
| Fill the remaining variables. | |
Private Attributes | |
| Vector< Float > | itsBlc |
| Vector< Float > | itsTrc |
| Vector< Float > | itsInc |
| Vector< Bool > | itsFracBlc |
| Vector< Bool > | itsFracTrc |
| Vector< Bool > | itsFracInc |
| Vector< Int > | itsAbsRelBlc |
| Vector< Int > | itsAbsRelTrc |
| Bool | itsIsFractional |
| Bool | itsIsAbsolute |
| Bool | itsIsUnspecified |
| Bool | itsIsStrided |
| String | itsComment |
| casa::LCSlicer::LCSlicer | ( | ) |
| casa::LCSlicer::LCSlicer | ( | const Vector< Float > & | blc, | |
| const Vector< Float > & | trc, | |||
| Bool | fractionalBlcTrc = False, |
|||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
Construct a slicer from the blc, trc, and stride (default 1).
The vectors can be different in lengths. The longest determines the dimensionality of the region. The shorter ones get padded with default values.
| casa::LCSlicer::LCSlicer | ( | const Vector< Float > & | blc, | |
| const Vector< Float > & | trc, | |||
| const Vector< Float > & | inc, | |||
| Bool | fractionalBlcTrc = False, |
|||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const Vector< Float > & | blc, | |
| const Vector< Float > & | trc, | |||
| const Vector< Float > & | inc, | |||
| const Vector< Bool > & | fractionalBlc, | |||
| const Vector< Bool > & | fractionalTrc, | |||
| const Vector< Bool > & | fractionalInc, | |||
| const Vector< Int > & | absRelBlc, | |||
| const Vector< Int > & | absRelTrc | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const Vector< Double > & | blc, | |
| const Vector< Double > & | trc, | |||
| Bool | fractionalBlcTrc = False, |
|||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const Vector< Double > & | blc, | |
| const Vector< Double > & | trc, | |||
| const Vector< Double > & | inc, | |||
| Bool | fractionalBlcTrc = False, |
|||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const Vector< Double > & | blc, | |
| const Vector< Double > & | trc, | |||
| const Vector< Double > & | inc, | |||
| const Vector< Bool > & | fractionalBlc, | |||
| const Vector< Bool > & | fractionalTrc, | |||
| const Vector< Bool > & | fractionalInc, | |||
| const Vector< Int > & | absRelBlc, | |||
| const Vector< Int > & | absRelTrc | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const Slicer & | slicer | ) |
| casa::LCSlicer::LCSlicer | ( | const IPosition & | blc, | |
| const IPosition & | trc, | |||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const IPosition & | blc, | |
| const IPosition & | trc, | |||
| const IPosition & | inc, | |||
| RegionType::AbsRelType | = RegionType::Abs | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const IPosition & | blc, | |
| const IPosition & | trc, | |||
| const IPosition & | inc, | |||
| const Vector< Int > & | absRelBlc, | |||
| const Vector< Int > & | absRelTrc | |||
| ) |
| casa::LCSlicer::LCSlicer | ( | const LCSlicer & | other | ) |
Copy constructor (reference semantics).
| casa::LCSlicer::~LCSlicer | ( | ) |
Test for equality.
True is returned when the given region is a slicer with exactly the same specification as this slicer. It does not compare the comment.
Definition at line 236 of file LCSlicer.h.
| Bool casa::LCSlicer::isComplete | ( | ) | const |
The region is completely specified if it is absolute, not fractional, and has no unspecified values.
| uInt casa::LCSlicer::ndim | ( | ) | const [inline] |
Get the dimensionality of the region.
Definition at line 240 of file LCSlicer.h.
References itsBlc, and casa::ArrayBase::nelements().
| Bool casa::LCSlicer::isFractional | ( | ) | const [inline] |
| Bool casa::LCSlicer::isAbsolute | ( | ) | const [inline] |
| Bool casa::LCSlicer::isUnspecified | ( | ) | const [inline] |
| Bool casa::LCSlicer::isStrided | ( | ) | const [inline] |
| static String casa::LCSlicer::className | ( | ) | [static] |
Get the class name (to store in the record).
| String casa::LCSlicer::type | ( | ) | const |
Get the region type.
Returns className().
| const String & casa::LCSlicer::comment | ( | ) | const [inline] |
Get or set the comment.
Definition at line 272 of file LCSlicer.h.
References itsComment.
Referenced by setComment().
| void casa::LCSlicer::setComment | ( | const String & | comment | ) | [inline] |
| Slicer casa::LCSlicer::toSlicer | ( | const IPosition & | referencePixel, | |
| const IPosition & | latticeShape | |||
| ) | const |
Make the region complete using the given reference pixel and shape.
It returns a new region where the relative regions are made absolute by translating them with respect to the reference pixel. Furthermore unspecified values are filled in and fractional values are turned into absolute ones.
| Slicer casa::LCSlicer::toSlicer | ( | const Vector< Double > & | referencePixel, | |
| const IPosition & | latticeShape | |||
| ) | const |
| Slicer casa::LCSlicer::toSlicer | ( | const Vector< Float > & | referencePixel, | |
| const IPosition & | newLatticeShape | |||
| ) | const |
| TableRecord casa::LCSlicer::toRecord | ( | const String & | tableName | ) | const |
Convert the object to a record.
| static LCSlicer* casa::LCSlicer::fromRecord | ( | const TableRecord & | , | |
| const String & | tablename | |||
| ) | [static] |
Convert to correct object from a record.
| void casa::LCSlicer::fillFlags | ( | Bool | fractional, | |
| Int | absRel, | |||
| uInt | nrblc, | |||
| uInt | nrtrc, | |||
| uInt | nrinc | |||
| ) | [private] |
Fill the pixel based flags from the general ones.
| void casa::LCSlicer::fillFromDouble | ( | const Vector< Double > & | blc, | |
| const Vector< Double > & | trc, | |||
| const Vector< Double > & | inc | |||
| ) | [private] |
Fill the vectors from the values given as doubles.
| void casa::LCSlicer::fillFromIPosition | ( | const IPosition & | blc, | |
| const IPosition & | trc, | |||
| const IPosition & | inc | |||
| ) | [private] |
Fill the vectors from the values given as IPositions.
\.
| void casa::LCSlicer::fill | ( | ) | [private] |
Fill the remaining variables.
It also adjust the lengths of the vectors if they are different. Check if everything is given correctly.
Vector<Float> casa::LCSlicer::itsBlc [private] |
Vector<Float> casa::LCSlicer::itsTrc [private] |
Vector<Float> casa::LCSlicer::itsInc [private] |
Vector<Bool> casa::LCSlicer::itsFracBlc [private] |
Definition at line 223 of file LCSlicer.h.
Vector<Bool> casa::LCSlicer::itsFracTrc [private] |
Definition at line 224 of file LCSlicer.h.
Vector<Bool> casa::LCSlicer::itsFracInc [private] |
Definition at line 225 of file LCSlicer.h.
Vector<Int> casa::LCSlicer::itsAbsRelBlc [private] |
Definition at line 226 of file LCSlicer.h.
Vector<Int> casa::LCSlicer::itsAbsRelTrc [private] |
Definition at line 227 of file LCSlicer.h.
Bool casa::LCSlicer::itsIsFractional [private] |
Bool casa::LCSlicer::itsIsAbsolute [private] |
Bool casa::LCSlicer::itsIsUnspecified [private] |
Bool casa::LCSlicer::itsIsStrided [private] |
String casa::LCSlicer::itsComment [private] |
1.5.1