[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
VolumeImportInfo Class Reference |
Argument object for the function importVolume(). More...
#include <vigra/multi_impex.hxx>
Public Types | |
typedef TinyVector< float, 3 > | Resolution |
3D resolution type returned by resolution() | |
typedef MultiArrayShape< 3 >::type | ShapeType |
type of volume size returned by shape() | |
typedef ShapeType | size_type |
type of volume size returned by shape() | |
Public Member Functions | |
MultiArrayIndex | depth () const |
const char * | getFileType () const |
const char * | getPixelType () const |
MultiArrayIndex | height () const |
PixelType | pixelType () const |
Resolution | resolution () const |
ShapeType | shape () const |
VolumeImportInfo (const std::string &filename) | |
VolumeImportInfo (const std::string &base_name, const std::string &name_extension) | |
MultiArrayIndex | width () const |
Argument object for the function importVolume().
This object can be used to define the properties of a volume data set to be read from disk. It works like vigra::ImageImportInfo, but for 3-dimensional data. See importVolume() for usage example.
#include <vigra/multi_impex.hxx>
Namespace: vigra
VolumeImportInfo | ( | const std::string & | filename | ) |
Construct VolumeImportInfo from a single filename.
The filename (which may contain a path) can be interpreted in three different ways:
base_name + slice_number + name_extension
. If this decomposition succeeds, all images with the same base_name and name_extension will be considered as the slices of an image stack. Slice numbers need not be consecutive (i.e. gaps are allowed) and will be interpreted according to their numerical order (i.e. "009", "010", "011" are read in the same order as "9", "10", "11"). The number of images found determines the depth of the volume, the remaining header data are read from the given image. VolumeImportInfo | ( | const std::string & | base_name, |
const std::string & | name_extension | ||
) |
Construct VolumeImportInfo for a stack of images.
The constructor will look for filenames of the form base_name + slice_number + name_extension
. All images conforming to this pattern will be considered as the slices of an image stack. Slice numbers need not be consecutive (i.e. gaps are allowed) and will be interpreted according to their numerical order (i.e. "009", "010", "011" are read in the same order as "9", "10", "11"). The number of images found determines the depth of the volume, the remaining header data are read from the given image. name_base may contain a path.
ShapeType shape | ( | ) | const |
Get the shape of the volume.
MultiArrayIndex width | ( | ) | const |
Get width of the volume.
MultiArrayIndex height | ( | ) | const |
Get height of the volume.
MultiArrayIndex depth | ( | ) | const |
Get depth of the volume.
Resolution resolution | ( | ) | const |
resolution() contains the alignment and resolution of the volume. resolution()[0] is the x increment in a left-handed world coordinate system of one unstrided step in the volume memory. The [1] and [2] elements contain the y resp. z increments of the strided row resp. slice steps in the volume.
EXAMPLES: (1.f, 1.f, 4.f) means that the slices are four times thicker than the x/y resolution. (1.f, -1.f, 1.f) means that the volume coordinate system is right-handed.
const char* getFileType | ( | ) | const |
Query the file type.
Possible values are:
const char* getPixelType | ( | ) | const |
Query the pixel type of the volume data.
Possible values are:
PixelType pixelType | ( | ) | const |
Query the pixel type of the volume data.
Same as getPixelType(), but the result is returned as a ImageImportInfo::PixelType enum. This is useful to implement a switch() on the pixel type.
Possible values are:
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|