util::Region Class Reference
To represent geometries or subarrays of N-dimensional arrays.
More...
#include <region.h>
List of all members.
Public Member Functions
-
Region (const size_t N)
- Construct an N dimensional Region.
-
Region (const Region &other)
- Construct as copy from other.
-
size_t getDim () const
- Return number of dimensions.
-
int getStart (const size_t i) const throw (UException)
- Return start coordinate of dimension i.
-
int getEnd (const size_t i) const throw (UException)
- Return end coordinate of dimension i.
-
size_t getLength () const throw (UException)
- Return size of Region.
-
size_t getLength (const size_t i) const throw (UException)
- Return length along dimension i.
-
Region getSlice (const size_t startdim, const size_t enddim) const throw (UException)
- Return a (rand reduced) slice of Region.
-
void setStart (const size_t i, const int x) throw (UException)
- Set start coordinate of dimension i to x.
-
void setEnd (const size_t i, const int x) throw (UException)
- Set end coordinate of dimension i to x.
-
void 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 setRegion (const Region ®ion) throw (UException)
- Copy settings from region.
-
string toString () const
- Parse Region to a string with format start_1:end_1,...,start_N:end_N.
Protected Attributes
-
const size_t N_
- Number of dimensions.
-
int *const start_
- Pointer to array with start coordinates.
-
int *const end_
- Pointer to array with end coordinates.
Static Protected Attributes
-
const string error_get_dim
- Error message for invalid dimension requests.
-
const string error_set_dim
- Error message for invalid dimension requests.
Detailed Description
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.
- Exceptions:
-
UException | on request of illegal (i.e. > N or < 0) dimensions. |
The documentation for this class was generated from the following file:
Generated on Fri Dec 24 13:32:06 2004 for LTL by
1.3.4