NIREP

Checkerboard Class Reference

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

Inheritance diagram for Checkerboard:
Collaboration diagram for Checkerboard:

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)
void SetSecondImage (vtkImageData *image)
virtual void SetWindow (double)
virtual vtkActor * SyncAddPolyData (vtkPolyData *polydata, vtkProperty *property=NULL, double thickness=0.2)
virtual void UpdatePosition ()
 vtkGetObjectMacro (SecondImage, vtkImageData)
 vtkTypeRevisionMacro (Checkerboard, NIREPvtkViewImage2D)

Static Public Member Functions

static CheckerboardNew ()

Protected Member Functions

 Checkerboard ()
void UpdateImageActor ()
 ~Checkerboard ()

Protected Attributes

vtkImageData * AuxInputTwo
 internal use: image to input to the mask filter or image blender
vtkCheckerboardRepresentation * CheckerboardRepresentation
vtkCheckerboardWidget * CheckerboardWidget
 checkerboard classes from vtk
vtkImageCheckerboard * ImageCheckerboard
vtkImageReslice * ImageResliceTwo
vtkImageBlendWithMask * MaskFilterTwo
vtkImageData * ResliceInputTwo
 internal use: image to input to the reslicer
vtkImageData * SecondImage
vtkImageMapToColors * WindowLevelTwo
 to map the image to the current window level

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

Checkerboard::Checkerboard ( ) [protected]
Checkerboard::~Checkerboard ( ) [protected]

Member Function Documentation

vtkActor * Checkerboard::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 Checkerboard* Checkerboard::New ( ) [static]

Reimplemented from NIREPvtkViewImage2D.

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

Set the image to display.

Reimplemented from NIREPvtkViewImage2D.

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

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

Reimplemented from NIREPvtkViewImage2D.

void Checkerboard::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 Checkerboard::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 Checkerboard::SetSecondImage ( vtkImageData *  image)

Set a second image, which will be the second input into the checkerboard widget.

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

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

Reimplemented from NIREPvtkViewImage2D.

vtkActor * Checkerboard::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 Checkerboard::UpdateImageActor ( ) [protected]

GEC NOT SURE ABOUT LINES BELOW YET

Reimplemented from NIREPvtkViewImage2D.

void Checkerboard::UpdatePosition ( void  ) [virtual]

Updates the position of the image.

Reimplemented from NIREPvtkViewImage2D.

Checkerboard::vtkGetObjectMacro ( SecondImage  ,
vtkImageData   
)

Get the overlapping image (if any).

Checkerboard::vtkTypeRevisionMacro ( Checkerboard  ,
NIREPvtkViewImage2D   
)

Member Data Documentation

vtkImageData* Checkerboard::AuxInputTwo [protected]

internal use: image to input to the mask filter or image blender

vtkCheckerboardRepresentation* Checkerboard::CheckerboardRepresentation [protected]
vtkCheckerboardWidget* Checkerboard::CheckerboardWidget [protected]

checkerboard classes from vtk

vtkImageCheckerboard* Checkerboard::ImageCheckerboard [protected]
vtkImageReslice* Checkerboard::ImageResliceTwo [protected]

vtkImageReslice is the swiss-army-knife of image geometry filters: It can permute, rotate, flip, scale, resample, deform, and pad image data in any combination with reasonably high efficiency.

vtkImageBlendWithMask* Checkerboard::MaskFilterTwo [protected]
vtkImageData* Checkerboard::ResliceInputTwo [protected]

internal use: image to input to the reslicer

vtkImageData* Checkerboard::SecondImage [protected]
vtkImageMapToColors* Checkerboard::WindowLevelTwo [protected]

to map the image to the current window level

 All Classes Functions Variables Typedefs Enumerations Enumerator