Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLLayerDisplayableManager Class Reference

Displayable manager responsible for handling multiple displayable pipelines in sub-layers. More...

#include <Modules/Loadable/LayerDM/MRMLDM/vtkMRMLLayerDisplayableManager.h>

Inheritance diagram for vtkMRMLLayerDisplayableManager:
Collaboration diagram for vtkMRMLLayerDisplayableManager:

Public Types

typedef vtkMRMLAbstractDisplayableManager Superclass
 
- Public Types inherited from vtkMRMLAbstractDisplayableManager
typedef vtkMRMLAbstractLogic Superclass
 
- Public Types inherited from vtkMRMLAbstractLogic
typedef vtkObject Superclass
 
typedef void(vtkMRMLAbstractLogic::* TaskFunctionPointer) (void *clientdata)
 

Public Member Functions

bool CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override
 
virtual const char * GetClassName ()
 
vtkSmartPointer< vtkMRMLLayerDMPipeline > GetNodePipeline (vtkMRMLNode *node) const
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
bool ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override
 
- Public Member Functions inherited from vtkMRMLAbstractDisplayableManager
virtual std::string GetDataProbeInfoStringForPosition (double vtkNotUsed(xyz)[3])
 
virtual bool GetGrabFocus ()
 Displayable manager can indicate that it would like to get all events (even when mouse pointer is outside the window).
 
vtkMRMLInteractionNode * GetInteractionNode ()
 Convenient method to get the current InteractionNode.
 
virtual bool GetInteractive ()
 Displayable manager can indicate that the window is in interactive mode (faster updates).
 
vtkRenderWindowInteractor * GetInteractor ()
 Convenient method to get the WindowInteractor associated with the Renderer.
 
vtkRenderer * GetRenderer ()
 Get the default renderer for this displayable manager.
 
vtkRenderer * GetRenderer (int idx)
 
vtkMRMLSelectionNode * GetSelectionNode ()
 Convenient method to get the current SelectionNode.
 
bool IsCreated ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetMouseCursor (int cursor)
 
- Public Member Functions inherited from vtkMRMLAbstractLogic
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 bool IsRegisteredInFactory (vtkMRMLDisplayableManagerFactory *factory)
 true if the input factory is defined and displayable manager is present in the input factory
 
static int IsTypeOf (const char *type)
 
static vtkMRMLLayerDisplayableManager * New ()
 
static void RegisterInDefaultViews ()
 Register the DM in the 2D and 3D view factories.
 
static void RegisterInFactory (vtkMRMLDisplayableManagerFactory *factory)
 Register the Displayable Manager in the given input factory if it's not already registered.
 
static vtkMRMLLayerDisplayableManager * SafeDownCast (vtkObject *o)
 
static vtkSmartPointer< vtkImageData > RenderWindowBufferToImage (vtkRenderWindow *window)
 
static void RenderWindowBufferToImage (vtkRenderWindow *window, const vtkSmartPointer< vtkImageData > &imageData)
 
- Static Public Member Functions inherited from vtkMRMLAbstractDisplayableManager
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractDisplayableManager * New ()
 
static vtkMRMLAbstractDisplayableManager * SafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractLogic
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogic * New ()
 
static vtkMRMLAbstractLogic * SafeDownCast (vtkObject *o)
 

Protected Member Functions

void Create () override
 
int GetMouseCursor () override
 Displayable manager returns ID of the mouse cursor shape that should be displayed.
 
void OnMRMLDisplayableNodeModifiedEvent (vtkObject *caller) override
 
void OnMRMLSceneEndBatchProcess () override
 
void OnMRMLSceneNodeAdded (vtkMRMLNode *node) override
 
void OnMRMLSceneNodeRemoved (vtkMRMLNode *node) override
 
void OnMRMLSceneStartBatchProcess () override
 
void operator= (const vtkMRMLLayerDisplayableManager &)=delete
 
void SetHasFocus (bool hasFocus, vtkMRMLInteractionEventData *eventData) override
 Set if the widget gets/loses focus (interaction events are processed by this displayable manager).
 
void SetRenderer (vtkRenderer *newRenderer) override
 
void UnobserveMRMLScene () override
 
void UpdateFromMRML () override
 
 vtkMRMLLayerDisplayableManager ()
 
 vtkMRMLLayerDisplayableManager (const vtkMRMLLayerDisplayableManager &)=delete
 
 ~vtkMRMLLayerDisplayableManager () override=default
 
- Protected Member Functions inherited from vtkMRMLAbstractDisplayableManager
virtual int ActiveInteractionModes ()
 
void AddInteractorObservableEvent (int eventid, float priority=0.0)
 
void AddInteractorStyleObservableEvent (int eventid, float priority=0.0)
 
virtual void AdditionalInitializeStep ()
 
void AddMRMLDisplayableManagerEvent (int eventId)
 Allow to specify additional events that the DisplayableNode will observe.
 
void CreateIfPossible ()
 
vtkMRMLDisplayableManagerGroup * GetMRMLDisplayableManagerGroup ()
 Get associated DisplayableManager group.
 
vtkMRMLNode * GetMRMLDisplayableNode ()
 Get MRML Displayable Node.
 
