vtkSlicerSliceLogic Class Reference

#include <vtkSlicerSliceLogic.h>

Inheritance diagram for vtkSlicerSliceLogic:
vtkSlicerLogic vtkObject

List of all members.

Public Member Functions

void CalculateSliceOffset (double offset, double oldOffsetVector[4], double newOffsetVector[4])
void CreateSliceModel ()
void DeleteSliceModel ()
void FitSliceToAll (int width, int height)
void FitSliceToBackground (int width, int height)
void FitSliceToVolume (vtkMRMLVolumeNode *volumeNode, int width, int height)
void GetBackgroundRASBox (double rasDimensions[3], double rasCenter[3])
void GetBackgroundSliceBounds (double sliceBounds[6])
void GetBackgroundSliceDimensions (double sliceDimensions[3], double sliceCenter[3])
double * GetBackgroundSliceSpacing ()
vtkImageDataGetImageData ()
vtkMRMLVolumeNodeGetLayerVolumeNode (int layer)
vtkMRMLVolumeNodeGetLowestVolumeNode ()
void GetLowestVolumeSliceBounds (double sliceBounds[6])
double * GetLowestVolumeSliceSpacing ()
void GetPolyDataAndLookUpTableCollections (vtkPolyDataCollection *PolyDataCollection, vtkCollection *LookupTableCollection)
std::vector< vtkMRMLDisplayNode * > GetPolyDataDisplayNodes ()
int GetSliceIndexFromOffset (double sliceOffset)
int GetSliceIndexFromOffset (double sliceOffset, vtkMRMLVolumeNode *volumeNode)
double GetSliceOffset ()
void GetVolumeSliceBounds (vtkMRMLVolumeNode *volumeNode, double sliceBounds[6])
void GetVolumeSliceDimensions (vtkMRMLVolumeNode *volumeNode, double sliceDimensions[3], double sliceCenter[3])
double * GetVolumeSliceSpacing (vtkMRMLVolumeNode *volumeNode)
void PrintSelf (ostream &os, vtkIndent indent)
void ProcessLogicEvents ()
virtual void ProcessLogicEvents (vtkObject *, unsigned long, void *)
virtual void ProcessMRMLEvents ()
virtual void ProcessMRMLEvents (vtkObject *, unsigned long, void *)
void SetBackgroundLayer (vtkSlicerSliceLayerLogic *BackgroundLayer)
void SetForegroundLayer (vtkSlicerSliceLayerLogic *ForegroundLayer)
void SetForegroundOpacity (double ForegroundOpacity)
void SetLabelLayer (vtkSlicerSliceLayerLogic *LabelLayer)
void SetLabelOpacity (double LabelOpacity)
void SetSliceCompositeNode (vtkMRMLSliceCompositeNode *SliceCompositeNode)
void SetSliceNode (vtkMRMLSliceNode *SliceNode)
void SetSliceOffset (double offset)
void SnapSliceOffsetToIJK ()
void UpdateImageData ()
void UpdatePipeline ()
void UpdateSliceCompositeNode ()
void UpdateSliceNode ()
void UpdateSliceNodeFromLayout ()
 vtkGetMacro (LabelOpacity, double)
 vtkGetMacro (ForegroundOpacity, double)
 vtkGetObjectMacro (ExtractModelTexture, vtkImageReslice)
 vtkGetObjectMacro (LookupTableCollection, vtkCollection)
 vtkGetObjectMacro (PolyDataCollection, vtkPolyDataCollection)
 vtkGetObjectMacro (Blend, vtkImageBlend)
 vtkGetObjectMacro (SliceModelTransformNode, vtkMRMLLinearTransformNode)
 vtkGetObjectMacro (SliceModelDisplayNode, vtkMRMLModelDisplayNode)
 vtkGetObjectMacro (SliceModelNode, vtkMRMLModelNode)
 vtkGetObjectMacro (LabelLayer, vtkSlicerSliceLayerLogic)
 vtkGetObjectMacro (ForegroundLayer, vtkSlicerSliceLayerLogic)
 vtkGetObjectMacro (BackgroundLayer, vtkSlicerSliceLayerLogic)
 vtkGetObjectMacro (SliceCompositeNode, vtkMRMLSliceCompositeNode)
 vtkGetObjectMacro (SliceNode, vtkMRMLSliceNode)
 vtkTypeRevisionMacro (vtkSlicerSliceLogic, vtkSlicerLogic)

