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 | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
svkOverlayView Class Reference

#include <svkOverlayView.h>

Inheritance diagram for svkOverlayView:
svkDataView

Public Types

enum  DataInputs { MRI = 0, MR4D = 1, OVERLAY = 2 }
 Enum represents input indecies. More...
 
enum  PropType {
  VOL_SELECTION = 0, SAT_BANDS_AXIAL, SAT_BANDS_AXIAL_OUTLINE, SAT_BANDS_CORONAL,
  SAT_BANDS_SAGITTAL, SAT_BANDS_CORONAL_OUTLINE, SAT_BANDS_SAGITTAL_OUTLINE, PLOT_GRID,
  AXIAL_OVERLAY_FRONT, AXIAL_OVERLAY_BACK, CORONAL_OVERLAY_FRONT, CORONAL_OVERLAY_BACK,
  SAGITTAL_OVERLAY_FRONT, SAGITTAL_OVERLAY_BACK, COORDINATES, COLOR_BAR,
  LAST_PROP = COLOR_BAR
}
 Enum represents objects in the scene. More...
 
enum  InterpolationType { NEAREST = 0, LINEAR, SINC }
 Enum represents interpolation methods for the overlay. More...
 
enum  RendererType { PRIMARY = 0, MOUSE_LOCATION, LAST_RENDERER = MOUSE_LOCATION }
 Enum represents renderers in the window. More...
 
enum  { LIGHT_ON_DARK = 0, DARK_ON_LIGHT }
 Enum represents color schema, used for printing. More...
 

Public Member Functions

 vtkTypeMacro (svkOverlayView, svkDataView)
 
 svkOverlayView ()
 
 ~svkOverlayView ()
 
virtual void SetInput (svkImageData *data, int index=0)
 
virtual void SetInputPostReslice (svkImageData *data, int index)
 
virtual void RemoveInput (int index)
 
virtual void SetSlice (int slice)
 
virtual void SetSlice (int slice, bool centerImage)
 
virtual void SetSlice (int slice, svkDcmHeader::Orientation orientation)
 
virtual void SetActiveImageVolume (int volume)
 
virtual void SetActiveOverlayVolume (int volume)
 
virtual void SetRWInteractor (vtkRenderWindowInteractor *)
 
string GetDataCompatibility (svkImageData *data, int targetIndex)
 
void TurnOrthogonalImagesOn ()
 
void TurnOrthogonalImagesOff ()
 
bool AreOrthogonalImagesOn ()
 
void SetOrientation (svkDcmHeader::Orientation orientation)
 
void ToggleSelBoxVisibilityOn ()
 
void ToggleSelBoxVisibilityOff ()
 
void AlignCamera ()
 
bool IsImageInsideSpectra ()
 
void SetLevel (double level)
 
double GetLevel ()
 
void SetWindow (double window)
 
double GetWindow ()
 
void SetColorOverlayWindow (double window)
 
void SetColorOverlayLevel (double level)
 
double GetColorOverlayWindow ()
 
double GetColorOverlayLevel ()
 
bool CheckDataOrientations ()
 
void SetCameraZoom (double zoom)
 
svkLookupTableGetLookupTable ()
 
- Public Member Functions inherited from svkDataView
 vtkTypeMacro (svkDataView, vtkObject)
 
 svkDataView ()
 Constructor. More...
 
 ~svkDataView ()
 Destructor. More...
 
virtual svkImageDataGetInput (int index=0)
 
virtual void SetController (svkDataViewController *controller)
 
virtual svkDataViewControllerGetController ()
 
virtual int GetSlice ()
 
virtual void SetWindowLevelRange (double lower, double upper, int index)
 
virtual void Refresh ()
 
virtual void SetPropState (int propIndex, bool visible)
 
virtual void TurnPropOn (int propIndex)
 
virtual void TurnPropOff (int propIndex)
 
virtual bool IsPropOn (int propIndex)
 
virtual void SetRendererState (int rendererIndex, bool visible)
 
virtual void TurnRendererOn (int rendererIndex)
 
virtual void TurnRendererOff (int rendererIndex)
 
virtual bool IsRendererOn (int rendererIndex)
 
virtual void SetVisibility (int actorIndex, bool visible)
 Is it in the views current displayed FOV? More...
 
virtual vtkRenderer * GetRenderer (int index)
 
virtual void SetRenderer (int index, vtkRenderer *ren)
 
