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

mitkVolume Class Reference

mitkVolume - an abstract class to represent a multi-dimensional medical image dataset More...

#include <mitkVolume.h>

Inherits mitkDataObject.

Inherited by mitkICVolume, and mitkOoCVolume.

Inheritance diagram for mitkVolume:

Inheritance graph
[legend]
Collaboration diagram for mitkVolume:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
virtual void Initialize ()
virtual int GetDataObjectType () const
void SetDimensions (int dims[3])
void GetDimensions (int dims[3]) const
void SetWidth (int w)
int GetWidth () const
void SetHeight (int h)
int GetHeight () const
void SetSliceNum (int s)
void SetImageNum (int s)
int GetSliceNum () const
int GetImageNum () const
int GetDimensionality () const
void SetSpacings (float s[3])
void GetSpacings (float s[3]) const
void SetSpacingX (float px)
float GetSpacingX () const
void SetSpacingY (float py)
float GetSpacingY () const
void SetSpacingZ (float pz)
float GetSpacingZ () const
void SetChannelNum (int n)
void SetNumberOfChannel (int n)
int GetChannelNum () const
int GetNumberOfChannel () const
void GetIncrements (int incs[3]) const
int GetIncrementX () const
int GetIncrementY () const
int GetIncrementZ () const
double GetData (int x, int y, int z, int c=0)
void GetPointGradient (int i, int j, int k, float g[3])
double GetDataTypeMin () const
double GetDataTypeMax () const
void SetWindowWidth (float wWidth)
void SetWindowCenter (float wCenter)
float GetWindowWidth ()
float GetWindowCenter ()
void GetWidthCenter (float &wWidth, float &wCenter)
bool HasWidthCenter () const
int GetDataTypeSize () const
void SetDataType (int data_type)
int GetDataType () const
void SetDataTypeToFloat ()
void SetDataTypeToDouble ()
void SetDataTypeToInt ()
void SetDataTypeToUnsignedInt ()
void SetDataTypeToLong ()
void SetDataTypeToUnsignedLong ()
void SetDataTypeToShort ()
void SetDataTypeToUnsignedShort ()
void SetDataTypeToUnsignedChar ()
void SetDataTypeToChar ()
void GetMinMaxValue (int sliceIdx, double &minValue, double &maxValue, bool needRecalculate=false)
void GetMinMaxValue (double &minValue, double &maxValue, bool needRecalculate=false)
virtual void ShallowCopy (mitkDataObject *src)
virtual void DeepCopy (mitkDataObject *src)
virtual void FreezeSlice (int sliceIdx)
virtual void UnFreezeSlice (int sliceIdx)
virtual void const * GetData () const =0
virtual void * GetData ()=0
void * GetSliceData (int sliceIdx)
virtual void const * GetSliceForRead (int sliceIdx)=0
virtual void * GetSliceForWrite (int sliceIdx)=0
virtual void * GetSliceForReadWrite (int sliceIdx)=0
virtual bool ReadSliceData (int sliceIdx, void *dst)=0
virtual bool ReadYZSliceData (int xIdx, void *dst)=0
virtual bool ReadXZSliceData (int yIdx, void *dst)=0
virtual bool GetArbitrarySlice (int w, int h, double o[3], double ux[3], double uy[3], void *dst)=0
virtual bool WriteSliceData (int sliceIdx, void const *src)=0
virtual bool ReadSubVolume (int x, int y, int z, int w, int h, int d, int &tw, int &th, int &td, void *dst)=0
virtual bool WriteSubVolume (int x, int y, int z, int w, int h, int d, int &tw, int &th, int &td, void const *src)=0
virtual bool Allocate ()=0

Detailed Description

mitkVolume - an abstract class to represent a multi-dimensional medical image dataset

