![]() |
Slicer 5.9
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>
Public Types | |
enum | { LayerNone = vtkMRMLSliceCompositeNode::LayerNone , LayerBackground = vtkMRMLSliceCompositeNode::LayerBackground , LayerForeground = vtkMRMLSliceCompositeNode::LayerForeground , LayerLabel = vtkMRMLSliceCompositeNode::LayerLabel , Layer_Last } |
enum | { CompositeModifiedEvent = 18000 } |
CompositeModifiedEvent is generated when slice composite node is modified. More... | |
typedef vtkMRMLAbstractLogic | Superclass |
![]() | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
vtkMRMLSliceNode * | AddSliceNode (const char *layoutName) |
Convenience function for adding a slice node and setting it in this logic. | |
void | EndSliceCompositeNodeInteraction () |
Indicate an interaction with the slice composite node has been completed. | |
void | EndSliceNodeInteraction () |
Indicate an interaction with the slice node has been completed. | |
void | EndSliceOffsetInteraction () |
Indicate the slice offset value has completed its change. | |
virtual bool | EnterMRMLCallback () const |
void | FitFOVToBackground (double fov) |
void | FitSliceToAll (int width=-1, int height=-1) |
adjust the node's field of view to match the extent of all volume layers | |
void | FitSliceToBackground (int width=-1, int height=-1) |
void | FitSliceToFirst (int width=-1, int height=-1) |
adjust the node's field of view to match the extent of the first selected volume (background, foregorund, labelmap) | |
void | FitSliceToVolume (vtkMRMLVolumeNode *volumeNode, int width, int height) |
adjust the node's field of view to match the extent of the volume | |
void | FitSliceToVolumes (vtkCollection *volumeNodes, int width, int height) |
adjust the node's field of view to match the extent of the volume | |
void | GetBackgroundRASBox (double rasDimensions[3], double rasCenter[3]) |
Get the size of the volume, transformed to RAS space. | |
void | GetBackgroundSliceBounds (double sliceBounds[6]) |
void | GetBackgroundSliceDimensions (double sliceDimensions[3], double sliceCenter[3]) |
Get the size of the volume, transformed to slice space. | |
double * | GetBackgroundSliceSpacing () VTK_SIZEHINT(3) |
void | GetBackgroundWindowLevelAndRange (double &window, double &level, double &rangeLow, double &rangeHigh) |
Helper to get the background layer Window/Level and intensity range. | |
void | GetBackgroundWindowLevelAndRange (double &window, double &level, double &rangeLow, double &rangeHigh, bool &autoWindowLevel) |
vtkImageBlend * | GetBlend () |
vtkImageBlend * | GetBlendUVW () |
virtual const char * | GetClassName () |
int | GetEditableLayerAtWorldPosition (double worldPos[3], bool backgroundVolumeEditable=true, bool foregroundVolumeEditable=true) |
virtual vtkImageReslice * | GetExtractModelTexture () |
void | GetForegroundWindowLevelAndRange (double &window, double &level, double &rangeLow, double &rangeHigh) |
Helper to get the foreground layer Window/Level and intensity range. | |
void | GetForegroundWindowLevelAndRange (double &window, double &level, double &rangeLow, double &rangeHigh, bool &autoWindowLevel) |
vtkAlgorithmOutput * | GetImageDataConnection () |
vtkMRMLVolumeNode * | GetLayerVolumeNode (int layer) |
void | GetLowestVolumeSliceBounds (double sliceBounds[6], bool useVoxelCenter=false) |
double * | GetLowestVolumeSliceSpacing () VTK_SIZEHINT(3) |
vtkMRMLSliceLayerLogic * | GetNthLayer (int layerIndex) |
vtkAlgorithmOutput * | GetNthLayerImageDataConnection (int layerIndex) |
vtkAlgorithmOutput * | GetNthLayerImageDataConnectionUVW (int layerIndex) |
vtkMRMLVolumeNode * | GetNthLayerVolumeNode (int layerIndex) |
std::vector< vtkMRMLDisplayNode * > | GetPolyDataDisplayNodes () |
Get all slice displaynodes creating PolyData models like glyphs etc. | |
void | GetSliceBounds (double sliceBounds[6]) |
Get the largest slice bounding box for all volumes in layers. | |
vtkMRMLSliceDisplayNode * | GetSliceDisplayNode () |
Slice plane display properties. | |
int | GetSliceIndexFromOffset (double sliceOffset) |
int | GetSliceIndexFromOffset (double sliceOffset, vtkMRMLVolumeNode *volumeNode) |
virtual vtkMRMLModelDisplayNode * | GetSliceModelDisplayNode () |
virtual vtkMRMLModelNode * | GetSliceModelNode () |
Model slice plane. | |
virtual vtkMRMLLinearTransformNode * | GetSliceModelTransformNode () |
Model slice plane transform from xy to RAS. | |
virtual vtkMRMLSliceNode * | GetSliceNode () |
The MRML slice node for this slice logic. | |
bool | GetSliceOffsetRangeResolution (double range[2], double &resolution) |
void | GetVolumeSliceBounds (vtkMRMLVolumeNode *volumeNode, double sliceBounds[6], bool useVoxelCenter=false) |
void | GetVolumeSliceDimensions (vtkMRMLVolumeNode *volumeNode, double sliceDimensions[3], double sliceCenter[3]) |
Get the size of the volume, transformed to slice space. | |
double * | GetVolumeSliceSpacing (vtkMRMLVolumeNode *volumeNode) VTK_SIZEHINT(3) |
bool | HasInputs () |
bool | HasUVWInputs () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | ResizeSliceNode (double newWidth, double newHeight) |
void | RotateSliceToLowestVolumeAxes (bool forceSlicePlaneToSingleSlice=true) |
void | SetBackgroundWindowLevel (double window, double level) |
Helper to set the background layer Window/Level. | |
void | SetForegroundWindowLevel (double window, double level) |
Helper to set the foreground layer Window/Level. | |
void | SetNthLayer (int layerIndex, vtkMRMLSliceLayerLogic *layer) |
void | SetSliceExtentsToSliceNode () |
Set slice extents to all layers. | |
void | SetSliceNode (vtkMRMLSliceNode *newSliceNode) |
void | SnapSliceOffsetToIJK () |
void | StartSliceCompositeNodeInteraction (unsigned int parameters) |
void | StartSliceNodeInteraction (unsigned int parameters) |
void | StartSliceOffsetInteraction () |
Indicate the slice offset value is starting to change. | |
void | UpdateImageData () |
Internally used by UpdatePipeline. | |
void | UpdatePipeline () |
update the pipeline to reflect the current state of the nodes | |
void | UpdateSliceCompositeNode () |
Manage and synchronize the SliceCompositeNode. | |
void | UpdateSliceNode () |
Manage and synchronize the SliceNode. | |
void | UpdateSliceNodeFromLayout () |
Update slicer node given a layout name. | |
virtual vtkMRMLSliceCompositeNode * | GetSliceCompositeNode () |
void | SetSliceCompositeNode (vtkMRMLSliceCompositeNode *SliceCompositeNode) |
vtkMRMLSliceLayerLogic * | GetBackgroundLayer () |
void | SetBackgroundLayer (vtkMRMLSliceLayerLogic *BackgroundLayer) |
vtkMRMLSliceLayerLogic * | GetForegroundLayer () |
void | SetForegroundLayer (vtkMRMLSliceLayerLogic *ForegroundLayer) |
vtkMRMLSliceLayerLogic * | GetLabelLayer () |
void | SetLabelLayer (vtkMRMLSliceLayerLogic *LabelLayer) |
double | GetSliceOffset () |
void | SetSliceOffset (double offset) |
void | CreateSliceModel () |
void | DeleteSliceModel () |
![]() | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. | |
Static Public Member Functions | |
static vtkMRMLSliceCompositeNode * | GetSliceCompositeNode (vtkMRMLSliceNode *node) |
Return the associated slicerlayer nodes. | |
static vtkMRMLSliceNode * | GetSliceNode (vtkMRMLSliceCompositeNode *node) |
Return the associated slice node. | |
static void | GetVolumeRASBox (vtkMRMLVolumeNode *volumeNode, double rasDimensions[3], double rasCenter[3]) |
Get the size of the volume, transformed to RAS space. | |
static bool | IsSliceModelDisplayNode (vtkMRMLDisplayNode *mrmlDisplayNode) |
static bool | IsSliceModelNode (vtkMRMLNode *mrmlNode) |
static int | IsTypeOf (const char *type) |
static vtkMRMLSliceLogic * | New () |
The Usual VTK class functions. | |
static vtkMRMLSliceLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Static Public Attributes | |
static const int | SLICE_INDEX_NO_VOLUME |
static const int | SLICE_INDEX_OUT_OF_VOLUME |
static const int | SLICE_INDEX_ROTATED |
static const std::string | SLICE_MODEL_NODE_NAME_SUFFIX |
Protected Types | |
typedef std::vector< LayerListItem > | LayerList |
typedef std::vector< LayerListItem >::const_iterator | LayerListConstIterator |
typedef vtkSmartPointer< vtkMRMLSliceLayerLogic > | LayerListItem |
typedef std::vector< LayerListItem >::iterator | LayerListIterator |
Protected Member Functions | |
vtkMRMLVolumeNode * | GetFirstVolumeNode () |
bool | IsEventInsideVolume (bool background, double worldPos[3]) |
void | OnMRMLNodeModified (vtkMRMLNode *node) override |
void | OnMRMLSceneEndImport () override |
void | OnMRMLSceneEndRestore () override |
void | OnMRMLSceneNodeAdded (vtkMRMLNode *node) override |
void | OnMRMLSceneNodeRemoved (vtkMRMLNode *node) override |
void | OnMRMLSceneStartClose () override |
void | ProcessMRMLLogicsEvents () |
void | ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData) override |
process logic events | |
void | SetMRMLSceneInternal (vtkMRMLScene *newScene) override |
void | SetNthLayerVolumeNode (int layerIndex, vtkMRMLVolumeNode *volumeNode) |
Set volume associated with a layer. | |
void | SetupCrosshairNode () |
void | UpdateFromMRMLScene () override |
void | UpdateSliceNodes () |
bool | VolumeWindowLevelEditable (const char *vtkNotUsed(volumeNodeID)) |
Deprecated. Returns true if the volume's window/level values are editable on the GUI. | |
vtkMRMLSliceLogic () | |
~vtkMRMLSliceLogic () override | |
void | SetWindowLevel (int layer, double window, double level) |
void | GetWindowLevelAndRange (int layer, double &window, double &level, double &rangeLow, double &rangeHigh, bool &autoWindowLevel) |
![]() | |
int | EndModify (bool wasModifying) |
virtual bool | EnterMRMLLogicsCallback () const |
virtual bool | EnterMRMLNodesCallback () const |
virtual bool | EnterMRMLSceneCallback () const |
bool | GetDisableModifiedEvent () const |
int | GetInMRMLLogicsCallbackFlag () const |
int | GetInMRMLNodesCallbackFlag () const |
int | GetInMRMLSceneCallbackFlag () const |
vtkCallbackCommand * | GetMRMLLogicsCallbackCommand () |
vtkObserverManager * | GetMRMLLogicsObserverManager () const |
vtkCallbackCommand * | GetMRMLNodesCallbackCommand () |
vtkObserverManager * | GetMRMLNodesObserverManager () const |
vtkCallbackCommand * | GetMRMLSceneCallbackCommand () |
vtkObserverManager * | GetMRMLSceneObserverManager () const |
int | GetPendingModifiedEventCount () const |
int | GetProcessingMRMLSceneEvent () const |
Return the event id currently processed or 0 if any. | |
int | InvokePendingModifiedEvent () |
void | Modified () override |
virtual void | ObserveMRMLScene () |
virtual void | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneEndClose () |
virtual void | OnMRMLSceneNew () |
virtual void | OnMRMLSceneStartBatchProcess () |
virtual void | OnMRMLSceneStartImport () |
virtual void | OnMRMLSceneStartRestore () |
virtual void | ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | RegisterNodes () |
void | SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=nullptr) |
void | SetDisableModifiedEvent (bool onOff) |
void | SetInMRMLLogicsCallbackFlag (int flag) |
void | SetInMRMLNodesCallbackFlag (int flag) |
void | SetInMRMLSceneCallbackFlag (int flag) |
void | SetProcessingMRMLSceneEvent (int event) |
bool | StartModify () |
virtual void | UnobserveMRMLScene () |
vtkMRMLAbstractLogic () | |
~vtkMRMLAbstractLogic () override | |
Static Protected Member Functions | |
static vtkMRMLSliceCompositeNode * | GetSliceCompositeNode (vtkMRMLScene *scene, const char *layoutName) |
static vtkMRMLSliceNode * | GetSliceNode (vtkMRMLScene *scene, const char *layoutName) |
static bool | UpdateAddSubOperation (vtkImageMathematics *addSubMath, int compositing) |
Helper to update the operation to perform based on compositing mode. | |
static bool | UpdateBlendLayers (vtkImageBlend *blend, const std::deque< SliceLayerInfo > &layers, bool clipToBackgroundVolume) |
static bool | UpdateFractions (BlendPipeline *pipeline, const std::vector< vtkAlgorithmOutput * > &imagePorts, const std::vector< double > &opacities) |
Helper to update layers opacity when adding/subtracting the background layer. | |
static bool | UpdateFractions (vtkImageMathematics *fraction, double opacity) |
Helper to update layer opacity when adding/subtracting the background layer. | |
static void | UpdateReconstructionSlab (vtkMRMLSliceLogic *sliceLogic, vtkMRMLSliceLayerLogic *sliceLayerLogic) |
Helper to update reconstruction slab settings for a given layer. | |
![]() | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. | |
static void | MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Protected Attributes | |
bool | AddingSliceModelNodes |
vtkImageReslice * | ExtractModelTexture |
vtkAlgorithmOutput * | ImageDataConnection |
LayerList | Layers |
BlendPipeline * | Pipeline |
BlendPipeline * | PipelineUVW |
vtkMRMLSliceCompositeNode * | SliceCompositeNode |
vtkMRMLModelDisplayNode * | SliceModelDisplayNode |
vtkMRMLModelNode * | SliceModelNode |
vtkMRMLLinearTransformNode * | SliceModelTransformNode |
vtkMRMLSliceNode * | SliceNode |
double | SliceSpacing [3] |
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 MRML volumes 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 58 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 461 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 463 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 460 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 462 of file vtkMRMLSliceLogic.h.
Definition at line 63 of file vtkMRMLSliceLogic.h.
anonymous enum |
Enumerator | |
---|---|
LayerNone | |
LayerBackground | |
LayerForeground | |
LayerLabel | |
Layer_Last |
Definition at line 72 of file vtkMRMLSliceLogic.h.
anonymous enum |
CompositeModifiedEvent is generated when slice composite node is modified.
Enumerator | |
---|---|
CompositeModifiedEvent |
Definition at line 67 of file vtkMRMLSliceLogic.h.
|
protected |
|
overrideprotected |
vtkMRMLSliceNode * vtkMRMLSliceLogic::AddSliceNode | ( | const char * | layoutName | ) |
Convenience function for adding a slice node and setting it in this logic.
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 |
Reimplemented to avoid calling ProcessMRMLSceneEvents when we are adding 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
void vtkMRMLSliceLogic::FitSliceToBackground | ( | int | width = -1, |
int | height = -1 ) |
Adjust the node's field of view to match the extent of the volume visible in the slice's background. This is a more advanced version of FitSliceToAll, which takes into account that in case of ClipToBackgroundVolume is enabled then all layers above the background volume will be clipped to the background volume's extents.
void vtkMRMLSliceLogic::FitSliceToFirst | ( | int | width = -1, |
int | height = -1 ) |
adjust the node's field of view to match the extent of the first selected volume (background, foregorund, labelmap)
void vtkMRMLSliceLogic::FitSliceToVolume | ( | vtkMRMLVolumeNode * | volumeNode, |
int | width, | ||
int | height ) |
adjust the node's field of view to match the extent of the volume
void vtkMRMLSliceLogic::FitSliceToVolumes | ( | vtkCollection * | volumeNodes, |
int | width, | ||
int | height ) |
adjust the node's field of view to match the extent of the volume
vtkMRMLSliceLayerLogic * vtkMRMLSliceLogic::GetBackgroundLayer | ( | ) |
The background slice layer
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 get the background layer Window/Level and intensity range.
void vtkMRMLSliceLogic::GetBackgroundWindowLevelAndRange | ( | double & | window, |
double & | level, | ||
double & | rangeLow, | ||
double & | rangeHigh, | ||
bool & | autoWindowLevel ) |
Helper to get the background layer Window/Level, intensity range and status of automatic Window/Level setting
vtkImageBlend * vtkMRMLSliceLogic::GetBlend | ( | ) |
The compositing filter TODO: this will eventually be generalized to a per-layer compositing function
vtkImageBlend * vtkMRMLSliceLogic::GetBlendUVW | ( | ) |
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
int vtkMRMLSliceLogic::GetEditableLayerAtWorldPosition | ( | double | worldPos[3], |
bool | backgroundVolumeEditable = true, | ||
bool | foregroundVolumeEditable = true ) |
Get volume at the specified world position that should be used for interactions, such as window/level adjustments. backgroundVolumeEditable and foregroundVolumeEditable can be used specify that a volume is not editable (even if it is visible at the given position).
|
virtual |
An image reslice instance to pull a single slice from the volume that represents the filmsheet display output
|
protected |
Get the first available volume (search order: background, foreground, label) The method is not public because in the future we may want to change internal implementation details (for example, we may ignore volumes without vtkImageData or those that have empty extent).
vtkMRMLSliceLayerLogic * vtkMRMLSliceLogic::GetForegroundLayer | ( | ) |
The foreground slice layer
void vtkMRMLSliceLogic::GetForegroundWindowLevelAndRange | ( | double & | window, |
double & | level, | ||
double & | rangeLow, | ||
double & | rangeHigh ) |
Helper to get the foreground layer Window/Level and intensity range.
void vtkMRMLSliceLogic::GetForegroundWindowLevelAndRange | ( | double & | window, |
double & | level, | ||
double & | rangeLow, | ||
double & | rangeHigh, | ||
bool & | autoWindowLevel ) |
Helper to get the foreground layer Window/Level, intensity range and status of automatic Window/Level setting
vtkAlgorithmOutput * vtkMRMLSliceLogic::GetImageDataConnection | ( | ) |
the tail of the pipeline – returns nullptr if none of the inputs exist
vtkMRMLSliceLayerLogic * vtkMRMLSliceLogic::GetLabelLayer | ( | ) |
The Label slice layer
vtkMRMLVolumeNode * vtkMRMLSliceLogic::GetLayerVolumeNode | ( | int | layer | ) |
void vtkMRMLSliceLogic::GetLowestVolumeSliceBounds | ( | double | sliceBounds[6], |
bool | useVoxelCenter = false ) |
Get the min/max bounds of the lowest volume layer (background, foreground, label)
double * vtkMRMLSliceLogic::GetLowestVolumeSliceSpacing | ( | ) |
Get the spacing of the lowest volume layer (background, foreground, label), transformed to slice space
vtkMRMLSliceLayerLogic * vtkMRMLSliceLogic::GetNthLayer | ( | int | layerIndex | ) |
vtkAlgorithmOutput * vtkMRMLSliceLogic::GetNthLayerImageDataConnection | ( | int | layerIndex | ) |
vtkAlgorithmOutput * vtkMRMLSliceLogic::GetNthLayerImageDataConnectionUVW | ( | int | layerIndex | ) |
vtkMRMLVolumeNode * vtkMRMLSliceLogic::GetNthLayerVolumeNode | ( | int | layerIndex | ) |
Get the volume node corresponding to layer (0=background, 1=foreground, 2=label)
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 |
The MRML slice node for this slice logic
|
staticprotected |
|
static |
Return the associated slicerlayer nodes.
vtkMRMLSliceDisplayNode * vtkMRMLSliceLogic::GetSliceDisplayNode | ( | ) |
Slice plane display properties.
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
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
|
virtual |
Model slice plane display properties. The method is deprecated, use SliceDisplayNode instead.
|
virtual |
Model slice plane.
|
virtual |
Model slice plane transform from xy to RAS.
|
virtual |
The MRML slice node for this slice logic.
|
staticprotected |
|
static |
Return the associated slice node.
double vtkMRMLSliceLogic::GetSliceOffset | ( | ) |
Get/Set the current distance from the origin to the slice plane
bool vtkMRMLSliceLogic::GetSliceOffsetRangeResolution | ( | double | range[2], |
double & | resolution ) |
Get range and resolution for slice offset sliders. Returns false if the information cannot be determined.
|
static |
Get the size of the volume, transformed to RAS space.
void vtkMRMLSliceLogic::GetVolumeSliceBounds | ( | vtkMRMLVolumeNode * | volumeNode, |
double | sliceBounds[6], | ||
bool | useVoxelCenter = false ) |
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
|
protected |
bool vtkMRMLSliceLogic::HasInputs | ( | ) |
Return True if at least one layer has an image data
bool vtkMRMLSliceLogic::HasUVWInputs | ( | ) |
Return True if at least one layer has an UVW image data
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
|
protected |
Returns true if position is inside the selected layer volume. Use background flag to choose between foreground/background layer.
|
static |
Return true if the display node is a volume slice node display node by checking the attribute SliceLogic.IsSliceModelDisplayNode Returns false if the attribute is not present, true if the attribute is present and not equal to zero
|
static |
Return true if the node is a model node that has the default volume slice node name suffix, false otherwise
|
static |
|
static |
The Usual VTK class functions.
|
overrideprotectedvirtual |
Called after the corresponding MRML event is triggered.
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::EndImportEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::EndRestoreEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::NodeRemovedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::StartCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
override |
|
protected |
|
overrideprotectedvirtual |
process logic events
Reimplemented from vtkMRMLAbstractLogic.
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::RotateSliceToLowestVolumeAxes | ( | bool | forceSlicePlaneToSingleSlice = true | ) |
Rotate slice view to match axes of the lowest volume layer (background, foreground, label).
forceSlicePlaneToSingleSlice | If the volume is single-slice and forceSlicePlaneToSingleSlice is enabled then slice view will be aligned with the volume's slice plane. If the flag is disabled of the volume has more than one slice then the slice view will be rotated to the closest orthogonal axis. |
|
static |
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::SetForegroundWindowLevel | ( | double | window, |
double | level ) |
Helper to set the foreground layer Window/Level.
void vtkMRMLSliceLogic::SetLabelLayer | ( | vtkMRMLSliceLayerLogic * | LabelLayer | ) |
|
overrideprotectedvirtual |
Called each time a new scene is set. Can be reimplemented in derived 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.
void vtkMRMLSliceLogic::SetNthLayer | ( | int | layerIndex, |
vtkMRMLSliceLayerLogic * | layer ) |
|
protected |
Set volume associated with a layer.
void vtkMRMLSliceLogic::SetSliceCompositeNode | ( | vtkMRMLSliceCompositeNode * | SliceCompositeNode | ) |
void vtkMRMLSliceLogic::SetSliceExtentsToSliceNode | ( | ) |
Set slice extents to all layers.
void vtkMRMLSliceLogic::SetSliceNode | ( | vtkMRMLSliceNode * | newSliceNode | ) |
void vtkMRMLSliceLogic::SetSliceOffset | ( | double | offset | ) |
|
protected |
|
protected |
Helper to get/set Window/Level in any layer
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.
|
staticprotected |
Helper to update the operation to perform based on compositing mode.
|
staticprotected |
Helper to update input of blend filter from a set of layers. It minimizes changes to the imaging pipeline (does not remove and re-add an input if it is not changed) because rebuilding of the pipeline is a relatively expensive operation.
|
staticprotected |
Helper to update layers opacity when adding/subtracting the background layer.
|
staticprotected |
Helper to update layer opacity when adding/subtracting the background layer.
|
overrideprotectedvirtual |
Called every time 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
|
staticprotected |
Helper to update reconstruction slab settings for a given layer.
void vtkMRMLSliceLogic::UpdateSliceCompositeNode | ( | ) |
Manage and synchronize the SliceCompositeNode.
void vtkMRMLSliceLogic::UpdateSliceNode | ( | ) |
Manage and synchronize the SliceNode.
void vtkMRMLSliceLogic::UpdateSliceNodeFromLayout | ( | ) |
Update slicer node given a layout name.
|
protected |
|
inlineprotected |
Deprecated. Returns true if the volume's window/level values are editable on the GUI.
Definition at line 453 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 467 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 474 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 475 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 465 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 472 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 473 of file vtkMRMLSliceLogic.h.
|
static |
Definition at line 329 of file vtkMRMLSliceLogic.h.
|
static |
Definition at line 328 of file vtkMRMLSliceLogic.h.
|
static |
Definition at line 327 of file vtkMRMLSliceLogic.h.
|
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 364 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 470 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 478 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 477 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 479 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 469 of file vtkMRMLSliceLogic.h.
|
protected |
Definition at line 480 of file vtkMRMLSliceLogic.h.