virtual vtkProp * GetProp (int index)
 
virtual void SetProp (int index, vtkProp *prop)
 
virtual svkDcmHeader::Orientation GetOrientation ()
 
void ValidationOff ()
 

Static Public Member Functions

static svkOverlayViewNew ()
 
- Static Public Member Functions inherited from svkDataView
static void ClipMapperToTlcBrc (svkImageData *data, vtkAbstractMapper *mapper, int tlcBrc[2], double clip_tolerance_row, double clip_tolerance_column, double clip_tolerance_slice)
 
static void GetClippingIndexFromTlcBrc (svkImageData *data, int indexRange[2][3], int tlcBrc[2])
 
static void GetClippingPlanes (vtkPlaneCollection *planes, svkImageData *data, int *tlcBrc, double clip_tolerance_row, double clip_tolerance_column, double clip_tolerance_slice)
 
static bool IsTlcBrcWithinData (svkImageData *data, int tlcBrc[2])
 
static bool IsTlcBrcWithinData (svkImageData *data, int tlcID, int brcID)
 
static void ResetTlcBrcForNewOrientation (svkImageData *data, svkDcmHeader::Orientation orientation, int tlcBrc[2], int &slice)
 

Public Attributes

enum svk::svkOverlayView:: { ... }  ColorSchema
 Enum represents color schema, used for printing. More...
 

Protected Member Functions

void SetupMrInput (bool firstInput)
 
void SetupMsInput (bool firstInput)
 
void UpdateImageSlice (bool centerImage)
 
void SetSelection (double *selectionArea, bool isWorldCords=0)
 
void SetOverlayOpacity (double opacity)
 
double GetOverlayOpacity ()
 
void SetOverlayThreshold (double threshold)
 
double GetOverlayThreshold ()
 
void SetTlcBrc (int *tlcBrc)
 
int * HighlightSelectionVoxels ()
 
void GenerateClippingPlanes ()
 
void SetupOverlay ()
 
void SetInterpolationType (int interpolationType)
 
void UpdateSincInterpolation ()
 
void SetLUT (svkLookupTable::svkLookupTableType type)
 
void ResetWindowLevel ()
 Resets the window level, source taken from vtkImageViewer2. More...
 
int FindCenterImageSlice (int spectraSlice, svkDcmHeader::Orientation orientation)
 
int FindSpectraSlice (int imageSlice, svkDcmHeader::Orientation orientation)
 
int FindOverlaySlice (int slice, svkDcmHeader::Orientation orientation)
 
bool IsSatBandForSliceOn (svkDcmHeader::Orientation orientation)
 
bool IsSatBandOutlineForSliceOn (svkDcmHeader::Orientation orientation)
 
bool AreAllSatBandsOn (svkDcmHeader::Orientation orientation)
 
bool AreAllSatBandOutlinesOn (svkDcmHeader::Orientation orientation)
 
- Protected Member Functions inherited from svkDataView
virtual void UpdateProps ()
 
void ObserveData (svkImageData *data)
 

Protected Attributes

svkImageViewer2imageViewer
 the vtkImageViewer2 object used to display the image More...
 
vtkRenderWindow * myRenderWindow
 the render window in which the view is to be displayed More...
 
bool toggleSelBoxVisibility
 
bool imageInsideSpectra
 
svkImageMapToColorswindowLevelerAxial
 Object used to window livel the overlay. More...
 
svkImageMapToColorswindowLevelerCoronal
 
svkImageMapToColorswindowLevelerSagittal
 
svkSincInterpolationFiltersincInterpolation
 
svkMriImageDatainterpOverlay
 
svkLookupTablecolorTransfer
 
- Protected Attributes inherited from svkDataView
vector< vtkRenderer * > renCollection
 
vector< vtkProp * > propCollection
 
vtkRenderWindowInteractor * rwi
 
vector< svkImageData * > dataVector
 
svkDataViewControllercontroller
 
vtkCallbackCommand * dataModifiedCallback
 
svkDcmHeader::Orientation orientation
 
int tlcBrc [2]
 the top left, bottom right corners of the current view More...
 
int slice
 
vector< bool > isPropOn
 
vector< bool > isRendererOn
 
vector< bool > isPropVisible
 
bool isValidationOn
 

Friends

class svkOverlayViewController
 

Additional Inherited Members