mitkVolume is a very important class in MITK. And most algorithms may use it as input or output. In concept, it is a multi-dimensional dataset. You can access the property and actual data of this dataset through the interface provided by mitkVolume. mitkVolume supports 1D, 2D and 3D dataset, various data type, multi-channel image, and out-of-core data loading. Two examples using mitkVolume are given below.
Example 1: If you want to create a new volume and fill its data, for example, read a file into volume, the code snippet is:

    // mitkVolume is an abstract class, so you should new mitkICVolume
    // (for in-core data) or mitkOoCVolume (for out-of-core data) for actual
    // use.
    mitkVolume *aVolume = new mitkICVolume; // or mitkOoCVolume 
    aVolume->SetWidth(sliceWidth);
    aVolume->SetHeight(sliceHeight);
    aVolume->SetSliceNum(sliceNum); 
    aVolume->SetSpacingX(sliceSpacingX);
    aVolume->SetSpacingY(sliceSpacingY);
    aVolume->SetSpacingZ(sliceSpacingZ);    
    aVolume->SetChannelNum(sliceChannelNum);
    aVolume->SetDataType(sliceDataType);        
    // volume has got enough information, now allocate memory
    if (aVolume->Allocate())
    {
        Read the content of disk file to aVolume via WriteSliceData();
        Use aVolume ...;
    }
Example 2: If you want to read/access the content of a volume, the code snippet is:
    sliceWidth = aVolume->GetWidth();
    sliceHeight = aVolume->GetHeight();
    sliceNum = aVolume->GetSliceNum();
    sliceSpacingX = aVolume->GetSpacingX();
    sliceSpacingY = aVolume->GetSpacingY();
    sliceSpacingZ = aVolume->GetSpacingZ();
    sliceChannelNum = aVolume->GetChannelNum();
    sliceDataType = aVolume->GetDataType();     
    for(int i = 0; i < imageNum; i++)  //Access every slice data
    {
        sliceData = aVolume->GetSliceData(i); 
        // or using ReadSliceData() to copy data to a user specified buffer
        Process sliceData according to sliceDataType;
    }


Member Function Documentation

virtual bool mitkVolume::Allocate  )  [pure 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.

Implemented in mitkICVolume, and mitkOoCVolume.

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

Warning:
Don't call this function directly.

Implements mitkDataObject.

Reimplemented in mitkICVolume, and mitkOoCVolume.

virtual void mitkVolume::FreezeSlice int  sliceIdx  )  [inline, virtual]
 

Lock the physical memory containing sliceIdx'th slice data. (only useful for out-of-core volume data (mitkOoCVolume) to avoid swapping some slice data from memory buffer to disk buffer, i.e. to keep the returned pointer of some 'Get' functions, such as GetSliceData(), GetSliceForRead() and so on, always be valid until call UnFreezeSlice().

Parameters:
sliceIdx the index of the slice to freeze.

Reimplemented in mitkOoCVolume.

virtual bool mitkVolume::GetArbitrarySlice int  w,
int  h,
double  o[3],
double  ux[3],
double  uy[3],
void *  dst
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

int mitkVolume::GetChannelNum  )  const [inline]
 

Get the channel number of this volume.

Returns:
Return the channel number of this volume.
return 1 --- gray image
return 3 --- RGB image
return 4 --- RGBA image

virtual void* mitkVolume::GetData  )  [pure 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.

Implemented in mitkICVolume, and mitkOoCVolume.

virtual void const* mitkVolume::GetData  )  const [pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

double mitkVolume::GetData int  x,
int  y,
int  z,
int  c = 0
 

Get value of a specified voxel's channel.

Parameters:
x the x-coordinate of the voxel in the volume space (in [0, GetWidth()-1])
y the y-coordinate of the voxel in the volume space (in [0, GetHeight()-1])
z the y-coordinate of the voxel in the volume space (in [0, GetImageNum()-1])
c the channel of the specified voxel (in [0, GetChannelNum()-1])
Returns:
Return the value of the specified voxel's channel in double data type.
Note:
It is a safe but slow function. Use it carefully if you are concerned about the efficiency.

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

Return the data object type.

Returns:
Always return MITK_VOLUME

Reimplemented from mitkDataObject.

Reimplemented in mitkICVolume, and mitkOoCVolume.

int mitkVolume::GetDataType  )  const [inline]
 

Get data type of this volume. MITK supports various data type.

Returns:
All of the return values and their meaning are shown as follows:
MITK_CHAR The data type is char
MITK_UNSIGNED_CHAR The data type is unsigned char
MITK_SHORT The data type is short
MITK_UNSIGNED_SHORT The data type is unsigned short
MITK_INT The data type is int
MITK_UNSIGNED_INT The data type is unsigned int
MITK_LONG The data type is long
MITK_UNSIGNED_LONG The data type is unsigned long
MITK_FLOAT The data type is float
MITK_DOUBLE The data type is double

double mitkVolume::GetDataTypeMax  )  const [inline]
 

