Class for input/output of 3-D image data. More...
#include <cmtkVolumeIO.h>
Classes | |
class | Initializer |
Initializer class. More... | |
Public Types | |
typedef VolumeIO | Self |
This class. | |
Static Public Member Functions | |
static UniformVolume::SmartPtr | Read (const char *path, const bool verbose=false) |
Read volume data from filesystem. | |
static UniformVolume::SmartPtr | ReadGrid (const char *path, const bool verbose=false) |
Read grid only from filesystem. | |
static UniformVolume::SmartPtr | ReadGridOriented (const char *path, const char *orientation, const bool verbose=false) |
Read grid only from filesystem and bring into standard "RAS" orientation. | |
static UniformVolume::SmartPtr | ReadGridOriented (const char *path, const bool verbose=false) |
Read grid only from filesystem and bring into standard "RAS" orientation. | |
static UniformVolume::SmartPtr | ReadOriented (const char *path, const char *orientation, const bool verbose=false) |
Read image from filesystem and reorient to align anatomy with coordinate axes. | |
static UniformVolume::SmartPtr | ReadOriented (const char *path, const bool verbose=false) |
Read image from filesystem and reorient to align anatomy with coordinate axes of standard coordinate system ("RAS"). | |
static void | Write (const UniformVolume &volume, const FileFormatID format, const char *path, const bool verbose=false) |
Write volume data to filesystem. | |
static void | Write (const UniformVolume &volume, const char *pathAndFormat, const bool verbose=false) |
Write volume data to filesystem with automatic format parsing. | |
static void | SetWriteCompressedOn () |
Set flag for writing compressed images. | |
static void | SetWriteCompressedOff () |
Clear flag for writing compressed images. | |
static bool | GetWriteCompressed () |
Get flag for writing compressed images. | |
Static Private Attributes | |
static bool | WriteCompressedOn = true |
Global setting: write compressed images. |
Class for input/output of 3-D image data.
This class is an easy-to-use wrapper around all low-level image readers and writers.
An image can be read, for example from a Nifti/Analyze file pair, simply as follows:
cmtk::UniformVolume::SmartPtr volume( cmtk::VolumeIO::Read( "image.hdr" ) );
Note that we typically want images to be oriented consistently, so the preferred reader call would be:
cmtk::UniformVolume::SmartPtr volume( cmtk::VolumeIO::ReadOriented( "image.hdr" );
Similarly, we can write an image simply by calling
cmtk::VolumeIO::Write( volume, "image.hdr" );
The output format is determined automatically from the file name suffix. See
Definition at line 74 of file cmtkVolumeIO.h.
typedef VolumeIO cmtk::VolumeIO::Self |
This class.
Definition at line 78 of file cmtkVolumeIO.h.
static bool cmtk::VolumeIO::GetWriteCompressed | ( | ) | [inline, static] |
Get flag for writing compressed images.
Definition at line 148 of file cmtkVolumeIO.h.
static UniformVolume::SmartPtr cmtk::VolumeIO::ReadGridOriented | ( | const char * | path, |
const bool | verbose = false |
||
) | [inline, static] |
Read grid only from filesystem and bring into standard "RAS" orientation.
Definition at line 90 of file cmtkVolumeIO.h.
static UniformVolume::SmartPtr cmtk::VolumeIO::ReadOriented | ( | const char * | path, |
const bool | verbose = false |
||
) | [inline, static] |
Read image from filesystem and reorient to align anatomy with coordinate axes of standard coordinate system ("RAS").
path | Filesystem path of the image to read. |
verbose | Flag for verbose operation: if true, write status information to standard error. |
Definition at line 110 of file cmtkVolumeIO.h.
static void cmtk::VolumeIO::SetWriteCompressedOff | ( | ) | [inline, static] |
Clear flag for writing compressed images.
Definition at line 142 of file cmtkVolumeIO.h.
static void cmtk::VolumeIO::SetWriteCompressedOn | ( | ) | [inline, static] |
Set flag for writing compressed images.
Definition at line 136 of file cmtkVolumeIO.h.