- Static Protected Member Functions inherited from svkDataView
static void UpdateView (vtkObject *subject, unsigned long eid, void *thisObject, void *callData)
 

Detailed Description

An implementation of DataView, this class is designed to create a visualization of the spectroscopy spatial information overlayed on the anatomical image. It uses a vtkImageViewer2 to present the anatamical data then the spectroscopy data is added.

TODO: Find a better (more condensed) way to deal with satband and overlay actors

Member Enumeration Documentation

anonymous enum

Enum represents color schema, used for printing.

Enumerator
LIGHT_ON_DARK 
DARK_ON_LIGHT 
enum DataInputs

Enum represents input indecies.

Enumerator
MRI 
MR4D 
OVERLAY 

Enum represents interpolation methods for the overlay.

Enumerator
NEAREST 
LINEAR 
SINC 
enum PropType

Enum represents objects in the scene.

Enumerator
VOL_SELECTION 
SAT_BANDS_AXIAL 
SAT_BANDS_AXIAL_OUTLINE 
SAT_BANDS_CORONAL 
SAT_BANDS_SAGITTAL 
SAT_BANDS_CORONAL_OUTLINE 
SAT_BANDS_SAGITTAL_OUTLINE 
PLOT_GRID 
AXIAL_OVERLAY_FRONT 
AXIAL_OVERLAY_BACK 
CORONAL_OVERLAY_FRONT 
CORONAL_OVERLAY_BACK 
SAGITTAL_OVERLAY_FRONT 
SAGITTAL_OVERLAY_BACK 
COORDINATES 
COLOR_BAR 
LAST_PROP 

Enum represents renderers in the window.

Enumerator
PRIMARY 
MOUSE_LOCATION 
LAST_RENDERER 

Constructor & Destructor Documentation

Constructor creates the vtkImageView2, and sets its size.

References svkDcmHeader::AXIAL, svkOverlayView::AXIAL_OVERLAY_BACK, svkOverlayView::AXIAL_OVERLAY_FRONT, svkOverlayView::COLOR_BAR, svkOverlayView::colorTransfer, svkDcmHeader::CORONAL, svkOverlayView::CORONAL_OVERLAY_BACK, svkOverlayView::CORONAL_OVERLAY_FRONT, svkDataView::dataVector, svkSatBandSet::GetSatBandsActor(), svkSatBandSet::GetSatBandsOutlineActor(), svkOverlayView::imageInsideSpectra, svkOverlayView::imageViewer, svkOverlayView::interpOverlay, svkDataView::isPropOn, svkDataView::isPropVisible, svkDataView::isRendererOn, svkOverlayView::LAST_PROP, svkOverlayView::LAST_RENDERER, svkOverlayView::myRenderWindow, svkOverlayView::NEAREST, svkMriImageData::New(), svkImageViewer2::New(), svkSatBandSet::New(), svkImageActor::New(), svkSincInterpolationFilter::New(), svkOverlayView::PLOT_GRID, svkDataView::propCollection, svkDataView::renCollection, svkDataView::rwi, svkDcmHeader::SAGITTAL, svkOverlayView::SAGITTAL_OVERLAY_BACK, svkOverlayView::SAGITTAL_OVERLAY_FRONT, svkOverlayView::SAT_BANDS_AXIAL, svkOverlayView::SAT_BANDS_AXIAL_OUTLINE, svkOverlayView::SAT_BANDS_CORONAL, svkOverlayView::SAT_BANDS_CORONAL_OUTLINE, svkOverlayView::SAT_BANDS_SAGITTAL, svkOverlayView::SAT_BANDS_SAGITTAL_OUTLINE, svkSatBandSet::SetOrientation(), svkDataView::SetProp(), svkOverlayView::sincInterpolation, svkDataView::slice, svkDataView::tlcBrc, svkOverlayView::toggleSelBoxVisibility, svkDataView::TurnPropOff(), svkOverlayView::VOL_SELECTION, svkOverlayView::windowLevelerAxial, svkOverlayView::windowLevelerCoronal, and svkOverlayView::windowLevelerSagittal.

Member Function Documentation

void AlignCamera ( )
bool AreAllSatBandOutlinesOn ( svkDcmHeader::Orientation  orientation)
protected
bool AreAllSatBandsOn ( svkDcmHeader::Orientation  orientation)
protected
bool AreOrthogonalImagesOn ( )
bool CheckDataOrientations ( )
int FindCenterImageSlice ( int  spectraSlice,
svkDcmHeader::Orientation  orientation 
)
protected