Get the maximum value of the data type of this volume.

Returns:
Return the maximum value of the data type of this volume.

double mitkVolume::GetDataTypeMin  )  const [inline]
 

Get the minimum value of the data type of this volume.

Returns:
Return the minimum value of the data type of this volume.

int mitkVolume::GetDataTypeSize  )  const [inline]
 

Get the size of the data type in bytes.

Returns:
Return the size of the data type in bytes.

int mitkVolume::GetDimensionality  )  const [inline]
 

Get the dimension of this volume. return 2 --- 2D image
return 3 --- 3D image

void mitkVolume::GetDimensions int  dims[3]  )  const [inline]
 

Get dimension in x, y, z direction of this volume.

Parameters:
dims[0] Return the dimension in x direction. It is equal to the return value of GetWidth()
dims[1] Return the dimension in y direction. It is equal to the return value of GetHeight()
dims[2] Return the dimension in z direction. It is equal to the return value of GetSliceNum()

int mitkVolume::GetHeight  )  const [inline]
 

Get the height of this volume (dimension in y).

Returns:
Return the height of this volume, the unit is pixel.

int mitkVolume::GetImageNum  )  const [inline]
 

Provided for convenience, just the same as GetSliceNum().

void mitkVolume::GetIncrements int  incs[3]  )  const [inline]
 

Get the increments in x, y and z directions.

Parameters:
incs[0] the increment in x directions. It is equal to the return value of GetIncrementX()
incs[1] the increment in y directions. It is equal to the return value of GetIncrementY()
incs[2] the increment in z directions. It is equal to the return value of GetIncrementZ()

int mitkVolume::GetIncrementX  )  const [inline]
 

Get the increment in x direction.

Returns:
Return the increment in x direction. If the channel number is channelNum, then the return value is channelNum.
Note:
This function is provided for the convenient traversal of the volume. It doesn't take data type of the volume into account. So if you get the data of a volume in void* form, you must convert it to unsigned char*, and the increment must multiply Sizeof(data type of volume).

int mitkVolume::GetIncrementY  )  const [inline]
 

Get the increment in y direction.

Returns:
Return the increment in y direction. If the channel number is channelNum, then the return value is channelNum * widthOfVolume.
Note:
This function is provided for the convenient traversal of the volume. It doesn't take data type of the volume into account. So if you get the data of a volume in void* form, you must convert it to unsigned char*, and the increment must multiply Sizeof(data type of volume).

int mitkVolume::GetIncrementZ  )  const [inline]
 

Get the increment in z direction.

Returns:
Return the increment in z direction. If the channel number is channelNum, then the return value is channelNum * widthOfVolume heightOfVolume.
Note:
This function is provided for the convenient traversal of the volume. It doesn't take data type of the volume into account. So if you get the data of a volume in void* form, you must convert it to unsigned char*, and the increment must multiply Sizeof(data type of volume).

void mitkVolume::GetMinMaxValue double &  minValue,
double &  maxValue,
bool  needRecalculate = false
 

Get the minimum and maximum data value of all the volume data.

Parameters:
minValue return the minimum data value
maxValue return the maximum data value
needRecalculate If needRecalculate=true, the minValue and maxValue need be recalculated. Otherwise, the cached value is returned directly.

void mitkVolume::GetMinMaxValue int  sliceIdx,
double &  minValue,
double &  maxValue,
bool  needRecalculate = false
 

Get the minimum and maximum data value in a specified slice.

Parameters:
sliceNum The specified slice number.
minValue return the minimum data value in the specified slice.
maxValue return the maximum data value in the specified slice.
needRecalculate If needRecalculate=true, the minValue and maxValue need be recalculated. Otherwise, the cached value is returned directly.

int mitkVolume::GetNumberOfChannel  )  const [inline]
 

Just the same as GetChannelNum().

void mitkVolume::GetPointGradient int  i,
int  j,
int  k,
float  g[3]
 

Useless. Obsolete.

void* mitkVolume::GetSliceData int  sliceIdx  )  [inline]
 

Provided for back compatibility, just the same as GetSliceForReadWrite().

virtual void const* mitkVolume::GetSliceForRead int  sliceIdx  )  [pure 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, GetSliceNum()-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.

Implemented in mitkICVolume, and mitkOoCVolume.

virtual void* mitkVolume::GetSliceForReadWrite int  sliceIdx  )  [pure virtual]
 

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

