[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
Classes | |
class | VolumeExportInfo |
Argument object for the function exportVolume(). More... | |
class | VolumeImportInfo |
Argument object for the function importVolume(). More... | |
Namespaces | |
namespace | vigra::detail |
Functions | |
template<class T , class Tag > | |
void | exportVolume (MultiArrayView< 3, T, Tag > const &volume, const VolumeExportInfo &volinfo) |
Function for exporting a 3D volume. | |
template<class T , class Stride > | |
void | importVolume (VolumeImportInfo const &info, MultiArrayView< 3, T, Stride > &volume) |
Function for importing a 3D volume. | |
template<class T , class Allocator > | |
void | importVolume (MultiArray< 3, T, Allocator > &volume, const std::string &name_base, const std::string &name_ext) |
Function for importing a 3D volume. | |
template<class T , class Allocator > | |
void | importVolume (MultiArray< 3, T, Allocator > &volume, const std::string &filename) |
Function for importing a 3D volume. |
void vigra::importVolume | ( | MultiArray< 3, T, Allocator > & | volume, |
const std::string & | name_base, | ||
const std::string & | name_ext | ||
) |
Function for importing a 3D volume.
The data are expected to be stored in a by-slice manner, where the slices are enumerated from name_base+"[0-9]+"+name_ext
. name_base
may contain a path. All slice files with the same name base and extension are considered part of the same volume. Slice numbers must be non-negative, but can otherwise start anywhere and need not be successive. Slices will be read in ascending numerical (not lexicographic) order. All slices must have the same size. The volume
will be reshaped to match the count and size of the slices found.
#include <vigra/multi_impex.hxx>
Namespace: vigra
void vigra::importVolume | ( | MultiArray< 3, T, Allocator > & | volume, |
const std::string & | filename | ||
) |
Function for importing a 3D volume.
The data can be given in two ways:
filename
can refer to an arbitrary image from the set. importVolume()
then assumes that the slices are enumerated like name_base+"[0-9]+"+name_ext
, where name_base
, the index, and name_ext
are determined automatically. All slice files with the same name base and extension are considered part of the same volume. Slice numbers must be non-negative, but can otherwise start anywhere and need not be successive. Slices will be read in ascending numerical (not lexicographic) order. All slices must have the same size. importVolume()
will try to read filename
as an info text file with the following key-value pairs: value_type T
of the MuliArray
. Lines starting with "#" are ignored. In either case, the volume
will be reshaped to match the count and size of the slices found.
#include <vigra/multi_impex.hxx>
Namespace: vigra
void vigra::importVolume | ( | VolumeImportInfo const & | info, |
MultiArrayView< 3, T, Stride > & | volume | ||
) |
Function for importing a 3D volume.
Read the volume data set info
refers to. Explicit construction of the info object allows to allocate a volume
object type whose value_type
matches the voxel type of the stored data. The volume
will be reshaped to match the count and size of the slices found.
#include <vigra/multi_impex.hxx>
Namespace: vigra
void vigra::exportVolume | ( | MultiArrayView< 3, T, Tag > const & | volume, |
const VolumeExportInfo & | volinfo | ||
) |
Function for exporting a 3D volume.
The volume is exported in a by-slice manner, where the number of slices equals the depth of the volume. The file names will be enumerated like name_base+"000"+name_ext
, name_base+"001"+name_ext
etc. (the actual number of zeros depends on the depth). If the target image type does not support the source voxel type, all slices will be mapped simultaneously to the appropriate target range.
#include <vigra/multi_impex.hxx>
Namespace: vigra
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|