Finds the image slice that most closely corresponds to the input spectra slice.

References svkDataView::dataVector, svkOverlayView::MR4D, and svkOverlayView::MRI.

Referenced by svkOverlayView::UpdateImageSlice().

int FindOverlaySlice ( int  slice,
svkDcmHeader::Orientation  orientation 
)
protected
int FindSpectraSlice ( int  imageSlice,
svkDcmHeader::Orientation  orientation 
)
protected
void GenerateClippingPlanes ( )
protected

Generates the clipping planes for the mMMapper. This is how the boundries set are enforced, after the data is scaled, it is clipped so that data outside the plot range is simply not shown.

References svkDataView::ClipMapperToTlcBrc(), svkDataView::dataVector, svkDataView::GetProp(), svkOverlayView::MR4D, svkOverlayView::PLOT_GRID, and svkDataView::tlcBrc.

Referenced by svkOverlayView::AlignCamera(), svkOverlayView::SetSlice(), and svkOverlayView::SetTlcBrc().

double GetColorOverlayLevel ( )
double GetColorOverlayWindow ( )
string GetDataCompatibility ( svkImageData data,
int  targetIndex 
)

Check to make sure a given dataset is comptabile with the currently loaded data sets.

Parameters
datathe prospective data.
targetIndexthe index in which the data is trying to be placed.
Returns
resultInfo returns an empty string if the dataset is compatibly, otherwise an explaination of why the dataset is not compatible is returned.

References svkDataValidator::AreDataCompatible(), svkDataView::dataVector, svkDataValidator::INVALID_DATA_ORIENTATION, svkDataValidator::IsInvalid(), svkDataValidator::IsOnlyError(), svkDataView::isValidationOn, svkOverlayView::MR4D, svkOverlayView::MRI, svkDataValidator::New(), svkOverlayView::OVERLAY, and svkDataValidator::resultInfo.

Referenced by svkOverlayView::SetInputPostReslice().

double GetLevel ( )
svkLookupTable * GetLookupTable ( )

Sets the LUT type

Parameters
LUTtype

References svkOverlayView::colorTransfer.

double GetOverlayOpacity ( )
protected

Gets the opacity of the image overlay.

double GetOverlayThreshold ( )
protected

Gets the opacity of the image overlay.

double GetWindow ( )
int * HighlightSelectionVoxels ( )
protected

Method highlights voxels within the selection box

Returns
tlcBrc the cell id's of the desired top left, bottom right corners

References svkDataView::dataVector, svkOverlayView::MR4D, svkDataView::orientation, svkOverlayView::SetTlcBrc(), svkDataView::slice, and svkDataView::tlcBrc.

Referenced by svkOverlayView::SetupMsInput().

bool IsImageInsideSpectra ( )

Returns true if the current image is within the spectrscopy data set

References svkOverlayView::imageInsideSpectra.

bool IsSatBandForSliceOn ( svkDcmHeader::Orientation  orientation)
protected
bool IsSatBandOutlineForSliceOn ( svkDcmHeader::Orientation  orientation)
protected
static svkOverlayView* New ( )
static
void RemoveInput ( int  index)
virtual

Removes a data input and the associated actors. Currently only implemented for overlay.

Reimplemented from svkDataView.

References svkOverlayView::OVERLAY, and svkOverlayView::SetupOverlay().

void ResetWindowLevel ( )
protected
void SetActiveImageVolume ( int  volume)
virtual

Sets the active volume. The active volume will be the rendered volume.

Parameters
volume

References svkOverlayView::imageViewer, and svkImageViewer2::SetActiveVolume().

void SetActiveOverlayVolume ( int  volume)
virtual
void SetCameraZoom ( double  zoom)
void SetColorOverlayLevel ( double  level)
void SetColorOverlayWindow ( double  window)
void SetInput ( svkImageData data,
int  index = 0 
)
virtual

Sets the data object in the object, also sets the input to the vtkImageViewer2 and renders it. Reslices any images necesary

Parameters
datathe data you want to view
indexthe index of the data you want to set

Implements svkDataView.

References svkDataView::dataVector, svkOverlayView::MR4D, svkOverlayView::MRI, svkOverlayView::OVERLAY, and svkOverlayView::SetInputPostReslice().