Parameters:
sliceIdx the index of the slice to get (in [0, GetSliceNum()-1])
Returns:
Return a const 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.

Implemented in mitkICVolume, and mitkOoCVolume.

virtual void* mitkVolume::GetSliceForWrite int  sliceIdx  )  [pure 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, GetSliceNum()-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.

Implemented in mitkICVolume, and mitkOoCVolume.

int mitkVolume::GetSliceNum  )  const [inline]
 

Get the slice/image number of this volume (dimension in z).

Returns:
Return the image/slice number of this volume.

void mitkVolume::GetSpacings float  s[3]  )  const [inline]
 

Get spacing information in x, y and z axis, the unit is mm.

Parameters:
s[0] Return the spacing (mm) in two adjacent voxels in x axis. It is equal to the return value of GetSpacingX()
s[1] Return the spacing (mm) in two adjacent voxels in y axis. It is equal to the return value of GetSpacingY()
s[2] Return the spacing (mm) in two adjacent voxels in z axis. It is equal to the return value of GetSpacingZ()

float mitkVolume::GetSpacingX  )  const [inline]
 

Get spacing information in x axis, the unit is mm.

Returns:
Return the spacing (mm) in two adjacent voxels in x axis.

float mitkVolume::GetSpacingY  )  const [inline]
 

Get spacing information in y axis, the unit is mm.

Returns:
Return the spacing (mm) in two adjacent voxels in y axis.

float mitkVolume::GetSpacingZ  )  const [inline]
 

Get spacing information in z axis, the unit is mm.

Returns:
Return the spacing (mm) in two adjacent voxels in z axis.

int mitkVolume::GetWidth  )  const [inline]
 

Get the width of this volume (dimension in x).

Returns:
Return the width of this volume, the unit is pixel.

void mitkVolume::GetWidthCenter float &  wWidth,
float &  wCenter
 

Get the window width and center for display in mitkImageScene.

Parameters:
wWidth Return the window width of this volume.
wCenter Return the window center of this volume.

float mitkVolume::GetWindowCenter  ) 
 

Get the window center for display in mitkImageScene.

Returns:
Return the window center of this volume.

float mitkVolume::GetWindowWidth  ) 
 

Get the window width for display in mitkImageScene.

Returns:
Return the window width of this volume.

bool mitkVolume::HasWidthCenter  )  const [inline]
 

Get the flag which indicates whether this volume has window width and center

Returns:
Return true --- This volume has window width/center Return false --- This volume has not window width/center

virtual void mitkVolume::Initialize  )  [virtual]
 

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

Implements mitkDataObject.

Reimplemented in mitkICVolume, and mitkOoCVolume.

virtual void mitkVolume::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 mitkDataObject.

Reimplemented in mitkICVolume, and mitkOoCVolume.

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

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

Parameters:
sliceIdx the index of the slice to read (in [0, GetSliceNum()-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().

Implemented in mitkICVolume, and mitkOoCVolume.

virtual bool mitkVolume::ReadSubVolume int  x,
int  y,
int  z,
int  w,
int  h,
int  d,
int &  tw,
int &  th,
int &  td,
void *  dst
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

virtual bool mitkVolume::ReadXZSliceData int  yIdx,
void *  dst
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

virtual bool mitkVolume::ReadYZSliceData int  xIdx,
void *  dst
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

void mitkVolume::SetChannelNum int  n  )  [inline]
 

Set the channel number of this volume.

Parameters:
n The channel number of this volume.
n = 1 --- gray image
n = 3 --- RGB image
n = 4 --- RGBA image

void mitkVolume::SetDataType int  data_type  ) 
 

Set data type of this volume. MITK supports various data type.

Parameters:
data_type Its valid value and meaning is shown as follows:
MITK_CHAR The data type is char
MITK_UNSIGNED_CHAR The data type is unsigned char
MITK_SHORT The data type is short
MITK_UNSIGNED_SHORT The data type is unsigned short
MITK_INT The data type is int
MITK_UNSIGNED_INT The data type is unsigned int
MITK_LONG The data type is long
MITK_UNSIGNED_LONG The data type is unsigned long
MITK_FLOAT The data type is float
MITK_DOUBLE The data type is double

void mitkVolume::SetDataTypeToChar  )  [inline]
 

Set data type of this volume to char.

void mitkVolume::SetDataTypeToDouble  )  [inline]
 

