NIREP

VectorField Class Reference

2D synchronized viewer of a 3D image. More...

Inheritance diagram for VectorField:
Collaboration diagram for VectorField:

List of all members.

Public Member Functions

virtual vtkActor * AddDataSet (vtkDataSet *dataset, vtkProperty *property=NULL)
virtual void SetImage (vtkImageData *image)
virtual void SetLevel (double)
virtual void SetLookupTable (vtkScalarsToColors *lut)
virtual void SetOrientation (unsigned int orientation)
virtual void SetWindow (double)
virtual vtkActor * SyncAddPolyData (vtkPolyData *polydata, vtkProperty *property=NULL, double thickness=0.2)
virtual void UpdatePosition ()
 vtkTypeRevisionMacro (VectorField, NIREPvtkViewImage2D)

Static Public Member Functions

static VectorFieldNew ()

Protected Member Functions

void UpdateImageActor ()
 VectorField ()
 ~VectorField ()

Protected Attributes

vtkActor * m_vectorActor

Detailed Description

2D synchronized viewer of a 3D image.

Author:
Pierre Fillard & Marc Traina & Nicolas Toussaint.

This class allows to view 2D orthogonal slices (namely axial, sagittal and coronal) of a 3D image. This class implements lots of features like: various possible interactions (positioning, zooming, windowing), coloring of the slice w.r.t. a lookup table, overlapping of a second image, overlapping of a mask image (image of labels). Display conventions can be chosen between radiologic (the left of the patient appears on the right of the screen) and neurologic (left is left and right is right).

It uses a synchronization mechanisms between other views. Views are linked together using a cycle graph structure (implemented in the base class


Constructor & Destructor Documentation

VectorField::VectorField ( ) [protected]
VectorField::~VectorField ( ) [protected]

Member Function Documentation

vtkActor * VectorField::AddDataSet ( vtkDataSet *  dataset,
vtkProperty *  property = NULL 
) [virtual]

Add a dataset to the view. The dataset will be display as an intersection of it with the displayed image slice, i.e., tetrahedron will be displayed as triangles, triangles as lines, lines as points. A vtkProperty can be specified to specify the freshly generated actor properties.

if (dataset->GetActualMemorySize() > 20000) { vtkWarningMacro(<< "DataSet is to big for this projection type !\n"); doit = false; }

Reimplemented from NIREPvtkViewImage2D.

static VectorField* VectorField::New ( ) [static]

Reimplemented from NIREPvtkViewImage2D.

void VectorField::SetImage ( vtkImageData *  image) [virtual]

Set the image to display.

Reimplemented from NIREPvtkViewImage2D.

void VectorField::SetLevel ( double  l) [virtual]

Set/Get window/level for mapping pixels to colors.

Reimplemented from NIREPvtkViewImage2D.

void VectorField::SetLookupTable ( vtkScalarsToColors *  lut) [virtual]

Set/Get a user-defined lookup table to color the image with.

In the case of a shift/scale, one must set the lut range to values without this shift/scale, because the object can be shared by different views.

Due to the same problem as above (shift/scale), one must copy the lut so that it does not change values of the shared object.

Reimplemented from NIREPvtkViewImage2D.

void VectorField::SetOrientation ( unsigned int  orientation) [virtual]

Set the orientation of the image.

Parameters:
orientation0 is XY (axial), 1 is YZ (sagittal), 2 is XZ (coronal).

Reimplemented from NIREPvtkViewImage2D.

void VectorField::SetWindow ( double  w) [virtual]

Set/Get window/level for mapping pixels to colors.

Reimplemented from NIREPvtkViewImage2D.

vtkActor * VectorField::SyncAddPolyData ( vtkPolyData *  polydata,
vtkProperty *  property = NULL,
double  thickness = 0.2 
) [virtual]

This method is similar to AddDataSet(), except it only works with vtkPolyData. It cuts the polydata using 2 planes defined by the current image slice being visualized and a user-provided thickness (generally the spacing between 2 consecutive slices). For instance, it works nicely with lines: AddDataSet() turns lines into points while AddPolyData() displays lines as short segments.

Reimplemented from NIREPvtkViewImage2D.

void VectorField::UpdateImageActor ( ) [protected]

Reimplemented from NIREPvtkViewImage2D.

void VectorField::UpdatePosition ( void  ) [virtual]

Updates the position of the image.

Reimplemented from NIREPvtkViewImage2D.

VectorField::vtkTypeRevisionMacro ( VectorField  ,
NIREPvtkViewImage2D   
)

Member Data Documentation

vtkActor* VectorField::m_vectorActor [protected]
 All Classes Functions Variables Typedefs Enumerations Enumerator