vtkCallbackCommand * GetWidgetsCallbackCommand ()
 Get vtkWidget callbackCommand.
 
vtkObserverManager * GetWidgetsObserverManager () const
 Get widget observerManager.
 
virtual void OnInteractorEvent (int eventid)
 
virtual void OnInteractorStyleEvent (int eventid)
 
void ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) override
 
void ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData) override
 
virtual void ProcessWidgetsEvents (vtkObject *caller, unsigned long event, void *callData)
 
void RemoveInteractorObservableEvent (int eventid)
 
void RemoveInteractorStyleObservableEvent (int eventid)
 
virtual void RemoveMRMLObservers ()
 Remove MRML observers.
 
void RequestRender ()
 
void SetAndObserveMRMLDisplayableNode (vtkMRMLNode *newMRMLDisplayableNode)
 
virtual void SetMRMLDisplayableManagerGroup (vtkMRMLDisplayableManagerGroup *group)
 
void SetMRMLSceneInternal (vtkMRMLScene *newScene) override
 
void SetUpdateFromMRMLRequested (bool requested)
 
 vtkMRMLAbstractDisplayableManager ()
 
 ~vtkMRMLAbstractDisplayableManager () override
 
- Protected Member Functions inherited from vtkMRMLAbstractLogic
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 OnMRMLNodeModified (vtkMRMLNode *)
 
virtual void OnMRMLSceneEndClose ()
 
virtual void OnMRMLSceneEndImport ()
 
virtual void OnMRMLSceneEndRestore ()
 
virtual void OnMRMLSceneNew ()
 
virtual void OnMRMLSceneStartClose ()
 
virtual void OnMRMLSceneStartImport ()
 
virtual void OnMRMLSceneStartRestore ()
 
virtual void ProcessMRMLLogicsEvents (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 UpdateFromMRMLScene ()
 
 vtkMRMLAbstractLogic ()
 
 ~vtkMRMLAbstractLogic () override
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkMRMLAbstractDisplayableManager
static void WidgetsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 WidgetsCallback is a static function to relay modified events from the vtk widgets.
 
- Static Protected Member Functions inherited from vtkMRMLAbstractLogic
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)
 

Detailed Description

Displayable manager responsible for handling multiple displayable pipelines in sub-layers.

This displayable manager is a generic displayable manager with an internal

See also
vtkMRMLLayerDMPipelineManager implementation expecting a one-to-one relationship between a pair of view node, node and display pipeline.

Interactions are delegated to the pipeline manager which then dispatches to the different pipelines in their different renderer layers.

Definition at line 44 of file vtkMRMLLayerDisplayableManager.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkMRMLLayerDisplayableManager() [1/2]

vtkMRMLLayerDisplayableManager::vtkMRMLLayerDisplayableManager ( )
protected

◆ ~vtkMRMLLayerDisplayableManager()

vtkMRMLLayerDisplayableManager::~vtkMRMLLayerDisplayableManager ( )
overrideprotecteddefault

◆ vtkMRMLLayerDisplayableManager() [2/2]

vtkMRMLLayerDisplayableManager::vtkMRMLLayerDisplayableManager ( const vtkMRMLLayerDisplayableManager & )
protecteddelete

Member Function Documentation

◆ CanProcessInteractionEvent()

bool vtkMRMLLayerDisplayableManager::CanProcessInteractionEvent ( vtkMRMLInteractionEventData * eventData,
double & distance2 )
overridevirtual

Return true if the displayable manager can process the event. Distance2 is the squared distance in display coordinates from the closest interaction position. The displayable manager with the closest distance will get the chance to process the interaction event.

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ Create()

void vtkMRMLLayerDisplayableManager::Create ( )
overrideprotectedvirtual

Called after a valid MRML DisplayableNode is set. By default it simulates a ModifiedEvent event on the displayable node so that ProcessMRMLNodesEvents(displayableNode, ModifiedEvent) is called.

Note
GetRenderer() and GetMRMLDisplayableNode() will return valid object

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ GetClassName()

virtual const char * vtkMRMLLayerDisplayableManager::GetClassName ( )
virtual

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ GetMouseCursor()

int vtkMRMLLayerDisplayableManager::GetMouseCursor ( )
overrideprotectedvirtual

Displayable manager returns ID of the mouse cursor shape that should be displayed.

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ GetNodePipeline()

vtkSmartPointer< vtkMRMLLayerDMPipeline > vtkMRMLLayerDisplayableManager::GetNodePipeline ( vtkMRMLNode * node) const

Returns the pipeline associated with the input display node if any.

Usage of this method should be reserved for testing and debugging. Pipelines are completely managed by the displayable manager and any dependencies can be injected when creating the pipeline through the pipeline creator mechanism. Runtime access logic shouldn't be necessary outside the LayerDM layer.

◆ IsA()

virtual int vtkMRMLLayerDisplayableManager::IsA ( const char * type)
virtual

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ IsRegisteredInFactory()

static bool vtkMRMLLayerDisplayableManager::IsRegisteredInFactory ( vtkMRMLDisplayableManagerFactory * factory)
static