Referenced by svkOverlayView::SetInterpolationType(), and svkOverlayView::UpdateSincInterpolation().

void SetInputPostReslice ( svkImageData data,
int  index 
)
virtual
void SetInterpolationType ( int  interpolationType)
protected
void SetLevel ( double  level)
void SetLUT ( svkLookupTable::svkLookupTableType  type)
protected
void SetOrientation ( svkDcmHeader::Orientation  orientation)
virtual
void SetOverlayOpacity ( double  opacity)
protected
void SetOverlayThreshold ( double  threshold)
protected

Sets the threshold of the image overlay.

Parameters
thresholdthe new threshold you wish the image overlay to have.

References svkOverlayView::AXIAL_OVERLAY_FRONT, svkOverlayView::colorTransfer, svkDataView::GetProp(), and svkLookupTable::SetAlphaThreshold().

void SetRWInteractor ( vtkRenderWindowInteractor *  rwi)
virtual

Sets the vtkRenderWindowInteractor to be associated with this view.

Parameters
rwithe vtkRenderWindowInteractor you wish this view to use

Reimplemented from svkDataView.

References svkDataView::GetRenderer(), svkOverlayView::myRenderWindow, svkOverlayView::PRIMARY, svkDataView::rwi, and svkDataView::TurnRendererOn().

void SetSelection ( double *  selectionArea,
bool  isWorldCords = 0 
)
protected

Sets desired the current selection in Display (pixels) coordinates and highlights the intersected voxels.

Parameters
selectionAreathe area you wish to select voxels within [xmin, xmax, ymin, ymax]

References svkDataView::dataVector, svkDataView::GetRenderer(), svkVoxelTaggingUtils::IsImageVoxelTagData(), svkOverlayView::MR4D, svkDataView::orientation, svkOverlayView::OVERLAY, svkOverlayView::PRIMARY, svkDataView::rwi, svkOverlayView::SetTlcBrc(), svkDataView::slice, and svkVoxelTaggingUtils::ToggleVoxelTag().

void SetSlice ( int  slice)
virtual

Sets the current slice.

Parameters
slicethe slice you want to view

Implements svkDataView.

Referenced by svkOverlayView::SetOrientation(), svkOverlayView::SetSlice(), svkOverlayView::SetupMrInput(), and svkOverlayView::SetupMsInput().

void SetSlice ( int  slice,
bool  centerImage 
)
virtual
void SetSlice ( int  slice,
svkDcmHeader::Orientation  orientation 
)
virtual
void SetTlcBrc ( int *  tlcBrc)
protected

Used to select Actors based on their Top Left and Bottom Right Corners

Parameters
tlcBrcthe cell id's of the desired top left, bottom right corners

References svkDataView::dataVector, svkOverlayView::GenerateClippingPlanes(), svkDataView::IsTlcBrcWithinData(), and svkOverlayView::MR4D.

Referenced by svkOverlayView::HighlightSelectionVoxels(), and svkOverlayView::SetSelection().

void SetupMrInput ( bool  resetViewState)
protected
void SetupMsInput ( bool  resetViewState)
protected
void SetupOverlay ( )
protected
void SetWindow ( double  window)
void ToggleSelBoxVisibilityOff ( )
void ToggleSelBoxVisibilityOn ( )
void TurnOrthogonalImagesOff ( )
void TurnOrthogonalImagesOn ( )
void UpdateImageSlice ( bool  centerImage)
protected
void UpdateSincInterpolation ( )
protected
vtkTypeMacro ( svkOverlayView  ,
svkDataView   
)

Friends And Related Function Documentation

friend class svkOverlayViewController
friend

Member Data Documentation

enum { ... } ColorSchema

Enum represents color schema, used for printing.

svkLookupTable* colorTransfer
protected
bool imageInsideSpectra
protected
svkImageViewer2* imageViewer
protected
svkMriImageData* interpOverlay
protected
vtkRenderWindow* myRenderWindow
protected

the render window in which the view is to be displayed

Referenced by svkOverlayView::SetRWInteractor(), svkOverlayView::SetupMrInput(), and svkOverlayView::svkOverlayView().

svkSincInterpolationFilter* sincInterpolation
protected
bool toggleSelBoxVisibility
protected
svkImageMapToColors* windowLevelerAxial
protected
svkImageMapToColors* windowLevelerCoronal
protected
svkImageMapToColors* windowLevelerSagittal
protected

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