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
svkSpectraReferenceView Class Reference

#include <svkSpectraReferenceView.h>

Inheritance diagram for svkSpectraReferenceView:
svkDataView

Public Types

enum  WindowLevelRanges { FREQUENCY = 0, AMPLITUDE }
 Enum represents different color schemes. Used for printing. More...
 
enum  DataInputs { MRI = 0, MRS = 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,
  PLOT_LINES, 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 (svkSpectraReferenceView, svkDataView)
 
 svkSpectraReferenceView ()
 
 ~svkSpectraReferenceView ()
 
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 void SetRWInteractor (vtkRenderWindowInteractor *)
 
virtual void SetWindowLevelRange (double lower, double upper, int index)
 
virtual void GetWindowLevelRange (double &lower, double &upper, int index)
 
void SetComponent (svkPlotLine::PlotComponent component)
 
string GetDataCompatibility (svkImageData *data, int targetIndex)
 
void TurnOrthogonalImagesOn ()
 
void TurnOrthogonalImagesOff ()
 
void SetOrientation (svkDcmHeader::Orientation orientation)
 
void ToggleSelBoxVisibilityOn ()
 
void ToggleSelBoxVisibilityOff ()
 
void AlignCamera ()
 
bool IsImageInsideSpectra ()
 
svkLookupTableGetLookupTable ()
 
- Public Member Functions inherited from svkDataView
 vtkTypeMacro (svkDataView, vtkObject)
 
 svkDataView ()
 Constructor. More...
 
 ~svkDataView ()
 Destructor. More...
 
virtual svkImageDataGetInput (int index=0)
 
virtual void RemoveInput (int index=0)
 Sets input data set to NULL for index and call Delete. More...
 
virtual void SetController (svkDataViewController *controller)
 
virtual svkDataViewControllerGetController ()
 
virtual int GetSlice ()
 
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 svkSpectraReferenceViewNew ()
 
- 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::svkSpectraReferenceView:: { ... }  
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 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)
 
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

svkPlotLineGridplotGrid
 Represents the plotted lines of the grid. More...
 
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
 
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 svkSpectraReferenceViewController
 

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 
MRS 
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 
PLOT_LINES 
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 

Enum represents different color schemes. Used for printing.

Enumerator
FREQUENCY 
AMPLITUDE 

Constructor & Destructor Documentation

Constructor creates the vtkImageView2, and sets its size.

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

Member Function Documentation

void AlignCamera ( )
bool AreAllSatBandOutlinesOn ( svkDcmHeader::Orientation  orientation)
protected
bool AreAllSatBandsOn ( svkDcmHeader::Orientation  orientation)
protected
int FindCenterImageSlice ( int  spectraSlice,
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 CLIP_TOLERANCE, svkDataView::ClipMapperToTlcBrc(), svkDataView::dataVector, svkPlotLineGrid::GetPlotGridActor(), svkDataView::GetProp(), svkSpectraReferenceView::MRS, svkSpectraReferenceView::PLOT_GRID, svkSpectraReferenceView::plotGrid, and svkDataView::tlcBrc.

Referenced by svkSpectraReferenceView::SetSlice(), and svkSpectraReferenceView::SetTlcBrc().

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(), svkDataView::isValidationOn, svkSpectraReferenceView::MRI, svkSpectraReferenceView::MRS, svkDataValidator::New(), svkSpectraReferenceView::OVERLAY, and svkDataValidator::resultInfo.

Referenced by svkSpectraReferenceView::SetInput().

svkLookupTable * GetLookupTable ( )

Sets the LUT type

Parameters
LUTtype

References svkSpectraReferenceView::colorTransfer.

double GetOverlayOpacity ( )
protected

Gets the opacity of the image overlay.

double GetOverlayThreshold ( )
protected

Gets the opacity of the image overlay.

void GetWindowLevelRange ( double &  lower,
double &  upper,
int  index 
)
virtual
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, svkSpectraReferenceView::MRS, svkDataView::orientation, svkSpectraReferenceView::SetTlcBrc(), svkDataView::slice, and svkDataView::tlcBrc.

Referenced by svkSpectraReferenceView::SetupMsInput().

bool IsImageInsideSpectra ( )

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

References svkSpectraReferenceView::imageInsideSpectra.

bool IsSatBandForSliceOn ( svkDcmHeader::Orientation  orientation)
protected
bool IsSatBandOutlineForSliceOn ( svkDcmHeader::Orientation  orientation)
protected
static svkSpectraReferenceView* New ( )
static
void ResetWindowLevel ( )
protected
void SetComponent ( svkPlotLine::PlotComponent  component)
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.

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

Implements svkDataView.

References svkDataView::dataVector, svkSpectraReferenceView::GetDataCompatibility(), svkDataView::ObserveData(), svkSpectraReferenceView::OVERLAY, svkDataView::Refresh(), svkSpectraReferenceView::SetupMrInput(), svkSpectraReferenceView::SetupMsInput(), and svkSpectraReferenceView::SetupOverlay().

void SetInterpolationType ( int  interpolationType)
protected
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 svkSpectraReferenceView::AXIAL_OVERLAY_FRONT, svkSpectraReferenceView::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(), svkSpectraReferenceView::imageViewer, svkSpectraReferenceView::myRenderWindow, svkSpectraReferenceView::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(), svkSpectraReferenceView::MRS, svkDataView::orientation, svkSpectraReferenceView::PRIMARY, svkDataView::rwi, svkSpectraReferenceView::SetTlcBrc(), and svkDataView::slice.

void SetSlice ( int  slice)
virtual
void SetSlice ( int  slice,
bool  centerImage 
)
virtual
void SetSlice ( int  slice,
svkDcmHeader::Orientation  orientation 
)
virtual
void SetTlcBrc ( int *  tlcBrc)
protected
void SetupMrInput ( bool  resetViewState)
protected
void SetupMsInput ( bool  resetViewState)
protected
void SetupOverlay ( )
protected
void SetWindowLevelRange ( double  lower,
double  upper,
int  index 
)
virtual

SetWindowLevel for spectral view; index 0 is frequency, index 1 is intensity. NOTE: Method assumes that frequency ranges are in integers (points).

Parameters
lowerthe lower limit
upperthe upper limit
indexwhich dimension you wish to change, frequency or magnitude

Reimplemented from svkDataView.

References svkSpectraReferenceView::AMPLITUDE, svkSpectraReferenceView::FREQUENCY, svkSpectraReferenceView::plotGrid, svkDataView::Refresh(), svkPlotLineGrid::SetFrequencyWLRange(), svkPlotLineGrid::SetIntensityWLRange(), and svkDataView::tlcBrc.

void ToggleSelBoxVisibilityOff ( )
void ToggleSelBoxVisibilityOn ( )
void TurnOrthogonalImagesOff ( )
void TurnOrthogonalImagesOn ( )
void UpdateImageSlice ( bool  centerImage)
protected
vtkTypeMacro ( svkSpectraReferenceView  ,
svkDataView   
)

Friends And Related Function Documentation

friend class svkSpectraReferenceViewController
friend

Member Data Documentation

enum { ... } ColorSchema

Enum represents color schema, used for printing.

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

the render window in which the view is to be displayed

Referenced by svkSpectraReferenceView::SetRWInteractor(), and svkSpectraReferenceView::svkSpectraReferenceView().

svkPlotLineGrid* plotGrid
protected
bool toggleSelBoxVisibility
protected
svkImageMapToColors* windowLevelerAxial
protected
svkImageMapToColors* windowLevelerCoronal
protected
svkImageMapToColors* windowLevelerSagittal
protected

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