Class for building 3D fields from slice image data. More...
#include <cmtkVolumeFromSlices.h>
Public Member Functions | |
VolumeFromSlices () | |
Default constructor. | |
virtual | ~VolumeFromSlices () |
Virtual dummy destructor. | |
Protected Member Functions | |
void | InitSequence (const ScalarImage *image, const unsigned int numberOfSlices) |
Start creation of new volume. | |
virtual char * | AllocDataArray (const int bytesperpixel, const int data_size) const |
Allocate memory for the 3D image data. | |
virtual TypedArray::SmartPtr | EncapDataArray (const ScalarDataType dtype, void *const data, const int data_size) const |
Put image data into a custom data structure. | |
const char * | FillPlane (unsigned int &plane, const ScalarImage *image) |
Copy one slice of data into field. | |
UniformVolume::SmartPtr | FinishVolume (Types::Coordinate &sliceOffset, int &sliceDirection) |
Finish volume creation and free temporary storage. | |
UniformVolume::SmartPtr | FinishVolume () |
Finish volume creation without additional information. | |
virtual UniformVolume::SmartPtr | ConstructVolume (const DataGrid::IndexType &Dims, const UniformVolume::CoordinateVectorType &Size, const Types::Coordinate *Points[3], TypedArray::SmartPtr &Data) const |
Construct Volume object. | |
const char * | CheckImage (const int plane, const ScalarImage *image, const unsigned int frame=0) |
Check image consistency. | |
virtual void | HandleError (const char *message) const |
Handle an error condition. | |
Private Attributes | |
DataGrid::IndexType | Dims |
Dimensions of the 3D data. | |
UniformVolume::CoordinateVectorType | Size |
Size of the 3D data. | |
Types::Coordinate * | Points [3] |
Axes points of the constructed volume. | |
unsigned int | DataSize |
Number of voxels. | |
char * | RawData |
Pointer to the volume data. | |
TypedArray::SmartPtr | VolumeDataArray |
Volume data array. | |
int | BytesPerPixel |
Number of allocated bytes per voxel. | |
bool | SignBit |
Is the data signed? | |
ScalarDataType | DataType |
Primitive image data type. | |
Types::Coordinate | Spacing [2] |
Pixel calibration of the slice images. | |
ScalarImage::SpaceVectorType | FirstImagePosition |
X-coordinate of image origin. | |
ScalarImage::SpaceVectorType | ImagePosition |
X-coordinate of image origin. | |
ScalarImage::SpaceVectorType | ImageOrientation [2] |
X-coordinate of image origin. | |
int | IncX |
Coordinate increment in x-direction for every block copy operation. | |
int | IncY |
Coordinate increment in y-direction for every block copy operation. | |
int | BlockSize |
Number of continuous bytes that can be copied. | |
ScalarImage::SpaceVectorType | IncrementVector |
Vector between the origins of subsequent images. | |
bool | Padding |
Flag for pixel padding. | |
union { | |
unsigned char int8 | |
unsigned short int16 | |
unsigned int int32 | |
} | PaddingValue |
Class for building 3D fields from slice image data.
Definition at line 77 of file cmtkVolumeFromSlices.h.
cmtk::VolumeFromSlices::VolumeFromSlices | ( | ) | [inline] |
Default constructor.
Definition at line 81 of file cmtkVolumeFromSlices.h.
virtual cmtk::VolumeFromSlices::~VolumeFromSlices | ( | ) | [inline, virtual] |
Virtual dummy destructor.
Definition at line 84 of file cmtkVolumeFromSlices.h.
UniformVolume::SmartPtr cmtk::VolumeFromSlices::FinishVolume | ( | ) | [inline, protected] |
Finish volume creation without additional information.
If the additional information returned by the previous FinishVolume(...) function is not reuqired, this function may be called instead.
Definition at line 124 of file cmtkVolumeFromSlices.h.
virtual void cmtk::VolumeFromSlices::HandleError | ( | const char * | message ) | const [inline, protected, virtual] |
Handle an error condition.
Basically, this function is intended to notify the user of errors occurring during the volume building process, such as inconsistent images. By default, all errors are simply printed to the standard error output. Derived classes may override this function to provide environment-specific interaction.
message | A textual description of the error condition. |
Definition at line 176 of file cmtkVolumeFromSlices.h.
int cmtk::VolumeFromSlices::BlockSize [private] |
Number of continuous bytes that can be copied.
Definition at line 236 of file cmtkVolumeFromSlices.h.
int cmtk::VolumeFromSlices::BytesPerPixel [private] |
Number of allocated bytes per voxel.
Definition at line 209 of file cmtkVolumeFromSlices.h.
unsigned int cmtk::VolumeFromSlices::DataSize [private] |
Number of voxels.
Definition at line 200 of file cmtkVolumeFromSlices.h.
Primitive image data type.
Definition at line 215 of file cmtkVolumeFromSlices.h.
Dimensions of the 3D data.
This array is filled with the number of voxels in x-, y-, and z-direction.
Definition at line 185 of file cmtkVolumeFromSlices.h.
X-coordinate of image origin.
Definition at line 221 of file cmtkVolumeFromSlices.h.
X-coordinate of image origin.
Definition at line 227 of file cmtkVolumeFromSlices.h.
X-coordinate of image origin.
Definition at line 224 of file cmtkVolumeFromSlices.h.
Vector between the origins of subsequent images.
Once two images have been read, the difference of their origins in 3D space is copied to this field. The origins of subsequent slices must then be in the very same direction in order to make up a rectangular 3D volume.
Definition at line 244 of file cmtkVolumeFromSlices.h.
int cmtk::VolumeFromSlices::IncX [private] |
Coordinate increment in x-direction for every block copy operation.
Definition at line 230 of file cmtkVolumeFromSlices.h.
int cmtk::VolumeFromSlices::IncY [private] |
Coordinate increment in y-direction for every block copy operation.
Definition at line 233 of file cmtkVolumeFromSlices.h.
unsigned short cmtk::VolumeFromSlices::int16 |
Definition at line 256 of file cmtkVolumeFromSlices.h.
unsigned int cmtk::VolumeFromSlices::int32 |
Definition at line 257 of file cmtkVolumeFromSlices.h.
unsigned char cmtk::VolumeFromSlices::int8 |
Definition at line 255 of file cmtkVolumeFromSlices.h.
bool cmtk::VolumeFromSlices::Padding [private] |
Flag for pixel padding.
If this flag is set, PaddingValue defines a non-data value for padded pixels.
Definition at line 250 of file cmtkVolumeFromSlices.h.
union { ... } cmtk::VolumeFromSlices::PaddingValue [private] |
Types::Coordinate* cmtk::VolumeFromSlices::Points[3] [private] |
Axes points of the constructed volume.
During assembly of the 3D data, this array is filled with the positions of the grid points in all three dimensions.
Definition at line 197 of file cmtkVolumeFromSlices.h.
char* cmtk::VolumeFromSlices::RawData [private] |
Pointer to the volume data.
Definition at line 203 of file cmtkVolumeFromSlices.h.
bool cmtk::VolumeFromSlices::SignBit [private] |
Is the data signed?
Definition at line 212 of file cmtkVolumeFromSlices.h.
Size of the 3D data.
This array holds the extents of the 3D data in x-, y-, and z-direction. All values are in real-world coordinates, ie. [mm].
Definition at line 191 of file cmtkVolumeFromSlices.h.
Types::Coordinate cmtk::VolumeFromSlices::Spacing[2] [private] |
Pixel calibration of the slice images.
Definition at line 218 of file cmtkVolumeFromSlices.h.
Volume data array.
Definition at line 206 of file cmtkVolumeFromSlices.h.