Set data type of this volume to double.

void mitkVolume::SetDataTypeToFloat  )  [inline]
 

Set data type of this volume to float.

void mitkVolume::SetDataTypeToInt  )  [inline]
 

Set data type of this volume to int.

void mitkVolume::SetDataTypeToLong  )  [inline]
 

Set data type of this volume to long.

void mitkVolume::SetDataTypeToShort  )  [inline]
 

Set data type of this volume to short.

void mitkVolume::SetDataTypeToUnsignedChar  )  [inline]
 

Set data type of this volume to unsigned char.

void mitkVolume::SetDataTypeToUnsignedInt  )  [inline]
 

Set data type of this volume to unsigned int.

void mitkVolume::SetDataTypeToUnsignedLong  )  [inline]
 

Set data type of this volume to unsigned long.

void mitkVolume::SetDataTypeToUnsignedShort  )  [inline]
 

Set data type of this volume to unsigned short.

void mitkVolume::SetDimensions int  dims[3]  )  [inline]
 

Set dimension in x, y, z direction of this volume.

Parameters:
dims[0] the dimension in x direction
dims[1] the dimension in y direction
dims[2] the dimension in z direction

void mitkVolume::SetHeight int  h  )  [inline]
 

Set the height of this volume (dimension in y).

Parameters:
h The height of this volume, the unit is pixel.

void mitkVolume::SetImageNum int  s  )  [inline]
 

Provided for convenience, just the same as SetSliceNum().

void mitkVolume::SetNumberOfChannel int  n  )  [inline]
 

Just the same as SetChannelNum().

void mitkVolume::SetSliceNum int  s  )  [inline]
 

Set the slice/image number of this volume (dimension in z).

Parameters:
s The image/slice number of this volume.

void mitkVolume::SetSpacings float  s[3]  )  [inline]
 

Set spacing information in x, y and z axis, the unit is mm.

Parameters:
s[0] the spacing (mm) in two adjacent voxels in x axis.
s[1] the spacing (mm) in two adjacent voxels in y axis.
s[2] the spacing (mm) in two adjacent voxels in z axis.

void mitkVolume::SetSpacingX float  px  )  [inline]
 

Set spacing information in x axis, the unit is mm.

Parameters:
px the spacing (mm) in two adjacent voxels in x axis.

void mitkVolume::SetSpacingY float  py  )  [inline]
 

Set spacing information in y axis, the unit is mm.

Parameters:
py the spacing (mm) in two adjacent voxels in y axis.

void mitkVolume::SetSpacingZ float  pz  )  [inline]
 

Set spacing information in z axis, the unit is mm.

Parameters:
pz the spacing (mm) in two adjacent voxels in z axis.

void mitkVolume::SetWidth int  w  )  [inline]
 

Set the width of this volume (dimension in x).

Parameters:
w The width of this volume, the unit is pixel.

void mitkVolume::SetWindowCenter float  wCenter  )  [inline]
 

Set the window center for display in mitkImageScene.

Parameters:
wCenter The window center. For some image files, they contain the window width/center information in file header, for example, DICOM files. In this situation, the window width/center is got directly from the file header. In other situations, the window width/center is calculate from the data of the volume.

void mitkVolume::SetWindowWidth float  wWidth  )  [inline]
 

Set the window width for display in mitkImageScene.

Parameters:
wWidth The window width. For some image files, they contain the window width/center information in file header, for example, DICOM files. In this situation, the window width/center is got directly from the file header. In other situations, the window width/center is calculate from the data of the volume.

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

Warning:
Don't call this function directly.

Implements mitkDataObject.

Reimplemented in mitkICVolume, and mitkOoCVolume.

virtual void mitkVolume::UnFreezeSlice int  sliceIdx  )  [inline, virtual]
 

Unlock the physical memory containing sliceIdx'th slice data.

Parameters:
sliceIdx the index of the slice to un-freeze.
See also:
FreezeSlice()

Reimplemented in mitkOoCVolume.

virtual bool mitkVolume::WriteSliceData int  sliceIdx,
void const *  src
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.

virtual bool mitkVolume::WriteSubVolume int  x,
int  y,
int  z,
int  w,
int  h,
int  d,
int &  tw,
int &  th,
int &  td,
void const *  src
[pure 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().

Implemented in mitkICVolume, and mitkOoCVolume.


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