SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | List of all members
svkOverlayViewController Class Reference

#include <svkOverlayViewController.h>

Inheritance diagram for svkOverlayViewController:
svkDataViewController

Public Types

enum  InteractorStyle { SELECTION, WINDOW_LEVEL, COLOR_OVERLAY, ROTATION }
 
enum  WindowLevelTarget { REFERENCE_IMAGE = 0, IMAGE_OVERLAY }
 Enum for window level targets. More...
 

Public Member Functions

 vtkTypeMacro (svkOverlayViewController, svkDataViewController)
 
 svkOverlayViewController ()
 
 ~svkOverlayViewController ()
 
virtual void SetInput (svkImageData *data, int index=0)
 
virtual void SetSlice (int slice)
 
virtual void SetSlice (int slice, bool centerImage)
 
virtual void SetSlice (int slice, svkDcmHeader::Orientation orientation)
 
virtual int GetImageSlice (svkDcmHeader::Orientation sliceOrientation=svkDcmHeader::UNKNOWN_ORIENTATION)
 
virtual void SetRWInteractor (vtkRenderWindowInteractor *)
 
virtual void TurnPropOn (int propIndex)
 
virtual void TurnPropOff (int propIndex)
 
virtual int * GetTlcBrc ()
 
virtual void SetTlcBrc (int *tlcBrc)
 
void SetOverlayOpacity (double opacity)
 
void SetOverlayThreshold (double threshold)
 
double GetOverlayThreshold ()
 
double GetOverlayThresholdValue ()
 
void SetLevel (double level, WindowLevelTarget target=REFERENCE_IMAGE)
 
double GetLevel (WindowLevelTarget target=REFERENCE_IMAGE)
 
void SetWindow (double window, WindowLevelTarget target=REFERENCE_IMAGE)
 
double GetWindow (WindowLevelTarget target=REFERENCE_IMAGE)
 
int GetCurrentStyle ()
 
void SetCurrentStyle (int style)
 
void UseWindowLevelStyle ()
 Switches to the window level style interactor. More...
 
void UseColorOverlayStyle ()
 Switches to the window level style interactor. More...
 
void UseSelectionStyle ()
 Switches to the selection style interactor. More...
 
void UseRotationStyle ()
 Switches to the rotation style interactor. More...
 
void ResetWindowLevel ()
 Resets the window level, source taken from vtkImageViewer2. More...
 
void HighlightSelectionVoxels ()
 
void Reset ()
 
string GetDataCompatibility (svkImageData *data, int targetIndex)
 
void SetInterpolationType (int interpolationType)
 
void SetLUT (svkLookupTable::svkLookupTableType type)
 
void TurnOrthogonalImagesOn ()
 
void TurnOrthogonalImagesOff ()
 
bool IsImageInsideSpectra ()
 
- Public Member Functions inherited from svkDataViewController
 vtkTypeMacro (svkDataViewController, vtkObject)
 
 svkDataViewController ()
 Constructor. More...
 
 ~svkDataViewController ()
 Destructor. More...
 
virtual svkImageDataGetData (int index=0)
 
virtual void SetView (svkDataView *view)
 Set input data and initialize default range values. More...
 
virtual svkDataViewGetView ()
 
virtual int GetSlice ()
 
virtual void SetWindowLevelRange (double lower, double upper, int index)
 
virtual vtkRenderWindowInteractor * GetRWInteractor ()
 

Static Public Member Functions

static svkOverlayViewControllerNew ()
 

Protected Types

enum  DataInputs { MRI = 0, MR4D = 1, MET = 2 }
 enum represents data indicies More...
 

Protected Attributes

bool visualizationCreated
 enum represents data indicies More...
 
vtkRenderWindow * myRenderWindow
 the views render window More...
 
vtkCallbackCommand * cursorLocationCB
 callback that responds to mouse movements to update cursor location display More...
 
vtkCallbackCommand * dragSelectionCB
 callback that responds to left click to highlight voxels More...
 
vtkCallbackCommand * colorOverlayCB
 callback that responds to left click to highlight voxels More...
 
vtkCallbackCommand * interactorSwitchCB
 
vtkTextActor * mousePositionText
 the actor that represents the mouse location More...
 
