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

mitkVolumeResizeFilter Class Reference

mitkVolumeResizeFilter - a concrete filter class to zoom the specified volume More...

#include <mitkVolumeResizeFilter.h>

Inherits mitkVolumeToVolumeFilter.

Inheritance diagram for mitkVolumeResizeFilter:

Inheritance graph
[legend]
Collaboration diagram for mitkVolumeResizeFilter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
void SetZoomSize (int const xzoomsize, int const yzoomsize, int const zzoomsize)
void SetZoomRate (float const xzoomrate, float const yzoomrate, float const zzoomrate)

Detailed Description

mitkVolumeResizeFilter - a concrete filter class to zoom the specified volume

mitkVolumeResizeFilter is a concrete filter class which inherits from volume to volume filter to zoom the specified volume. This filter needs a volume input and generates a volume output. So you should first input a volume using public member function SetInput(), then you should set zoom parameters using SetZoomSize(const int, const int, const int)(represents demanded width,height and image number respectively) or SetZoomRate(const float, const float, const float) (represents zoom rate of demanded width, height and image number respectively, if the corresponding parameter value is bigger than 1.0, it means "zoom in", and if the corresponding parameter value is smaller than 1.0,it means "zoom out". Two examples using mitkVolumeResizeFilter are given below.
Example 1: If you want to zoom volume using SetZoomSize() the code snippet is:

    mitkVolumeResizeFilter *filter = new mitkVolumeResizeFilter;
    filter->SetInput(inVolume);
    filter->SetZoomSize(targetwidth,targetheight,targetimagenumber);
    if (filter->Run())
    {
          mitkVolume * outVolume = filter->GetOutput();
           Using  outVolume... 
    }
Example 2: If you want to zoom volume using SetZoomRate() the code snippet is:
    mitkVolumeResizeFilter *filter = new mitkVolumeResizeFilter;
    filter->SetInput(inVolume);
    filter->SetZoomRate(widthzoomrate,heightzoomrate,imagenumberzoomrate);
    if (filter->Run())
    {
          mitkVolume * outVolume = filter->GetOutput();
          Using outVolume...
    }
Note:
The inpute size must >= 2x2x2!


Member Function Documentation

virtual void mitkVolumeResizeFilter::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 mitkVolumeToVolumeFilter.

void mitkVolumeResizeFilter::SetZoomRate float const   xzoomrate,
float const   yzoomrate,
float const   zzoomrate
 

Call SetProperty() to set property of the target volume(the output volume) with the specified zoom rate in each direction which is demanded by user.

Parameters:
xzoomrate The specified zoom rate in direction x demanded by user.
yzoomrate The specified zoom rate in direction y demanded by user.
zzoomrate The specified zoom rate in direction z demanded by user.
Returns:
Return true if this setting process is successful,otherwise return false.

void mitkVolumeResizeFilter::SetZoomSize int const   xzoomsize,
int const   yzoomsize,
int const   zzoomsize
 

Call SetProperty() to set property of the target volume(the output volume) with the specified width,height and image numbers which is demanded by user.

Parameters:
xzoomsize The specified target width demanded by user
yzoomsize The specified target height demanded by user
zzoomsize The specified target image numbers demanded by user
Returns:
Return true if this setting process is successful,otherwise return false.


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