Static Public Member Functions

static void GetVolumeRASBox (vtkMRMLVolumeNode *volumeNode, double rasDimensions[3], double rasCenter[3])
static vtkSlicerSliceLogicNew ()
 The Usual vtk class functions.

Static Public Attributes

static const int SLICE_INDEX_NO_VOLUME = -3
static const int SLICE_INDEX_OUT_OF_VOLUME = -2
static const int SLICE_INDEX_ROTATED = -1

Protected Member Functions

void AddSliceGlyphs (vtkSlicerSliceLayerLogic *layerLogic)
void operator= (const vtkSlicerSliceLogic &)
 vtkSlicerSliceLogic (const vtkSlicerSliceLogic &)
 vtkSlicerSliceLogic ()
 ~vtkSlicerSliceLogic ()

Protected Attributes

vtkSlicerSliceLayerLogicBackgroundLayer
vtkImageBlend * Blend
vtkImageReslice * ExtractModelTexture
vtkSlicerSliceLayerLogicForegroundLayer
double ForegroundOpacity
vtkImageDataImageData
vtkSlicerSliceLayerLogicLabelLayer
double LabelOpacity
vtkCollectionLookupTableCollection
vtkPolyDataCollection * PolyDataCollection
vtkMRMLSliceCompositeNodeSliceCompositeNode
vtkMRMLModelDisplayNodeSliceModelDisplayNode
vtkMRMLModelNodeSliceModelNode
vtkMRMLLinearTransformNodeSliceModelTransformNode
vtkMRMLSliceNodeSliceNode
double SliceSpacing [3]

Constructor & Destructor Documentation

vtkSlicerSliceLogic::vtkSlicerSliceLogic (  )  [protected]
vtkSlicerSliceLogic::~vtkSlicerSliceLogic (  )  [protected]
vtkSlicerSliceLogic::vtkSlicerSliceLogic ( const vtkSlicerSliceLogic  )  [protected]

Member Function Documentation

void vtkSlicerSliceLogic::AddSliceGlyphs ( vtkSlicerSliceLayerLogic layerLogic  )  [protected]
void vtkSlicerSliceLogic::CalculateSliceOffset ( double  offset,
double  oldOffsetVector[4],
double  newOffsetVector[4] 
)

Calculate the slice offset vectors

  • oldOffsetVector is the one before applying the offset
  • newOffsetVector is after applying offset
  • the slice node is not changed (use SetSliceOffset for that)

Referenced by SetSliceOffset(), and SnapSliceOffsetToIJK().

void vtkSlicerSliceLogic::CreateSliceModel (  ) 
void vtkSlicerSliceLogic::DeleteSliceModel (  ) 
void vtkSlicerSliceLogic::FitSliceToAll ( int  width,
int  height 
)

adjust the node's field of view to match the extent of all volume layers (fits to first non-null layer)

References FitSliceToVolume(), and GetLayerVolumeNode().

Referenced by vtkSlicerApplicationLogic::PropagateVolumeSelection().

void vtkSlicerSliceLogic::FitSliceToBackground ( int  width,
int  height 
)

adjust the node's field of view to match the extent of current background volume

References FitSliceToVolume(), and GetLayerVolumeNode().

void vtkSlicerSliceLogic::FitSliceToVolume ( vtkMRMLVolumeNode volumeNode,
int  width,
int  height 
)
void vtkSlicerSliceLogic::GetBackgroundRASBox ( double  rasDimensions[3],
double  rasCenter[3] 
)

Get the size of the volume, transformed to RAS space

References GetLayerVolumeNode(), and GetVolumeRASBox().

void vtkSlicerSliceLogic::GetBackgroundSliceBounds ( double  sliceBounds[6]  ) 

Get the min/max bounds of the volume

  • note these are not translated by the current slice offset so they can be used to calculate the range (e.g. of a slider) that operates in slice space

References GetLayerVolumeNode(), and GetVolumeSliceBounds().

void vtkSlicerSliceLogic::GetBackgroundSliceDimensions ( double  sliceDimensions[3],
double  sliceCenter[3] 
)

Get the size of the volume, transformed to slice space

References GetLayerVolumeNode(), and GetVolumeSliceDimensions().

double * vtkSlicerSliceLogic::GetBackgroundSliceSpacing (  ) 

Get the spacing of the volume, transformed to slice space

  • to be used, for example, to set the slice increment for stepping a single voxel relative to the current slice view