vtkRenderer * mouseLocRenderer
 the renderer used to display the mouse location More...
 
vtkInteractorObserver * windowLevelStyle
 interactor style for window leveling More...
 
vtkInteractorObserver * colorOverlayStyle
 interactor style for window leveling More...
 
vtkInteractorObserver * rotationStyle
 interactor style for 3D rotation More...
 
svkOverlaySelectordragSelectStyle
 interactor style for selecting voxels More...
 
vtkActor * scanBoundryActor
 actor that represents the scan boundry More...
 
double initialColorWindowLevel [2]
 
int pickPos [2]
 
double startOpacity
 
int currentInteractorStyle
 
- Protected Attributes inherited from svkDataViewController
vector< svkImageData * > dataVector
 
svkDataViewview
 
vtkRenderWindowInteractor * rwi
 

Detailed Description

svkOverlayViewController is a concrete implementation of DataViewController. It is designed to work with the svkOverlayView to create a workspace for overlaying the spatial location of spectroscopy voxels, with the anatomical image from the same scan.

Member Enumeration Documentation

enum DataInputs
protected

enum represents data indicies

Enumerator
MRI 
MR4D 
MET 
Enumerator
SELECTION 
WINDOW_LEVEL 
COLOR_OVERLAY 
ROTATION 

Enum for window level targets.

Enumerator
REFERENCE_IMAGE 
IMAGE_OVERLAY 

Constructor & Destructor Documentation

Member Function Documentation

int GetCurrentStyle ( )
string GetDataCompatibility ( svkImageData data,
int  targetIndex 
)
int GetImageSlice ( svkDcmHeader::Orientation  sliceOrientation = svkDcmHeader::UNKNOWN_ORIENTATION)
virtual

Getter for the current image slice, as opposed to the spectroscopic slice.

References svkDataView::GetOrientation(), svkDataView::GetSlice(), svkDataViewController::GetView(), and svkDcmHeader::UNKNOWN_ORIENTATION.

double GetLevel ( WindowLevelTarget  target = REFERENCE_IMAGE)
double GetOverlayThreshold ( )
double GetOverlayThresholdValue ( )
int * GetTlcBrc ( )
virtual

Used to get the current Top Left and Bottom Right Corners of the display

Returns
a pointer to a length two vector, the first element being the cell id of the top left corner and the second the bottom right corner.

References svkDataViewController::view.

Referenced by svkOverlayViewController::SetTlcBrc(), svkOverlayViewController::TurnPropOff(), and svkOverlayViewController::TurnPropOn().

double GetWindow ( WindowLevelTarget  target = REFERENCE_IMAGE)
void HighlightSelectionVoxels ( )
bool IsImageInsideSpectra ( )
static svkOverlayViewController* New ( )
static
void Reset ( )
void ResetWindowLevel ( )

Resets the window level, source taken from vtkImageViewer2.

References svkOverlayView::ResetWindowLevel(), and svkDataViewController::view.

void SetCurrentStyle ( int  style)
void SetInput ( svkImageData data,
int  index = 0 
)
virtual

Setter method. Also calls the SetInput method of its view. svkOverlayView has two inputs, an image and a spectroscopy data set.

Parameters
datathe data you wish to view
indexthe index of the input you wish to set.

Implements svkDataViewController.

References svkDataViewController::dataVector, svkDataViewController::GetSlice(), svkDataViewController::GetView(), svkOverlayViewController::MET, svkOverlayView::MR4D, svkOverlayViewController::MR4D, svkOverlayViewController::MRI, svkDataView::SetInput(), svkOverlayViewController::SetSlice(), svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

void SetInterpolationType ( int  interpolationType)
void SetLevel ( double  level,
WindowLevelTarget  target = REFERENCE_IMAGE 
)
void SetLUT ( svkLookupTable::svkLookupTableType  type)
void SetOverlayOpacity ( double  opacity)
void SetOverlayThreshold ( double  threshold)
void SetRWInteractor ( vtkRenderWindowInteractor *  rwi)
virtual

Setter method. Also gets the render window from the render window actor. Once these have been set, CreateDataVisualization() is called and starts the actual create of the visualization.

