Slicer 5.7
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Superclass for displayable manager classes. More...
#include <Libs/MRML/DisplayableManager/vtkMRMLAbstractDisplayableManager.h>
Public Types | |
typedef vtkMRMLAbstractLogic | Superclass |
Public Types inherited from vtkMRMLAbstractLogic | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
virtual bool | CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) |
virtual const char * | GetClassName () |
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. | |
virtual vtkMRMLLightBoxRendererManagerProxy * | GetLightBoxRendererManagerProxy () |
virtual int | GetMouseCursor () |
Displayable manager returns ID of the mouse cursor shape that should be displayed. | |
vtkRenderer * | GetRenderer () |
Get the default renderer for this displayable manager. | |
vtkRenderer * | GetRenderer (int idx) |
vtkMRMLSelectionNode * | GetSelectionNode () |
Convenient method to get the current SelectionNode. | |
virtual int | IsA (const char *type) |
bool | IsCreated () |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual bool | ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) |
virtual void | SetHasFocus (bool hasFocus, vtkMRMLInteractionEventData *eventData) |
Set if the widget gets/loses focus (interaction events are processed by this displayable manager). | |
virtual void | SetLightBoxRendererManagerProxy (vtkMRMLLightBoxRendererManagerProxy *) |
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 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 | |
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. | |
virtual void | Create () |
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) |
virtual void | OnMRMLDisplayableNodeModifiedEvent (vtkObject *caller) |
void | ProcessMRMLNodesEvents (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 |
virtual void | SetRenderer (vtkRenderer *newRenderer) |
void | SetUpdateFromMRMLRequested (bool requested) |
virtual void | UpdateFromMRML () |
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 | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneEndClose () |
virtual void | OnMRMLSceneEndImport () |
virtual void | OnMRMLSceneEndRestore () |
virtual void | OnMRMLSceneNew () |
virtual void | OnMRMLSceneNodeAdded (vtkMRMLNode *) |
virtual void | OnMRMLSceneNodeRemoved (vtkMRMLNode *) |
virtual void | OnMRMLSceneStartBatchProcess () |
virtual void | OnMRMLSceneStartClose () |
virtual void | OnMRMLSceneStartImport () |
virtual void | OnMRMLSceneStartRestore () |
virtual void | ProcessMRMLLogicsEvents (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 () |
virtual void | UpdateFromMRMLScene () |
vtkMRMLAbstractLogic () | |
~vtkMRMLAbstractLogic () override | |
Static Protected Member Functions | |
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) |
Friends | |
class | vtkInternal |
class | vtkMRMLDisplayableManagerGroup |
Access to SetRenderer, SetMRMLDisplayableNode and CreateIfPossible methods. | |
Superclass for displayable manager classes.
A displayable manager is responsible for representing MRML display nodes into a renderer (e.g. 2D view renderer). Displayable managers are the interface between MRML display nodes and vtkRenderer/vtkActors. They are responsible for creating and synchronizing vtkActor, vtkMapper and vtkProperties with MRML display nodes.
Definition at line 47 of file vtkMRMLAbstractDisplayableManager.h.
Definition at line 53 of file vtkMRMLAbstractDisplayableManager.h.
|
protected |
|
overrideprotected |
|
protectedvirtual |
Subclass can overload this method to specify under which InteractionNode modes this Displayable Manager InteractorStyle events. By default events only arrive when in Place mode (good for markups) but if you want a continuous read out of, for example, slice positions while the mouse moves set this to include Place and ViewTransform
Reimplemented in vtkMRMLModelDisplayableManager, and vtkMRMLVolumeRenderingDisplayableManager.
|
protected |
Usually used inside AdditionalInitializeStep() Allows to add observer to the current interactor that will call the virtual method OnInteractorEvent accordingly.
|
protected |
Usually used inside AdditionalInitializeStep() Allows to add observer to the current interactor style that will call the virtual method OnInteractorStyleEvent accordingly.
|
inlineprotectedvirtual |
Sub-class could overload that function and perform additional initialization steps
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLScalarBarDisplayableManager, vtkMRMLViewDisplayableManager, and vtkMRMLColorLegendDisplayableManager.
Definition at line 136 of file vtkMRMLAbstractDisplayableManager.h.
|
protected |
Allow to specify additional events that the DisplayableNode will observe.
|
virtual |
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 in vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLScalarBarDisplayableManager, vtkMRMLMarkupsDisplayableManager, and vtkMRMLLinearTransformsDisplayableManager.
|
protectedvirtual |
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.
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLModelSliceDisplayableManager, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLScalarBarDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLThreeDSliceEdgeDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLColorLegendDisplayableManager, vtkMRMLMarkupsDisplayableManager, vtkMRMLSegmentationsDisplayableManager2D, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLLinearTransformsDisplayableManager, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, and vtkMRMLVolumeRenderingDisplayableManager.
|
protected |
Invoke Create() and set Created flag to True A no-op if IsCreated() return True
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLAbstractThreeDViewDisplayableManager, vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLScalarBarDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLThreeDSliceEdgeDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLColorLegendDisplayableManager, vtkMRMLMarkupsDisplayableManager, vtkMRMLSegmentationsDisplayableManager2D, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLLinearTransformsDisplayableManager, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, and vtkMRMLVolumeRenderingDisplayableManager.
|
inlinevirtual |
Assemble and return info string to display in Data probe for a given viewer XYZ position.
Definition at line 91 of file vtkMRMLAbstractDisplayableManager.h.
|
virtual |
Displayable manager can indicate that it would like to get all events (even when mouse pointer is outside the window).
Reimplemented in vtkMRMLMarkupsDisplayableManager.
vtkMRMLInteractionNode * vtkMRMLAbstractDisplayableManager::GetInteractionNode | ( | ) |
Convenient method to get the current InteractionNode.
|
virtual |
Displayable manager can indicate that the window is in interactive mode (faster updates).
Reimplemented in vtkMRMLMarkupsDisplayableManager.
vtkRenderWindowInteractor * vtkMRMLAbstractDisplayableManager::GetInteractor | ( | ) |
Convenient method to get the WindowInteractor associated with the Renderer.
|
virtual |
Get the LightBoxRendererManagerProxy if one has been provided
|
virtual |
Displayable manager returns ID of the mouse cursor shape that should be displayed.
Reimplemented in vtkMRMLCrosshairDisplayableManager, and vtkMRMLMarkupsDisplayableManager.
|
protected |
Get associated DisplayableManager group.
|
protected |
Get MRML Displayable Node.
vtkRenderer * vtkMRMLAbstractDisplayableManager::GetRenderer | ( | ) |
Get the default renderer for this displayable manager.
vtkRenderer * vtkMRMLAbstractDisplayableManager::GetRenderer | ( | int | idx | ) |
Get the renderer for the Nth lightbox pane. This method uses the LightBoxRendererManagerProxy if one has been configured for the DisplayableManager. If no LightBoxRendererManagerProxy has been set, this method returns the default renderer by deferring to GetRenderer(),
vtkMRMLSelectionNode * vtkMRMLAbstractDisplayableManager::GetSelectionNode | ( | ) |
Convenient method to get the current SelectionNode.
|
protected |
Get vtkWidget callbackCommand.
|
protected |
Get widget observerManager.
|
virtual |
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLAbstractThreeDViewDisplayableManager, vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLScalarBarDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLThreeDSliceEdgeDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLColorLegendDisplayableManager, vtkMRMLMarkupsDisplayableManager, vtkMRMLSegmentationsDisplayableManager2D, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLLinearTransformsDisplayableManager, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, and vtkMRMLVolumeRenderingDisplayableManager.
bool vtkMRMLAbstractDisplayableManager::IsCreated | ( | ) |
Return True if Create() method has been invoked
|
static |
|
static |
|
protectedvirtual |
Called after interactor event specified using AddInteractorObservableEvent are invoked
|
protectedvirtual |
Called after interactor style event specified using AddInteractorStyleObservableEvent are invoked.
Reimplemented in vtkMRMLModelDisplayableManager, and vtkMRMLScriptedDisplayableManager.
|
protectedvirtual |
ProcessMRMLNodesEvents calls OnMRMLDisplayableNodeModifiedEvent when the displayable node (e.g. vtkMRMLSliceNode, vtkMRMLViewNode) is Modified. Could be overloaded in DisplayableManager subclass.
Reimplemented in vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLAbstractThreeDViewDisplayableManager, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLColorLegendDisplayableManager, and vtkMRMLMarkupsDisplayableManager.
|
override |
|
virtual |
Process an interaction event. Returns true if the event should be aborted (not processed any further by other event observers).
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLScalarBarDisplayableManager, vtkMRMLMarkupsDisplayableManager, and vtkMRMLLinearTransformsDisplayableManager.
|
overrideprotectedvirtual |
Receives all the events fired by the nodes. To listen to a node, you can add an observer using GetMRMLNodesCallbackCommand() or use the utility macros vtk[SetAndObserve|Observe]MRMLNode[Event]Macro ProcessMRMLNodesEvents calls OnMRMLNodeModified when event is vtkCommand::ModifiedEvent.
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLColorLegendDisplayableManager, vtkMRMLMarkupsDisplayableManager, vtkMRMLSegmentationsDisplayableManager2D, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLLinearTransformsDisplayableManager, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, and vtkMRMLVolumeRenderingDisplayableManager.
|
protectedvirtual |
Receives all the events fired by any graphical object interacted by the user (typically vtk widgets). A typical use case is to listen to mrml nodes (using GetMRMLNodesCallbackCommand()) and update the graphical objects like mappers, actors, widgets... in ProcessMRMLNodesEvent, and to listen to user interactions (using (using GetWidgetsCallbackCommand()) like widgets and update the mrml nodes in ProcessWidgetsEvents. To listen to a widget (or any vtk Object), you can add an observer using GetWidgetsCallbackCommand(). ProcessWidgetsEvents doesn't do anything by default, you need to reimplement it.
Reimplemented in vtkMRMLThreeDReformatDisplayableManager, and vtkMRMLViewDisplayableManager.
|
protected |
|
protected |
|
protectedvirtual |
Remove MRML observers.
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, and vtkMRMLScriptedDisplayableManager.
|
protected |
Invoke vtkCommand::UpdateEvent and then call vtkMRMLThreeDViewDisplayableManagerFactory::RequestRender() which will also invoke vtkCommand::UpdateEvent. An observer can then listen for that event and "compress" the different Render requests to efficiently call RenderWindow->Render()
|
static |
|
protected |
Set MRML DisplayableNode Called by vtkMRMLDisplayableManagerFactory
|
virtual |
Set if the widget gets/loses focus (interaction events are processed by this displayable manager).
Reimplemented in vtkMRMLCrosshairDisplayableManager, and vtkMRMLMarkupsDisplayableManager.
|
virtual |
Set the LightBoxRendererManager proxy. This proxy provides a method GetRenderer(int) that returns the renderer for the Nth lightbox pane. The DisplayableManagers use this method to map coordinates to the proper lightbox pane, e.g. in placing crosshairs or markups in the proper renderer.
void vtkMRMLAbstractDisplayableManager::SetMouseCursor | ( | int | cursor | ) |
|
protectedvirtual |
|
overrideprotectedvirtual |
Called by SetMRMLScene - Used to initialize the Scene Observe all the events of the scene and call OnMRMLSceneEndClose() or OnMRMLSceneEndImport() if the new scene is valid
Reimplemented from vtkMRMLAbstractLogic.
Reimplemented in vtkMRMLScriptedDisplayableManager, vtkMRMLColorLegendDisplayableManager, and vtkMRMLMarkupsDisplayableManager.
|
protectedvirtual |
|
protected |
Specify if UpdateFromMRML() should be called
|
inlineprotectedvirtual |
Called from RequestRender method if UpdateFromMRMLRequested is true
Reimplemented in vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLColorLegendDisplayableManager, vtkMRMLMarkupsDisplayableManager, vtkMRMLSegmentationsDisplayableManager2D, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLLinearTransformsDisplayableManager, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 216 of file vtkMRMLAbstractDisplayableManager.h.
|
staticprotected |
WidgetsCallback is a static function to relay modified events from the vtk widgets.
|
friend |
Definition at line 273 of file vtkMRMLAbstractDisplayableManager.h.
|
friend |
Access to SetRenderer, SetMRMLDisplayableNode and CreateIfPossible methods.
Definition at line 126 of file vtkMRMLAbstractDisplayableManager.h.