Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkICVolume Class Reference

mitkICVolume - a concrete data object to represent an in-core multi-dimensional medical image dataset More...

#include <mitkICVolume.h>

Inherits mitkVolume.

Inherited by mitkEuclideanSkeletonFeature.

Inheritance diagram for mitkICVolume:

Inheritance graph
[legend]
Collaboration diagram for mitkICVolume:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkICVolume ()
virtual int GetDataObjectType () const
virtual void const * GetData () const
virtual void * GetData ()
virtual void const * GetSliceForRead (int sliceIdx)
virtual void * GetSliceForWrite (int sliceIdx)
virtual void * GetSliceForReadWrite (int sliceIdx)
virtual bool ReadSliceData (int sliceIdx, void *dst)
virtual bool ReadYZSliceData (int xIdx, void *dst)
virtual bool ReadXZSliceData (int yIdx, void *dst)
virtual bool GetArbitrarySlice (int w, int h, double o[3], double ux[3], double uy[3], void *dst)
virtual bool WriteSliceData (int sliceIdx, void const *src)
virtual bool ReadSubVolume (int x, int y, int z, int w, int h, int d, int &tw, int &th, int &td, void *dst)
virtual bool WriteSubVolume (int x, int y, int z, int w, int h, int d, int &tw, int &th, int &td, void const *src)
virtual bool Allocate ()
virtual unsigned long long GetActualMemorySize () const
virtual void Initialize ()
virtual void ShallowCopy (mitkDataObject *src)
virtual void DeepCopy (mitkDataObject *src)

Detailed Description

mitkICVolume - a concrete data object to represent an in-core multi-dimensional medical image dataset

mitkICVolume is a concrete data object to represent an in-core multi-dimensional medical image dataset.


Constructor & Destructor Documentation

mitkICVolume::mitkICVolume  ) 
 

Default constructor.


Member Function Documentation

virtual bool mitkICVolume::Allocate  )  [virtual]
 

Allocate necessary space for holding the image data. It calculate the memory size using current Dimensions, DataType and NumberOfChannel settings. The equation is shown as follow:
Width * Height * SliceNum * sizeof(DataType) * NumberOfChannel
The previous allocated data will be deleted if exists.

Returns:
Return true if successful, otherwise return false.

Implements mitkVolume.

virtual void mitkICVolume::DeepCopy mitkDataObject src  )  [virtual]
 

Warning:
Don't call this function directly.

Reimplemented from mitkVolume.

virtual unsigned long long mitkICVolume::GetActualMemorySize  )  const [virtual]
 

Return the actual memory size occupied by the volume data. The unit is BYTE.

Returns:
Return the actual memory size occupied by this volume. The unit is BYTE.

Implements mitkDataObject.

virtual bool mitkICVolume::GetArbitrarySlice int  w,
int  h,
double  o[3],
double  ux[3],
double  uy[3],
void *  dst
[virtual]
 

Get arbitrary directional slice from the volume to a specified memory buffer (i.e. re-slicing).

Parameters:
w width of the new slice (in pixels)
h height of the new slice (in pixels)
o start position (left-bottom) of the new slice in the volume space
ux the step (in pixels) vector of moving to the next pixel along the x-direction of the new slice in the volume space
uy the step (in pixels) vector of moving to the next pixel along the y-direction of the new slice in the volume space
dst the pointer to the destination memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of destination memory buffer should be w * h * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual void* mitkICVolume::GetData  )  [inline, virtual]
 

Get data pointer of the volume data (changeable).

Returns:
Return a void pointer to data.
Note:
The returned type is void *, it must be converted to some useful data type according to the return value of GetDataType().
Warning:
The memory is deleted by destructor automatically, so clients shouldn't delete the pointer returned by this function.

Implements mitkVolume.

virtual void const* mitkICVolume::GetData  )  const [inline, virtual]
 

Get data pointer of the volume data (unchangeable).

Returns:
Return a void pointer to const data.
Note:
The returned type is void const *, it must be converted to some useful data type according to the return value of GetDataType().

Implements mitkVolume.

virtual int mitkICVolume::GetDataObjectType  )  const [inline, virtual]
 

Return the data object type.

Returns:
Always return MITK_IN_CORE_VOLUME

Reimplemented from mitkVolume.

virtual void const* mitkICVolume::GetSliceForRead int  sliceIdx  )  [virtual]
 

Get data pointer of a specified slice in the volume (for read only).

Parameters:
sliceIdx the index of the slice to get (in [0, GetImageNum()-1])
Returns:
Return a const void pointer to data.
Note:
The returned type is void const *, it must be converted to some useful data type according to the return value of GetDataType().
Warning:
The memory is deleted by destructor automatically, so clients shouldn't delete the pointer returned by this function.

