Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkImageReslice Class Reference

Reslices a volume along the axes specified. More...

#include <vtkImageReslice.h>

Inheritance diagram for vtkImageReslice:

Inheritance graph
[legend]
Collaboration diagram for vtkImageReslice:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetResliceAxes (vtkMatrix4x4 *)
virtual vtkMatrix4x4GetResliceAxes ()
virtual void SetResliceTransform (vtkAbstractTransform *)
virtual vtkAbstractTransformGetResliceTransform ()
virtual void SetWrap (int)
virtual int GetWrap ()
virtual void WrapOn ()
virtual void WrapOff ()
virtual void SetMirror (int)
virtual int GetMirror ()
virtual void MirrorOn ()
virtual void MirrorOff ()
virtual void SetInterpolationMode (int)
virtual int GetInterpolationMode ()
void SetInterpolationModeToNearestNeighbor ()
void SetInterpolationModeToLinear ()
void SetInterpolationModeToCubic ()
const char * GetInterpolationModeAsString ()
virtual void SetOptimization (int)
virtual int GetOptimization ()
virtual void OptimizationOn ()
virtual void OptimizationOff ()
virtual void SetBackgroundColor (float, float, float, float)
virtual void SetBackgroundColor (float[4])
virtual float * GetBackgroundColor ()
virtual void GetBackgroundColor (float &, float &, float &, float &)
virtual void GetBackgroundColor (float[4])
void SetBackgroundLevel (float v)
float GetBackgroundLevel ()
virtual void SetOutputSpacing (float, float, float)
virtual void SetOutputSpacing (float[3])
virtual float * GetOutputSpacing ()
virtual void GetOutputSpacing (float &, float &, float &)
virtual void GetOutputSpacing (float[3])
virtual void SetOutputOrigin (float, float, float)
virtual void SetOutputOrigin (float[3])
virtual float * GetOutputOrigin ()
virtual void GetOutputOrigin (float &, float &, float &)
virtual void GetOutputOrigin (float[3])
virtual void SetOutputExtent (int, int, int, int, int, int)
virtual void SetOutputExtent (int[6])
virtual int * GetOutputExtent ()
virtual void GetOutputExtent (int &, int &, int &, int &, int &, int &)
virtual void GetOutputExtent (int[6])
virtual void SetOutputAlwaysCenteredOnInput (int)
virtual int GetOutputAlwaysCenteredOnInput ()
virtual void OutputAlwaysCenteredOnInputOn ()
virtual void OutputAlwaysCenteredOnInputOff ()
unsigned long int GetMTime ()
vtkMatrix4x4GetIndexMatrix ()
int FindExtent (int &r1, int &r2, float *point, float *xAxis, int *inMin, int *inMax, int *outExt)
void SetInterpolate (int t)
void InterpolateOn ()
void InterpolateOff ()
int GetInterpolate ()

Static Public Methods

vtkImageReslice * New ()
int IsTypeOf (const char *type)
vtkImageReslice * SafeDownCast (vtkObject *o)

Protected Methods

 vtkImageReslice ()
 ~vtkImageReslice ()
 vtkImageReslice (const vtkImageReslice &)
void operator= (const vtkImageReslice &)
void ExecuteInformation (vtkImageData *input, vtkImageData *output)
void ExecuteInformation ()
void ComputeInputUpdateExtent (int inExt[6], int outExt[6])
void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, int ext[6], int id)
void OptimizedComputeInputUpdateExtent (int inExt[6], int outExt[6])
void OptimizedThreadedExecute (vtkImageData *inData, vtkImageData *outData, int ext[6], int id)

Protected Attributes

vtkMatrix4x4ResliceAxes
vtkAbstractTransformResliceTransform
vtkMatrix4x4IndexMatrix
int Wrap
int Mirror
int InterpolationMode
int Optimization
float BackgroundColor [4]
float OutputOrigin [3]
float OutputSpacing [3]
int OutputExtent [6]
int OutputAlwaysCenteredOnInput

Detailed Description

Reslices a volume along the axes specified.

Date:
2000/12/10 20:08:24
Revision:
1.40
Thanks:
Thanks to David G. Gobbi who developed this class.
vtkImageReslice will re-grid a volume along the axes specified by a matrix. The extent, origin, and sample spacing of the output data can also be set.

