To represent geometries or subarrays of N-dimensional arrays. More...
To represent geometries or subarrays of N-dimensional arrays.
A utility class to allow an easy selection of regions within N-dimensional arrays. Used for Interfacing with command line, config file and FITS I/O.
UException | on request of illegal (i.e. > N or < 0) dimensions. |
util::Region::Region | ( | const size_t | N | ) |
Construct an N dimensional Region.
util::Region::Region | ( | const Region & | other | ) |
Construct as copy from other.
util::Region::Region | ( | const string & | s, | |
const size_t | N | |||
) |
Construct as N dimensional Region from input string with format start_1:end_1,...,start_N:end_N.
util::Region::~Region | ( | ) | [inline] |
References start_.
size_t util::Region::getDim | ( | ) | const [inline] |
Return number of dimensions.
References N_.
int util::Region::getStart | ( | const size_t | i | ) | const throw (UException) |
Return start coordinate of dimension i.
Referenced by ltl::getMArrayRegion().
int util::Region::getEnd | ( | const size_t | i | ) | const throw (UException) |
Return end coordinate of dimension i.
Referenced by ltl::getMArrayRegion().
size_t util::Region::getLength | ( | ) | const throw (UException) |
Return size of Region.
Referenced by ltl::getMArrayRegion().
size_t util::Region::getLength | ( | const size_t | i | ) | const throw (UException) |
Return length along dimension i.
Region util::Region::getSlice | ( | const size_t | startdim, | |
const size_t | enddim | |||
) | const throw (UException) |
Return a (rand reduced) slice of Region.
void util::Region::setStart | ( | const size_t | i, | |
const int | x | |||
) | throw (UException) |
Set start coordinate of dimension i to x.
void util::Region::setEnd | ( | const size_t | i, | |
const int | x | |||
) | throw (UException) |
Set end coordinate of dimension i to x.
void util::Region::setRange | ( | const size_t | i, | |
const int | s, | |||
const int | e | |||
) | throw (UException) |
Set range of dimension i to start at s and end at e.
void util::Region::setRegion | ( | const Region & | region | ) | throw (UException) |
Copy settings from region.
string util::Region::toString | ( | ) | const |
Parse Region to a string with format start_1:end_1,...,start_N:end_N.
const size_t util::Region::N_ [protected] |
Number of dimensions.
Referenced by getDim().
int* const util::Region::start_ [protected] |
Pointer to array with start coordinates.
Referenced by ~Region().
int* const util::Region::end_ [protected] |
Pointer to array with end coordinates.
const string util::Region::error_get_dim [static, protected] |
Error message for invalid dimension requests.
const string util::Region::error_set_dim [static, protected] |
Error message for invalid dimension requests.