References GetLayerVolumeNode(), and GetVolumeSliceSpacing().

vtkImageData* vtkSlicerSliceLogic::GetImageData (  )  [inline]

the tail of the pipeline -- returns NULL if none of the inputs exist

Referenced by UpdatePipeline().

vtkMRMLVolumeNode * vtkSlicerSliceLogic::GetLayerVolumeNode ( int  layer  ) 
vtkMRMLVolumeNode * vtkSlicerSliceLogic::GetLowestVolumeNode (  ) 

Return the volumeNode of the lowes layer (bg, fg, lb)

References GetLayerVolumeNode().

Referenced by SnapSliceOffsetToIJK().

void vtkSlicerSliceLogic::GetLowestVolumeSliceBounds ( double  sliceBounds[6]  ) 

Get the min/max bounds of the volume

  • note these are not translated by the current slice offset so they can be used to calculate the range (e.g. of a slider) that operates in slice space
  • returns first non-null layer

References GetLayerVolumeNode(), and GetVolumeSliceBounds().

double * vtkSlicerSliceLogic::GetLowestVolumeSliceSpacing (  ) 

Get the spacing of the volume, transformed to slice space

  • to be used, for example, to set the slice increment for stepping a single voxel relative to the current slice view
  • returns first non-null layer

References GetLayerVolumeNode(), GetVolumeSliceSpacing(), and SliceSpacing.

void vtkSlicerSliceLogic::GetPolyDataAndLookUpTableCollections ( vtkPolyDataCollection *  PolyDataCollection,
vtkCollection LookupTableCollection 
)

Get PolyData models like glyphs etc.

References AddSliceGlyphs(), LookupTableCollection, and PolyDataCollection.

std::vector< vtkMRMLDisplayNode * > vtkSlicerSliceLogic::GetPolyDataDisplayNodes (  ) 

Get all slice displaynodes creating PolyData models like glyphs etc.

References mathExample::n.

int vtkSlicerSliceLogic::GetSliceIndexFromOffset ( double  sliceOffset  ) 

Get the DICOM slice index (1-based) from slice offset (distance from the origin to the slice plane). Slice index is computed for the first available volume (the search order is background, foreground, label volume). If the return value is negative then then no slice index can be determined for the first available volume: SLICE_INDEX_ROTATED=the slice is rotated compared to the volume planes, SLICE_INDEX_OUT_OF_VOLUME=the slice plane is out of the volume SLICE_INDEX_NO_VOLUME=no volume is available

References GetLayerVolumeNode(), GetSliceIndexFromOffset(), and SLICE_INDEX_NO_VOLUME.

int vtkSlicerSliceLogic::GetSliceIndexFromOffset ( double  sliceOffset,
vtkMRMLVolumeNode volumeNode 
)

Get the DICOM slice index (1-based) from slice offset (distance from the origin to the slice plane). If the return value is negative then then no slice index can be determined: SLICE_INDEX_ROTATED=the slice is rotated compared to the volume planes, SLICE_INDEX_OUT_OF_VOLUME=the slice plane is out of the volume SLICE_INDEX_NO_VOLUME=the specified volume is not available

References vtkMRMLVolumeNode::GetIJKToRASMatrix(), vtkMRMLTransformNode::GetMatrixTransformToWorld(), vtkMRMLTransformableNode::GetParentTransformNode(), New(), SLICE_INDEX_NO_VOLUME, SLICE_INDEX_OUT_OF_VOLUME, and SLICE_INDEX_ROTATED.

Referenced by GetSliceIndexFromOffset(), and vtkSlicerSliceControllerWidget::SetSliceIndexEntryValueFromOffset().

double vtkSlicerSliceLogic::GetSliceOffset (  ) 

Get/Set the current distance from the origin to the slice plane

References New(), and SliceNode.

Referenced by SetSliceOffset(), and SnapSliceOffsetToIJK().

void vtkSlicerSliceLogic::GetVolumeRASBox ( vtkMRMLVolumeNode volumeNode,
double  rasDimensions[3],
double  rasCenter[3] 
) [static]
void vtkSlicerSliceLogic::GetVolumeSliceBounds ( vtkMRMLVolumeNode volumeNode,
double  sliceBounds[6] 
)

Get the min/max bounds of the volume

  • note these are not translated by the current slice offset so they can be used to calculate the range (e.g. of a slider) that operates in slice space