Parameters
rwithe vtkRenderWindowInteractor you want the View to use

Reimplemented from svkDataViewController.

References svkDataViewController::dataVector, svkOverlayViewController::MRI, svkOverlayViewController::myRenderWindow, svkDataViewController::rwi, and svkDataViewController::SetRWInteractor().

Referenced by svkOverlayViewController::Reset().

void SetSlice ( int  slice)
virtual

Setter. Should be modified to take action once the slice is set, and to modify its View to do the same.

Parameters
slicethe slice you want to view
theimage you want to change the slice of, 0 is primary 1 and 2 are orthogonal

Reimplemented from svkDataViewController.

References svkDataView::SetSlice(), svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

Referenced by svkOverlayViewController::SetInput(), and svkOverlayViewController::SetSlice().

void SetSlice ( int  slice,
bool  centerImage 
)
virtual

Setter. Should be modified to take action once the slice is set, and to modify its View to do the same.

Parameters
slicethe slice you want to view
theimage you want to change the slice of, 0 is primary 1 and 2 are orthogonal

References svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

void SetSlice ( int  slice,
svkDcmHeader::Orientation  orientation 
)
virtual

Setter. Should be modified to take action once the slice is set, and to modify its View to do the same.

Parameters
slicethe slice you want to view
theimage you want to change the slice of, 0 is primary 1 and 2 are orthogonal

References svkOverlayViewController::SetSlice(), svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

void SetTlcBrc ( int *  tlcBrc)
virtual

Used to set externally the Top Left and Bottom Right Corners of the display

Parameters
tlcBrcpointer to a length two vector, the first element being the l cell id of the top left corner and the second the bottom right corner.

References svkOverlayViewController::GetTlcBrc(), and svkDataViewController::view.

Referenced by svkOverlayViewController::TurnPropOff(), and svkOverlayViewController::TurnPropOn().

void SetWindow ( double  window,
WindowLevelTarget  target = REFERENCE_IMAGE 
)
void TurnOrthogonalImagesOff ( )
void TurnOrthogonalImagesOn ( )
void TurnPropOff ( int  propIndex)
virtual

Turn off the vtkActorCollection representing a given topology for a given image.

Parameters
actorIndexthe index of the topology you want to turn off
imageIndexthe index of the image who's topology you want turned off

References svkOverlayViewController::GetTlcBrc(), svkOverlayViewController::SetTlcBrc(), svkDataView::TurnPropOff(), svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

void TurnPropOn ( int  propIndex)
virtual

Turn on the vtkActorCollection representing a given topology for a given image.

Parameters
actorIndexthe index of the topology you want to turn on
imageIndexthe index of the image who's topology you want turned on

References svkOverlayViewController::GetTlcBrc(), svkOverlayViewController::SetTlcBrc(), svkDataView::TurnPropOn(), svkDataViewController::view, and svkOverlayViewController::visualizationCreated.

void UseColorOverlayStyle ( )
void UseRotationStyle ( )
void UseSelectionStyle ( )
void UseWindowLevelStyle ( )

Member Data Documentation

vtkCallbackCommand* colorOverlayCB
protected
vtkInteractorObserver* colorOverlayStyle
protected
int currentInteractorStyle
protected
vtkCallbackCommand* cursorLocationCB
protected

callback that responds to mouse movements to update cursor location display

Referenced by svkOverlayViewController::Reset(), svkOverlayViewController::svkOverlayViewController(), and svkOverlayViewController::~svkOverlayViewController().

vtkCallbackCommand* dragSelectionCB
protected
svkOverlaySelector* dragSelectStyle
protected
double initialColorWindowLevel[2]
protected
vtkCallbackCommand* interactorSwitchCB
protected
vtkRenderer* mouseLocRenderer
protected

the renderer used to display the mouse location

vtkTextActor* mousePositionText
protected

the actor that represents the mouse location

vtkRenderWindow* myRenderWindow
protected
int pickPos[2]
protected
vtkInteractorObserver* rotationStyle
protected
vtkActor* scanBoundryActor
protected
double startOpacity
protected
bool visualizationCreated
protected
vtkInteractorObserver* windowLevelStyle
protected

The documentation for this class was generated from the following files: