|
Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Slicer logic class for slice manipulation. More...
#include <Libs/MRML/Logic/vtkMRMLSliceLogic.h>


Slicer logic class for slice manipulation.
This class manages the logic associated with display of slice windows (but not the GUI). Features of the class include: -- a back-to-front list of MrmlVolumes to be displayed -- a compositing mode for each volume layer (opacity, outline, glyph, checkerboard, etc) -- each layer is required to provide an RGBA image in the space defined by the vtkMRMLSliceNode
This class manages internal vtk pipelines that create an output vtkImageData which can be used by the vtkSlicerSliceGUI class to display the resulting composite image or it can be used as a texture map in a vtkSlicerView. This class can also be used for resampling volumes for further computation.
Definition at line 53 of file vtkMRMLSliceLogic.h.
| vtkMRMLSliceLogic::vtkMRMLSliceLogic | ( | ) | [protected] |
| virtual vtkMRMLSliceLogic::~vtkMRMLSliceLogic | ( | ) | [protected, virtual] |
| void vtkMRMLSliceLogic::CreateSliceModel | ( | ) |
Make a slice model with the current configuration
| void vtkMRMLSliceLogic::DeleteSliceModel | ( | ) |
| void vtkMRMLSliceLogic::EndSliceCompositeNodeInteraction | ( | ) |
Indicate an interaction with the slice composite node has been completed.
| void vtkMRMLSliceLogic::EndSliceNodeInteraction | ( | ) |
Indicate an interaction with the slice node has been completed.
| void vtkMRMLSliceLogic::EndSliceOffsetInteraction | ( | ) |
Indicate the slice offset value has completed its change.
| virtual bool vtkMRMLSliceLogic::EnterMRMLCallback | ( | ) | const [virtual] |
Reimplemented to avoir calling ProcessMRMLSceneEvents when we are added the MRMLModelNode into the scene
| void vtkMRMLSliceLogic::FitFOVToBackground | ( | double | fov | ) |
adjust the node's field of view to match the FOV the value fov will be applied to the smallest slice window dimension
| void vtkMRMLSliceLogic::FitSliceToAll | ( | int | width = -1, |
| int | height = -1 |
||
| ) |
adjust the node's field of view to match the extent of all volume layers (fits to first non-null layer)
| void vtkMRMLSliceLogic::FitSliceToBackground | ( | int | width, |
| int | height | ||
| ) |
adjust the node's field of view to match the extent of current background volume
| void vtkMRMLSliceLogic::FitSliceToVolume | ( | vtkMRMLVolumeNode * | volumeNode, |
| int | width, | ||
| int | height | ||
| ) |
adjust the node's field of view to match the extent of current background volume
| virtual vtkTransform* vtkMRMLSliceLogic::GetActiveSliceTransform | ( | ) | [virtual] |
The offset to the correct slice for lightbox mode
| virtual vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::GetBackgroundLayer | ( | ) | [virtual] |
The background slice layer TODO: this will eventually be generalized to a list of layers
| void vtkMRMLSliceLogic::GetBackgroundRASBox | ( | double | rasDimensions[3], |
| double | rasCenter[3] | ||
| ) |
Get the size of the volume, transformed to RAS space
| void vtkMRMLSliceLogic::GetBackgroundSliceBounds | ( | double | sliceBounds[6] | ) |
Get the min/max bounds of the volume
| void vtkMRMLSliceLogic::GetBackgroundSliceDimensions | ( | double | sliceDimensions[3], |
| double | sliceCenter[3] | ||
| ) |
Get the size of the volume, transformed to slice space
| double* vtkMRMLSliceLogic::GetBackgroundSliceSpacing | ( | ) |
Get the spacing of the volume, transformed to slice space
| void vtkMRMLSliceLogic::GetBackgroundWindowLevelAndRange | ( | double & | window, |
| double & | level, | ||
| double & | rangeLow, | ||
| double & | rangeHigh | ||
| ) |
Helper to aget the background layer Window/Level
| virtual vtkImageBlend* vtkMRMLSliceLogic::GetBlend | ( | ) | [virtual] |
The compositing filter TODO: this will eventually be generalized to a per-layer compositing function
| virtual vtkImageBlend* vtkMRMLSliceLogic::GetBlendUVW | ( | ) | [virtual] |
| virtual vtkImageReslice* vtkMRMLSliceLogic::GetExtractModelTexture | ( | ) | [virtual] |
An image reslice instance to pull a single slice from the volume that represents the filmsheet display output
| virtual vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::GetForegroundLayer | ( | ) | [virtual] |
The forground slice layer TODO: this will eventually be generalized to a list of layers
| virtual double vtkMRMLSliceLogic::GetForegroundOpacity | ( | ) | [virtual] |
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
| vtkImageData* vtkMRMLSliceLogic::GetImageData | ( | ) |
the tail of the pipeline -- returns NULL if none of the inputs exist
| virtual vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::GetLabelLayer | ( | ) | [virtual] |
The Label slice layer TODO: this will eventually be generalized to a list of layers
| virtual double vtkMRMLSliceLogic::GetLabelOpacity | ( | ) | [virtual] |
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
| vtkMRMLVolumeNode* vtkMRMLSliceLogic::GetLayerVolumeNode | ( | int | layer | ) |
Get the volume node corresponding to layer (0=background, 1=foreground, 2=label)
| virtual vtkCollection* vtkMRMLSliceLogic::GetLookupTableCollection | ( | ) | [virtual] |
All the LookupTable objects to color the PolyData object
| void vtkMRMLSliceLogic::GetLowestVolumeSliceBounds | ( | double | sliceBounds[6] | ) |
Get the min/max bounds of the volume
| double* vtkMRMLSliceLogic::GetLowestVolumeSliceSpacing | ( | ) |
Get the spacing of the volume, transformed to slice space
| virtual char* vtkMRMLSliceLogic::GetName | ( | ) | [virtual] |
| virtual vtkPolyDataCollection* vtkMRMLSliceLogic::GetPolyDataCollection | ( | ) | [virtual] |
All the PolyData objects to render
| std::vector< vtkMRMLDisplayNode*> vtkMRMLSliceLogic::GetPolyDataDisplayNodes | ( | ) |
Get all slice displaynodes creating PolyData models like glyphs etc.
| void vtkMRMLSliceLogic::GetSliceBounds | ( | double | sliceBounds[6] | ) |
Get the largest slice bounding box for all volumes in layers
| virtual vtkMRMLSliceCompositeNode* vtkMRMLSliceLogic::GetSliceCompositeNode | ( | ) | [virtual] |
The MRML slice node for this slice logic
| static vtkMRMLSliceCompositeNode* vtkMRMLSliceLogic::GetSliceCompositeNode | ( | vtkMRMLSliceNode * | node | ) | [static] |
Return the associated slicerlayer nodes.
| int vtkMRMLSliceLogic::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
| int vtkMRMLSliceLogic::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
| virtual vtkMRMLModelDisplayNode* vtkMRMLSliceLogic::GetSliceModelDisplayNode | ( | ) | [virtual] |
Model slice plane display props
| virtual vtkMRMLModelNode* vtkMRMLSliceLogic::GetSliceModelNode | ( | ) | [virtual] |
Model slice plane
| virtual vtkMRMLLinearTransformNode* vtkMRMLSliceLogic::GetSliceModelTransformNode | ( | ) | [virtual] |
Model slice plane transform from xy to RAS
| virtual vtkMRMLSliceNode* vtkMRMLSliceLogic::GetSliceNode | ( | ) | [virtual] |
The MRML slice node for this slice logic
| double vtkMRMLSliceLogic::GetSliceOffset | ( | ) |
Get/Set the current distance from the origin to the slice plane
| static void vtkMRMLSliceLogic::GetVolumeRASBox | ( | vtkMRMLVolumeNode * | volumeNode, |
| double | rasDimensions[3], | ||
| double | rasCenter[3] | ||
| ) | [static] |
Get the size of the volume, transformed to RAS space
| void vtkMRMLSliceLogic::GetVolumeSliceBounds | ( | vtkMRMLVolumeNode * | volumeNode, |
| double | sliceBounds[6] | ||
| ) |
Get the min/max bounds of the volume
| void vtkMRMLSliceLogic::GetVolumeSliceDimensions | ( | vtkMRMLVolumeNode * | volumeNode, |
| double | sliceDimensions[3], | ||
| double | sliceCenter[3] | ||
| ) |
Get the size of the volume, transformed to slice space
| double* vtkMRMLSliceLogic::GetVolumeSliceSpacing | ( | vtkMRMLVolumeNode * | volumeNode | ) |
Get the spacing of the volume, transformed to slice space
| void vtkMRMLSliceLogic::Initialize | ( | vtkMRMLSliceNode * | newSliceNode | ) |
Convenient methods allowing to initialize SliceLogic given newSliceNode
| bool vtkMRMLSliceLogic::IsInitialized | ( | ) |
| static bool vtkMRMLSliceLogic::IsSliceModelNode | ( | vtkMRMLNode * | mrmlNode | ) | [static] |
Return true if the node is a model node that has the default volume slice node name suffix, false otherwise
| static vtkMRMLSliceLogic* vtkMRMLSliceLogic::New | ( | ) | [static] |
The Usual VTK class functions.
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLNodeModified | ( | vtkMRMLNode * | ) | [protected, virtual] |
Called after the corresponding MRML event is triggered.
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLSceneEndImport | ( | ) | [protected, virtual] |
If vtkMRMLScene::EndImportEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLSceneEndRestore | ( | ) | [protected, virtual] |
If vtkMRMLScene::EndRestoreEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLSceneNodeAdded | ( | vtkMRMLNode * | ) | [protected, virtual] |
If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLSceneNodeRemoved | ( | vtkMRMLNode * | ) | [protected, virtual] |
If vtkMRMLScene::NodeRemovedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::OnMRMLSceneStartClose | ( | ) | [protected, virtual] |
If vtkMRMLScene::StartCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
| void vtkMRMLSliceLogic::PrintSelf | ( | ostream & | os, |
| vtkIndent | indent | ||
| ) |
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::ProcessMRMLLogicsEvents | ( | vtkObject * | caller, |
| unsigned long | event, | ||
| void * | callData | ||
| ) | [protected, virtual] |
process logic events
Reimplemented from vtkMRMLAbstractLogic.
| void vtkMRMLSliceLogic::ProcessMRMLLogicsEvents | ( | ) | [protected] |
| void vtkMRMLSliceLogic::ResizeSliceNode | ( | double | newWidth, |
| double | newHeight | ||
| ) |
Adjust dimensions and fov based on the new viewport size. The size should be the viewport size (typically vtkRenderWindow), not the size of the renderers (important if it's in a lightbox mode). It must be called each time the renderwindow size is modified and each time the lightbox configuration is changed.
| void vtkMRMLSliceLogic::SetBackgroundLayer | ( | vtkMRMLSliceLayerLogic * | BackgroundLayer | ) |
| void vtkMRMLSliceLogic::SetBackgroundWindowLevel | ( | double | window, |
| double | level | ||
| ) |
Helper to set the background layer Window/Level
| void vtkMRMLSliceLogic::SetForegroundLayer | ( | vtkMRMLSliceLayerLogic * | ForegroundLayer | ) |
| void vtkMRMLSliceLogic::SetForegroundOpacity | ( | double | ForegroundOpacity | ) |
| void vtkMRMLSliceLogic::SetLabelLayer | ( | vtkMRMLSliceLayerLogic * | LabelLayer | ) |
| void vtkMRMLSliceLogic::SetLabelOpacity | ( | double | LabelOpacity | ) |
| virtual void vtkMRMLSliceLogic::SetMRMLSceneInternal | ( | vtkMRMLScene * | newScene | ) | [protected, virtual] |
Called each time a new scene is set. Can be reimplemented in derivated classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.
Reimplemented from vtkMRMLAbstractLogic.
| virtual void vtkMRMLSliceLogic::SetName | ( | const char * | ) | [virtual] |
Set / Get SliceLogic name.
| void vtkMRMLSliceLogic::SetSliceCompositeNode | ( | vtkMRMLSliceCompositeNode * | SliceCompositeNode | ) |
| void vtkMRMLSliceLogic::SetSliceExtentsToSliceNode | ( | ) |
Set slice extents to all layers
| void vtkMRMLSliceLogic::SetSliceNode | ( | vtkMRMLSliceNode * | newSliceNode | ) |
| void vtkMRMLSliceLogic::SetSliceOffset | ( | double | offset | ) |
| void vtkMRMLSliceLogic::SetupCrosshairNode | ( | ) | [protected] |
| void vtkMRMLSliceLogic::SnapSliceOffsetToIJK | ( | ) |
Set the current distance so that it corresponds to the closest center of a voxel in IJK space (integer value)
| void vtkMRMLSliceLogic::StartSliceCompositeNodeInteraction | ( | unsigned int | parameters | ) |
Indicate an interaction with the slice composite node is beginning. The parameters of the slice node being manipulated are passed as a bitmask. See vtkMRMLSliceNode::InteractionFlagType.
| void vtkMRMLSliceLogic::StartSliceNodeInteraction | ( | unsigned int | parameters | ) |
Indicate an interaction with the slice node is beginning. The parameters of the slice node being manipulated are passed as a bitmask. See vtkMRMLSliceNode::InteractionFlagType.
| void vtkMRMLSliceLogic::StartSliceOffsetInteraction | ( | ) |
Indicate the slice offset value is starting to change.
| virtual void vtkMRMLSliceLogic::UpdateFromMRMLScene | ( | ) | [protected, virtual] |
Called everytime the scene has been significantly changed. If the scene BatchProcessState events are observed (in SetMRMLSceneInternal() ), UpdateFromMRMLScene is called after each batch process (Close, Import, Restore...). It is also being called by default when a new scene is set (SetMRMLScene).
Reimplemented from vtkMRMLAbstractLogic.
| void vtkMRMLSliceLogic::UpdateImageData | ( | ) |
Internally used by UpdatePipeline.
| void vtkMRMLSliceLogic::UpdatePipeline | ( | ) |
update the pipeline to reflect the current state of the nodes
| void vtkMRMLSliceLogic::UpdateSliceCompositeNode | ( | ) |
Manage and syncronise the SliceCompositeNode
| void vtkMRMLSliceLogic::UpdateSliceNode | ( | ) |
Manage and syncronise the SliceNode
| void vtkMRMLSliceLogic::UpdateSliceNodeFromLayout | ( | ) |
Update slicer node given a layout name
| void vtkMRMLSliceLogic::UpdateSliceNodes | ( | ) | [protected] |
| vtkMRMLSliceLogic::vtkTypeRevisionMacro | ( | vtkMRMLSliceLogic | , |
| vtkMRMLAbstractLogic | |||
| ) |
vtkTransform* vtkMRMLSliceLogic::ActiveSliceTransform [protected] |
Definition at line 392 of file vtkMRMLSliceLogic.h.
bool vtkMRMLSliceLogic::AddingSliceModelNodes [protected] |
Definition at line 375 of file vtkMRMLSliceLogic.h.
vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::BackgroundLayer [protected] |
Definition at line 381 of file vtkMRMLSliceLogic.h.
vtkImageBlend* vtkMRMLSliceLogic::Blend [protected] |
Definition at line 388 of file vtkMRMLSliceLogic.h.
vtkImageBlend* vtkMRMLSliceLogic::BlendUVW [protected] |
Definition at line 389 of file vtkMRMLSliceLogic.h.
vtkImageReslice* vtkMRMLSliceLogic::ExtractModelTexture [protected] |
Definition at line 390 of file vtkMRMLSliceLogic.h.
vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::ForegroundLayer [protected] |
Definition at line 382 of file vtkMRMLSliceLogic.h.
double vtkMRMLSliceLogic::ForegroundOpacity [protected] |
Definition at line 385 of file vtkMRMLSliceLogic.h.
vtkImageData* vtkMRMLSliceLogic::ImageData [protected] |
Definition at line 391 of file vtkMRMLSliceLogic.h.
bool vtkMRMLSliceLogic::Initialized [protected] |
Definition at line 376 of file vtkMRMLSliceLogic.h.
vtkMRMLSliceLayerLogic* vtkMRMLSliceLogic::LabelLayer [protected] |
Definition at line 383 of file vtkMRMLSliceLogic.h.
double vtkMRMLSliceLogic::LabelOpacity [protected] |
Definition at line 386 of file vtkMRMLSliceLogic.h.
vtkCollection* vtkMRMLSliceLogic::LookupTableCollection [protected] |
Definition at line 395 of file vtkMRMLSliceLogic.h.
char* vtkMRMLSliceLogic::Name [protected] |
Definition at line 378 of file vtkMRMLSliceLogic.h.
vtkPolyDataCollection* vtkMRMLSliceLogic::PolyDataCollection [protected] |
Definition at line 394 of file vtkMRMLSliceLogic.h.
const int vtkMRMLSliceLogic::SLICE_INDEX_NO_VOLUME [static] |
Definition at line 309 of file vtkMRMLSliceLogic.h.
const int vtkMRMLSliceLogic::SLICE_INDEX_OUT_OF_VOLUME [static] |
Definition at line 308 of file vtkMRMLSliceLogic.h.
const int vtkMRMLSliceLogic::SLICE_INDEX_ROTATED [static] |
Definition at line 307 of file vtkMRMLSliceLogic.h.
const std::string vtkMRMLSliceLogic::SLICE_MODEL_NODE_NAME_SUFFIX [static] |
Default node name suffix for use with volume slice models to distinguish them as built in models rather than user accessible.
Definition at line 342 of file vtkMRMLSliceLogic.h.
Definition at line 380 of file vtkMRMLSliceLogic.h.
Definition at line 398 of file vtkMRMLSliceLogic.h.
vtkMRMLModelNode* vtkMRMLSliceLogic::SliceModelNode [protected] |
Definition at line 397 of file vtkMRMLSliceLogic.h.
Definition at line 399 of file vtkMRMLSliceLogic.h.
vtkMRMLSliceNode* vtkMRMLSliceLogic::SliceNode [protected] |
Definition at line 379 of file vtkMRMLSliceLogic.h.
double vtkMRMLSliceLogic::SliceSpacing[3] [protected] |
Definition at line 400 of file vtkMRMLSliceLogic.h.
1.7.4