References GetVolumeRASBox(), j, k, mathExample::n, and New().

Referenced by GetBackgroundSliceBounds(), GetLowestVolumeSliceBounds(), and GetVolumeSliceDimensions().

void vtkSlicerSliceLogic::GetVolumeSliceDimensions ( vtkMRMLVolumeNode volumeNode,
double  sliceDimensions[3],
double  sliceCenter[3] 
)

Get the size of the volume, transformed to slice space

References GetVolumeSliceBounds().

Referenced by FitSliceToVolume(), and GetBackgroundSliceDimensions().

double * vtkSlicerSliceLogic::GetVolumeSliceSpacing ( vtkMRMLVolumeNode volumeNode  ) 

Get the spacing of the volume, transformed to slice space

  • to be used, for example, to set the slice increment for stepping a single voxel relative to the current slice view

References vtkMRMLVolumeNode::GetIJKToRASMatrix(), vtkMRMLTransformNode::GetMatrixTransformToWorld(), vtkMRMLTransformableNode::GetParentTransformNode(), vtkMRMLTransformNode::IsTransformToWorldLinear(), New(), vtkMRMLSliceNode::PrescribedSliceSpacingMode, and SliceSpacing.

Referenced by FitSliceToVolume(), GetBackgroundSliceSpacing(), and GetLowestVolumeSliceSpacing().

static vtkSlicerSliceLogic* vtkSlicerSliceLogic::New (  )  [static]
void vtkSlicerSliceLogic::operator= ( const vtkSlicerSliceLogic  )  [protected]

Reimplemented from vtkSlicerLogic.

void vtkSlicerSliceLogic::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
void vtkSlicerSliceLogic::ProcessLogicEvents (  )  [virtual]
virtual void vtkSlicerSliceLogic::ProcessLogicEvents ( vtkObject ,
unsigned long  ,
void *   
) [inline, virtual]
virtual void vtkSlicerSliceLogic::ProcessMRMLEvents (  )  [inline, virtual]

References ProcessMRMLEvents().

Referenced by ProcessMRMLEvents().

void vtkSlicerSliceLogic::ProcessMRMLEvents ( vtkObject caller,
unsigned long  event,
void *  callData 
) [virtual]

provide the virtual method that updates this Logic based on mrml changes and one that updates based on changes in the input logic (the slice layers in this case)

PROBABLY DONT NEED TO DO THAT And it causes load scene to override ID's if ( this->MRMLScene->GetNodeByID( this->SliceCompositeNode->GetForegroundVolumeID() ) == NULL ) { this->SliceCompositeNode->SetForegroundVolumeID(NULL); }

if ( this->MRMLScene->GetNodeByID( this->SliceCompositeNode->GetLabelVolumeID() ) == NULL ) { this->SliceCompositeNode->SetLabelVolumeID(NULL); }

if ( this->MRMLScene->GetNodeByID( this->SliceCompositeNode->GetBackgroundVolumeID() ) == NULL ) { this->SliceCompositeNode->SetBackgroundVolumeID(NULL); }

Reimplemented from vtkSlicerLogic.

References vtkMRMLScene::AddNode(), CreateSliceModel(), DeleteSliceModel(), vtkMRMLCrosshairNode::GetCrosshairName(), vtkMRMLScene::GetNthNodeByClass(), vtkMRMLScene::GetNumberOfNodesByClass(), vtkSlicerLogic::MRMLScene, mathExample::n, New(), vtkMRMLScene::NewSceneEvent, vtkMRMLScene::NodeAddedEvent, vtkMRMLScene::NodeRemovedEvent, vtkMRMLScene::SceneCloseEvent, vtkMRMLScene::SceneRestoredEvent, vtkMRMLCrosshairNode::SetCrosshairName(), UpdatePipeline(), UpdateSliceCompositeNode(), UpdateSliceNode(), and UpdateSliceNodeFromLayout().

Referenced by vtkSlicerApplicationGUI::AddMainSliceGUI(), vtkSlicerApplicationLogic::CreateSliceLogics(), and vtkChangeTrackerGUI::SliceLogicDefine().