The primary uses of this class are to extract either oblique or orthogonal slices from a volume, or to apply either a linear, perspective, or warp transformation to a volume.

This class is the swiss-army-knife of image geometry filters: It can permute, flip, rotate, scale, resample, and pad image data in any combination at similar efficiency to the specialized image filters that do the same things.

Warning:
This filter is very inefficient if the output X dimension is 1.
See also:
vtkAbstractTransform vtkMatrix4x4
Examples:
vtkImageReslice (examples)


Member Function Documentation

virtual const char* vtkImageReslice::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageToImageFilter.

vtkMatrix4x4* vtkImageReslice::GetIndexMatrix  
 

Helper functions not meant to be used outside this class.

unsigned long int vtkImageReslice::GetMTime   [virtual]
 

When determining the modified time of the filter, this check the modified time of the transform and matrix.

Reimplemented from vtkObject.

virtual int vtkImageReslice::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageToImageFilter.

int vtkImageReslice::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageToImageFilter.

vtkImageReslice* vtkImageReslice::New   [static]
 

Instantiate object with no start, end, or progress methods.

Reimplemented from vtkImageToImageFilter.

virtual void vtkImageReslice::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImageToImageFilter.

vtkImageReslice* vtkImageReslice::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageToImageFilter.

virtual void vtkImageReslice::SetBackgroundColor float   ,
float   ,
float   ,
float   
[virtual]
 

Set the background color (for multi-component images).

void vtkImageReslice::SetBackgroundLevel float    v [inline]
 

Set background grey level (for single-component images).

void vtkImageReslice::SetInterpolate int    t [inline]
 

Convenient methods for switching between nearest-neighbor and linear interpolation (default: off).

virtual void vtkImageReslice::SetInterpolationMode int    [virtual]
 

Set interpolation mode (default: nearest neighbor).

virtual void vtkImageReslice::SetMirror int    [virtual]
 

Turn on mirror-pad feature (default: off). This will override the wrap-pad, if set.

virtual void vtkImageReslice::SetOptimization int    [virtual]
 

Turn on and off optimizations (default on, they should only be turned off for testing purposes).

virtual void vtkImageReslice::SetOutputSpacing float   ,
float   ,
float   
[virtual]
 

Spacing, origin, and extent of output data. The OutputSpacing default is (1,1,1), and the default OutputOrigin and OutputExtent are set to cover the entire transformed input extent. NOTE: The OutputOrigin and OutputExtent values are only used if OutputAlwaysCenteredOnInputOff. Otherwise, they are automatically computed.

virtual void vtkImageReslice::SetResliceAxes vtkMatrix4x4   [virtual]
 

Use this method, in conjunction with SetOutputOrigin(), SetOutputSpacing() and SetOutputExtent(), to set up a grid of points at which to resample the input.

The Axes specify the axes of the resampling grid, the OutputSpacing specifies the grid spacing, the OutputOrigin specifies the location of the origin of the grid (i.e the coordinates of voxel index (0,0,0) in the coordinate system specified by the Axes), and the OutputExtent specifies the size of resampling grid i.e. the ranges of the (i,j,k) indices.

The first column of the matrix specifies the x-axis vector (set the fourth element to zero), the second column specifies the y-axis, and the third column the z-axis. The fourth column specifies the origin of the axes (set the fourth element to one). The matrix can be used to specify a perspective transformation (i.e. non-zero fourth elements for the axes), but the matrix must be invertible.

virtual void vtkImageReslice::SetResliceTransform vtkAbstractTransform   [virtual]
 

Set a transform to be applied to the resampling grid that was specified in SetResliceAxes().

Note that applying a transform to the resampling grid is equivalent to applying the inverse of the same transform to the image before resampling it. Nonlinear transforms can be used here.

virtual void vtkImageReslice::SetWrap int    [virtual]
 

Turn on wrap-pad feature (default: off).

void vtkImageReslice::ThreadedExecute vtkImageData   inData,
vtkImageData   outData,
int    ext[6],
int    id
[protected, virtual]
 

If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method. It is public so that the thread functions can call this method.

Reimplemented from vtkImageToImageFilter.


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:26:54 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002