true if the input factory is defined and displayable manager is present in the input factory

◆ IsTypeOf()

static int vtkMRMLLayerDisplayableManager::IsTypeOf ( const char * type)
static

◆ New()

static vtkMRMLLayerDisplayableManager * vtkMRMLLayerDisplayableManager::New ( )
static

◆ OnMRMLDisplayableNodeModifiedEvent()

void vtkMRMLLayerDisplayableManager::OnMRMLDisplayableNodeModifiedEvent ( vtkObject * caller)
overrideprotectedvirtual

ProcessMRMLNodesEvents calls OnMRMLDisplayableNodeModifiedEvent when the displayable node (e.g. vtkMRMLSliceNode, vtkMRMLViewNode) is Modified. Could be overloaded in DisplayableManager subclass.

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ OnMRMLSceneEndBatchProcess()

void vtkMRMLLayerDisplayableManager::OnMRMLSceneEndBatchProcess ( )
overrideprotectedvirtual

If vtkMRMLScene::EndBatchProcessEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event Internally calls UpdateFromMRMLScene. Can be reimplemented to change the default behavior.

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneStartBatchProcess

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneNodeAdded()

void vtkMRMLLayerDisplayableManager::OnMRMLSceneNodeAdded ( vtkMRMLNode * )
overrideprotectedvirtual

If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneNodeRemoved, vtkMRMLScene::NodeAboutToBeAdded

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneNodeRemoved()

void vtkMRMLLayerDisplayableManager::OnMRMLSceneNodeRemoved ( vtkMRMLNode * )
overrideprotectedvirtual

If vtkMRMLScene::NodeRemovedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneNodeAdded, vtkMRMLScene::NodeAboutToBeRemoved

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneStartBatchProcess()

void vtkMRMLLayerDisplayableManager::OnMRMLSceneStartBatchProcess ( )
overrideprotectedvirtual

If vtkMRMLScene::StartBatchProcessEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneEndBatchProcess

Reimplemented from vtkMRMLAbstractLogic.

◆ operator=()

void vtkMRMLLayerDisplayableManager::operator= ( const vtkMRMLLayerDisplayableManager & )
protecteddelete

◆ PrintSelf()

void vtkMRMLLayerDisplayableManager::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ ProcessInteractionEvent()

bool vtkMRMLLayerDisplayableManager::ProcessInteractionEvent ( vtkMRMLInteractionEventData * eventData)
overridevirtual

Process an interaction event. Returns true if the event should be aborted (not processed any further by other event observers).

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ RegisterInDefaultViews()

static void vtkMRMLLayerDisplayableManager::RegisterInDefaultViews ( )
static

Register the DM in the 2D and 3D view factories.

◆ RegisterInFactory()

static void vtkMRMLLayerDisplayableManager::RegisterInFactory ( vtkMRMLDisplayableManagerFactory * factory)
static

Register the Displayable Manager in the given input factory if it's not already registered.

◆ RenderWindowBufferToImage() [1/2]

static vtkSmartPointer< vtkImageData > vtkMRMLLayerDisplayableManager::RenderWindowBufferToImage ( vtkRenderWindow * window)
static

Utility function to get the content of the render window image as buffer Doesn't render / make any changes to the render window nor its renderers / cameras.

Use instead of vtkWindowToImageFilter to take screenshots of render windows where the LayerDM is set to avoid unwanted behavior (i.e., unwanted OnDefaultCameraModified calls).

◆ RenderWindowBufferToImage() [2/2]

static void vtkMRMLLayerDisplayableManager::RenderWindowBufferToImage ( vtkRenderWindow * window,
const vtkSmartPointer< vtkImageData > & imageData )
static

◆ SafeDownCast()

static vtkMRMLLayerDisplayableManager * vtkMRMLLayerDisplayableManager::SafeDownCast ( vtkObject * o)
static

◆ SetHasFocus()

void vtkMRMLLayerDisplayableManager::SetHasFocus ( bool hasFocus,
vtkMRMLInteractionEventData * eventData )
overrideprotectedvirtual

Set if the widget gets/loses focus (interaction events are processed by this displayable manager).

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ SetRenderer()

void vtkMRMLLayerDisplayableManager::SetRenderer ( vtkRenderer * newRenderer)
overrideprotectedvirtual

Reimplemented from vtkMRMLAbstractDisplayableManager.

◆ UnobserveMRMLScene()

void vtkMRMLLayerDisplayableManager::UnobserveMRMLScene ( )
overrideprotectedvirtual

Called anytime a scene is not set to the logic anymore (e.g. a new or no scene is set) Reimplement the method to delete all the scene specific information such as a node IDs, pointers...

See also
SetMRMLSceneInternal, ObserveMRMLScene, UpdateFromMRMLScene

Reimplemented from vtkMRMLAbstractLogic.

◆ UpdateFromMRML()

void vtkMRMLLayerDisplayableManager::UpdateFromMRML ( )
overrideprotectedvirtual

Called from RequestRender method if UpdateFromMRMLRequested is true

See also
RequestRender() SetUpdateFromMRMLRequested()

Reimplemented from vtkMRMLAbstractDisplayableManager.


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