Implements mitkVolume.

virtual void* mitkICVolume::GetSliceForReadWrite int  sliceIdx  )  [virtual]
 

Get data pointer of a specified slice in the volume (changeable).

Parameters:
sliceIdx the index of the slice to get (in [0, GetImageNum()-1])
Returns:
Return a void pointer to data.
Note:
The returned type is void *, it must be converted to some useful data type according to the return value of GetDataType().
Warning:
The memory is deleted by destructor automatically, so clients shouldn't delete the pointer returned by this function.

Implements mitkVolume.

virtual void* mitkICVolume::GetSliceForWrite int  sliceIdx  )  [virtual]
 

Get data pointer of a specified slice in the volume (for write only).

Parameters:
sliceIdx the index of the slice to get (in [0, GetImageNum()-1])
Returns:
Return a const void pointer to data.
Note:
The returned type is void *, it should be converted to some useful data type according to the return value of GetDataType(). This function returns an empty buffer for writing the specified slice the first time.
Warning:
The memory is deleted by destructor automatically, so clients shouldn't delete the pointer returned by this function.

Implements mitkVolume.

virtual void mitkICVolume::Initialize  )  [virtual]
 

Delete the allocated memory (if any) and initialize to default status.

Reimplemented from mitkVolume.

virtual void mitkICVolume::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkVolume.

virtual bool mitkICVolume::ReadSliceData int  sliceIdx,
void *  dst
[virtual]
 

Copy slice data from the volume to a specified memory buffer.

Parameters:
sliceIdx the index of the slice to read (in [0, GetImageNum()-1])
dst the pointer to the destination memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of destination memory buffer should be GetWidth() * GetHeight() * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual bool mitkICVolume::ReadSubVolume int  x,
int  y,
int  z,
int  w,
int  h,
int  d,
int &  tw,
int &  th,
int &  td,
void *  dst
[virtual]
 

Copy a sub-volume (start position = (x, y, z), size = w * h * d) from the volume to a specified memory buffer.

Parameters:
x the x-coordinate of the start point
y the y-coordinate of the start point
z the z-coordinate of the start point
w the width of the sub-volume
h the height of the sub-volume
d the depth of the sub-volume
tw return the true width of the sub-volume copied (in case that x+w > GetWidth())
th return the true height of the sub-volume copied (in case that y+h > GetHeight())
td return the true depth of the sub-volume copied (in case that z+d > GetSliceNum())
dst the pointer to the destination memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of destination memory buffer should be w * h * d * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual bool mitkICVolume::ReadXZSliceData int  yIdx,
void *  dst
[virtual]
 

Copy y-directional slice from the volume to a specified memory buffer.

Parameters:
yIdx the position of the y-directional slice to read (in [0, GetHeight()-1])
dst the pointer to the destination memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of destination memory buffer should be GetWidth() * GetImageNum() * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual bool mitkICVolume::ReadYZSliceData int  xIdx,
void *  dst
[virtual]
 

Copy x-directional slice from the volume to a specified memory buffer.

Parameters:
xIdx the position of the x-directional slice to read (in [0, GetWidth()-1])
dst the pointer to the destination memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of destination memory buffer should be GetHeight() * GetImageNum() * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual void mitkICVolume::ShallowCopy mitkDataObject src  )  [virtual]
 

Warning:
Don't call this function directly.

Reimplemented from mitkVolume.

virtual bool mitkICVolume::WriteSliceData int  sliceIdx,
void const *  src
[virtual]
 

Copy slice data from a specified memory buffer to the volume.

Parameters:
sliceIdx the index of the slice to write (in [0, GetImageNum()-1])
src the pointer to the source memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of source memory buffer should be GetWidth() * GetHeight() * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.

virtual bool mitkICVolume::WriteSubVolume int  x,
int  y,
int  z,
int  w,
int  h,
int  d,
int &  tw,
int &  th,
int &  td,
void const *  src
[virtual]
 

Copy a sub-volume (start position = (x, y, z), size = w * h * d) from a specified memory buffer to the volume.

Parameters:
x the x-coordinate of the start point
y the y-coordinate of the start point
z the z-coordinate of the start point
w the width of the sub-volume
h the height of the sub-volume
d the depth of the sub-volume
tw return the true width of the sub-volume copied (in case that x+w > GetWidth())
th return the true height of the sub-volume copied (in case that y+h > GetHeight())
td return the true depth of the sub-volume copied (in case that z+d > GetSliceNum())
src the pointer to the source memory buffer
Returns:
Return true if successful, otherwise return false.
Note:
The size of source memory buffer should be w * h * d * GetChannelNum() * GetDataTypeSize().

Implements mitkVolume.


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:03:12 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3