void vtkSlicerSliceLogic::SetBackgroundLayer ( vtkSlicerSliceLayerLogic BackgroundLayer  ) 
void vtkSlicerSliceLogic::SetForegroundLayer ( vtkSlicerSliceLayerLogic ForegroundLayer  ) 
void vtkSlicerSliceLogic::SetForegroundOpacity ( double  ForegroundOpacity  ) 
void vtkSlicerSliceLogic::SetLabelLayer ( vtkSlicerSliceLayerLogic LabelLayer  ) 
void vtkSlicerSliceLogic::SetLabelOpacity ( double  LabelOpacity  ) 
void vtkSlicerSliceLogic::SetSliceCompositeNode ( vtkMRMLSliceCompositeNode SliceCompositeNode  ) 
void vtkSlicerSliceLogic::SetSliceNode ( vtkMRMLSliceNode SliceNode  ) 
void vtkSlicerSliceLogic::SetSliceOffset ( double  offset  ) 
void vtkSlicerSliceLogic::SnapSliceOffsetToIJK (  ) 
void vtkSlicerSliceLogic::UpdateImageData (  )  [inline]

Referenced by UpdatePipeline().

void vtkSlicerSliceLogic::UpdatePipeline (  ) 
void vtkSlicerSliceLogic::UpdateSliceCompositeNode (  ) 
void vtkSlicerSliceLogic::UpdateSliceNode (  ) 
void vtkSlicerSliceLogic::UpdateSliceNodeFromLayout (  ) 
vtkSlicerSliceLogic::vtkGetMacro ( LabelOpacity  ,
double   
)

The opacity of the Label slice layer TODO: this will eventually be generalized to a per-layer compositing function -- could be checkerboard or other filter

vtkSlicerSliceLogic::vtkGetMacro ( ForegroundOpacity  ,
double   
)

The opacity of the forground slice layer TODO: this will eventually be generalized to a per-layer compositing function -- could be checkerboard or other filter

vtkSlicerSliceLogic::vtkGetObjectMacro ( ExtractModelTexture  ,
vtkImageReslice   
)

An image reslice instance to pull a single slice from the volume that represents the filmsheet display output

vtkSlicerSliceLogic::vtkGetObjectMacro ( LookupTableCollection  ,
vtkCollection   
)

All the LookupTable objects to color the PolyData object

vtkSlicerSliceLogic::vtkGetObjectMacro ( PolyDataCollection  ,
vtkPolyDataCollection   
)

All the PolyData objects to render

vtkSlicerSliceLogic::vtkGetObjectMacro ( Blend  ,
vtkImageBlend   
)

The compositing filter TODO: this will eventually be generalized to a per-layer compositing function

vtkSlicerSliceLogic::vtkGetObjectMacro ( SliceModelTransformNode  ,
vtkMRMLLinearTransformNode   
)

Model slice plane transform from xy to RAS

vtkSlicerSliceLogic::vtkGetObjectMacro ( SliceModelDisplayNode  ,
vtkMRMLModelDisplayNode   
)

Model slice plane display props

vtkSlicerSliceLogic::vtkGetObjectMacro ( SliceModelNode  ,
vtkMRMLModelNode   
)

Model slice plane

vtkSlicerSliceLogic::vtkGetObjectMacro ( LabelLayer  ,
vtkSlicerSliceLayerLogic   
)

The Label slice layer TODO: this will eventually be generalized to a list of layers

vtkSlicerSliceLogic::vtkGetObjectMacro ( ForegroundLayer  ,
vtkSlicerSliceLayerLogic   
)

The forground slice layer TODO: this will eventually be generalized to a list of layers

vtkSlicerSliceLogic::vtkGetObjectMacro ( BackgroundLayer  ,
vtkSlicerSliceLayerLogic   
)

The background slice layer TODO: this will eventually be generalized to a list of layers

vtkSlicerSliceLogic::vtkGetObjectMacro ( SliceCompositeNode  ,
vtkMRMLSliceCompositeNode   
)

The mrml slice node for this slice logic

vtkSlicerSliceLogic::vtkGetObjectMacro ( SliceNode  ,
vtkMRMLSliceNode   
)

The mrml slice node for this slice logic

vtkSlicerSliceLogic::vtkTypeRevisionMacro ( vtkSlicerSliceLogic  ,
vtkSlicerLogic   
)

Member Data Documentation

vtkImageBlend* vtkSlicerSliceLogic::Blend [protected]
vtkImageReslice* vtkSlicerSliceLogic::ExtractModelTexture [protected]
vtkPolyDataCollection* vtkSlicerSliceLogic::PolyDataCollection [protected]

Referenced by GetSliceIndexFromOffset().

double vtkSlicerSliceLogic::SliceSpacing[3] [protected]

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

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1