Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
vtkMRMLAbstractLogic Class Reference

Superclass for MRML logic classes. More...

#include <Libs/MRML/Logic/vtkMRMLAbstractLogic.h>

Inheritance diagram for vtkMRMLAbstractLogic:
Inheritance graph
[legend]
Collaboration diagram for vtkMRMLAbstractLogic:
Collaboration graph
[legend]

Public Types

typedef vtkObject Superclass
 
typedef void(vtkMRMLAbstractLogic::* TaskFunctionPointer) (void *clientdata)
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual vtkMRMLApplicationLogicGetMRMLApplicationLogic () const
 Get access to overall application state. More...
 
vtkMRMLSceneGetMRMLScene () const
 Return a reference to the current MRML scene. More...
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
virtual void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic)
 
void SetMRMLScene (vtkMRMLScene *newScene)
 Set and observe the MRMLScene. More...
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogicNew ()
 
static vtkMRMLAbstractLogicSafeDownCast (vtkObject *o)
 

Protected Member Functions

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 ()
 
vtkObserverManagerGetMRMLLogicsObserverManager () const
 
vtkCallbackCommand * GetMRMLNodesCallbackCommand ()
 
vtkObserverManagerGetMRMLNodesObserverManager () const
 
vtkCallbackCommand * GetMRMLSceneCallbackCommand ()
 
vtkObserverManagerGetMRMLSceneObserverManager () const
 
int GetPendingModifiedEventCount () const
 
int GetProcessingMRMLSceneEvent () const
 Return the event id currently processed or 0 if any. More...
 
int InvokePendingModifiedEvent ()
 
virtual void Modified () VTK_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 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=0)
 
void SetDisableModifiedEvent (bool onOff)
 
void SetInMRMLLogicsCallbackFlag (int flag)
 
void SetInMRMLNodesCallbackFlag (int flag)
 
void SetInMRMLSceneCallbackFlag (int flag)
 
virtual void SetMRMLSceneInternal (vtkMRMLScene *newScene)
 
void SetProcessingMRMLSceneEvent (int event)
 
bool StartModify ()
 
virtual void UnobserveMRMLScene ()
 
virtual void UpdateFromMRMLScene ()
 
 vtkMRMLAbstractLogic ()
 
virtual ~vtkMRMLAbstractLogic ()
 

Static Protected Member Functions

static void MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLLogicCallback is a static function to relay modified events from the logics. More...
 
static void MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLNodesCallback is a static function to relay modified events from the nodes. More...
 
static void MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 

Detailed Description

Superclass for MRML logic classes.

Superclass for all MRML logic classes. When a scene is set, SetMRMLScene(vtkMRMLScene*),

Definition at line 133 of file vtkMRMLAbstractLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 142 of file vtkMRMLAbstractLogic.h.

◆ TaskFunctionPointer

typedef void(vtkMRMLAbstractLogic::* vtkMRMLAbstractLogic::TaskFunctionPointer) (void *clientdata)

Typedef for member functions of MRMLLogic that can be used as scheduled tasks.

Definition at line 138 of file vtkMRMLAbstractLogic.h.

Constructor & Destructor Documentation

◆ vtkMRMLAbstractLogic()

vtkMRMLAbstractLogic::vtkMRMLAbstractLogic ( )
protected

◆ ~vtkMRMLAbstractLogic()

virtual vtkMRMLAbstractLogic::~vtkMRMLAbstractLogic ( )
protectedvirtual

Member Function Documentation

◆ EndModify()

int vtkMRMLAbstractLogic::EndModify ( bool  wasModifying)
inlineprotected

End modifying the node. Enable Modify events if the previous state of DisableModifiedEvent flag is 0. Return the number of pending ModifiedEvent;

Definition at line 457 of file vtkMRMLAbstractLogic.h.

◆ EnterMRMLLogicsCallback()

virtual bool vtkMRMLAbstractLogic::EnterMRMLLogicsCallback ( ) const
protectedvirtual

Return true if the Logics callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses

◆ EnterMRMLNodesCallback()

virtual bool vtkMRMLAbstractLogic::EnterMRMLNodesCallback ( ) const
protectedvirtual

Return true if the MRML Nodes callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses.

See also
SetInMRMLNodesCallbackFlag()

Reimplemented in vtkMRMLVolumeRenderingDisplayableManager.

◆ EnterMRMLSceneCallback()

virtual bool vtkMRMLAbstractLogic::EnterMRMLSceneCallback ( ) const
protectedvirtual

Return true if the MRML callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses

◆ GetClassName()

virtual const char* vtkMRMLAbstractLogic::GetClassName ( )
virtual

Reimplemented in vtkMRMLLayoutLogic, vtkSlicerCropVolumeLogic, vtkMRMLModelDisplayableManager, vtkMRMLSliceLayerLogic, vtkSlicerVolumesLogic, vtkSlicerVolumeRenderingLogic, vtkSlicerMultiVolumeRenderingLogic, vtkMRMLSliceLogic, vtkSlicerTransformLogic, vtkSlicerSegmentationsModuleLogic, vtkMRMLVolumeRenderingDisplayableManager, vtkSlicerApplicationLogic, vtkMRMLApplicationLogic, vtkMRMLAbstractDisplayableManager, vtkSlicerSceneViewsModuleLogic, vtkSlicerSubjectHierarchyModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkSlicerReformatLogic, vtkSlicerUnitsLogic, vtkSlicerCLIModuleLogic, vtkSlicerMarkupsLogic, vtkMRMLMarkupsDisplayableManager2D, vtkMRMLMarkupsDisplayableManager3D, vtkSlicerTablesLogic, vtkMRMLLinearTransformsDisplayableManager3D, vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLSliceLinkLogic, vtkSlicerViewControllersLogic, vtkMRMLModelSliceDisplayableManager, vtkMRMLViewDisplayableManager, vtkSlicerTerminologiesModuleLogic, vtkMRMLAbstractThreeDViewDisplayableManager, vtkSlicerDoubleArraysLogic, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, vtkMRMLModelHierarchyLogic, vtkSlicerDataModuleLogic, vtkMRMLCrosshairDisplayableManager, vtkMRMLColorLogic, vtkSlicerCamerasModuleLogic, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLAnnotationRulerDisplayableManager, vtkMRMLMarkupsFiducialDisplayableManager2D, vtkMRMLMarkupsFiducialDisplayableManager3D, vtkMRMLSegmentationsDisplayableManager2D, vtkSlicerScriptedLoadableModuleLogic, vtkMRMLCameraDisplayableManager, vtkMRMLLightBoxRendererManagerProxy, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLDisplayableHierarchyLogic, vtkMRMLRemoteIOLogic, vtkMRMLAnnotationBidimensionalDisplayableManager, vtkMRMLAnnotationFiducialDisplayableManager, vtkMRMLAnnotationTextDisplayableManager, vtkSlicerModelsLogic, vtkSlicerFiducialsLogic, vtkMRMLAnnotationAngleDisplayableManager, vtkMRMLAnnotationROIDisplayableManager, vtkMRMLAnnotationSplineDisplayableManager, vtkMRMLAnnotationStickyDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLScriptedDisplayableManager, vtkAtlasCreatorLogic, vtkDataIOManagerLogic, vtkSlicerModuleLogic, vtkSlicerColorLogic, and vtkSlicerAnnotationModuleLogic.

◆ GetDisableModifiedEvent()

bool vtkMRMLAbstractLogic::GetDisableModifiedEvent ( ) const
protected

◆ GetInMRMLLogicsCallbackFlag()

int vtkMRMLAbstractLogic::GetInMRMLLogicsCallbackFlag ( ) const
protected

Return 0 when not processing any MRML logic event, >0 otherwise. Values can be higher than 1 when receiving nested events: processing a MRML logic event fires other node events.

See also
SetMRMLLogicsCallbackFlag()

◆ GetInMRMLNodesCallbackFlag()

int vtkMRMLAbstractLogic::GetInMRMLNodesCallbackFlag ( ) const
protected

Return 0 when not processing any MRML node event, >0 otherwise. Values can be higher than 1 when receiving nested events: processing a MRML node event fires other node events.

See also
SetMRMLNodesCallbackFlag()

◆ GetInMRMLSceneCallbackFlag()

int vtkMRMLAbstractLogic::GetInMRMLSceneCallbackFlag ( ) const
protected

Return 0 when not processing a MRML scene event, >0 otherwise. Values can be higher than 1 when receiving nested event: processing a MRML scene event fires other scene events.

See also
SetInMRMLCallbackFlag()

◆ GetMRMLApplicationLogic()

virtual vtkMRMLApplicationLogic* vtkMRMLAbstractLogic::GetMRMLApplicationLogic ( ) const
virtual

Get access to overall application state.

◆ GetMRMLLogicsCallbackCommand()

vtkCallbackCommand* vtkMRMLAbstractLogic::GetMRMLLogicsCallbackCommand ( )
protected

Get the MRML Logic callback command.

See also
GetMRMLSceneCallbackCommand(), GetMRMLNodesCallbackCommand()

◆ GetMRMLLogicsObserverManager()

vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLLogicsObserverManager ( ) const
protected

Get MRML logics observerManager. It points to the logics callback.

See also
GetMRMLLogicsCallbackCommand()

◆ GetMRMLNodesCallbackCommand()

vtkCallbackCommand* vtkMRMLAbstractLogic::GetMRMLNodesCallbackCommand ( )
protected

Get the MRML nodes callbackCommand. The Execute function associated the the callback calls ProcessMRMLNodesEvents. Only vtkMRMLNodes can be listened to.

See also
ProcessMRMLNodesEvents()

◆ GetMRMLNodesObserverManager()

vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLNodesObserverManager ( ) const
protected

Get MRML nodes observerManager. It points to the nodes callback.

See also
GetMRMLNodesCallbackCommand()

◆ GetMRMLScene()

vtkMRMLScene* vtkMRMLAbstractLogic::GetMRMLScene ( ) const

Return a reference to the current MRML scene.

◆ GetMRMLSceneCallbackCommand()

vtkCallbackCommand* vtkMRMLAbstractLogic::GetMRMLSceneCallbackCommand ( )
protected

Get MRML scene callbackCommand. You shouldn't have to use it manually, reimplementing SetMRMLSceneInternal and setting the events to listen should be enough.

See also
SetMRMLSceneInternal()

◆ GetMRMLSceneObserverManager()

vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLSceneObserverManager ( ) const
protected

Get MRML scene observerManager. It points to the scene callback.

See also
GetMRMLSceneCallbackCommand()

◆ GetPendingModifiedEventCount()

int vtkMRMLAbstractLogic::GetPendingModifiedEventCount ( ) const
protected

◆ GetProcessingMRMLSceneEvent()

int vtkMRMLAbstractLogic::GetProcessingMRMLSceneEvent ( ) const
protected

Return the event id currently processed or 0 if any.

◆ InvokePendingModifiedEvent()

int vtkMRMLAbstractLogic::InvokePendingModifiedEvent ( )
protected

Invokes any modified events that are 'pending', meaning they were generated while the DisableModifiedEvent flag was nonzero.

◆ IsA()

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

Reimplemented in vtkMRMLLayoutLogic, vtkSlicerCropVolumeLogic, vtkMRMLModelDisplayableManager, vtkMRMLSliceLayerLogic, vtkSlicerVolumesLogic, vtkSlicerVolumeRenderingLogic, vtkSlicerMultiVolumeRenderingLogic, vtkMRMLSliceLogic, vtkSlicerTransformLogic, vtkSlicerSegmentationsModuleLogic, vtkMRMLVolumeRenderingDisplayableManager, vtkSlicerApplicationLogic, vtkMRMLApplicationLogic, vtkMRMLAbstractDisplayableManager, vtkSlicerSceneViewsModuleLogic, vtkSlicerSubjectHierarchyModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkSlicerReformatLogic, vtkSlicerUnitsLogic, vtkSlicerCLIModuleLogic, vtkSlicerMarkupsLogic, vtkMRMLMarkupsDisplayableManager2D, vtkMRMLMarkupsDisplayableManager3D, vtkSlicerTablesLogic, vtkMRMLLinearTransformsDisplayableManager3D, vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLSliceLinkLogic, vtkSlicerViewControllersLogic, vtkMRMLModelSliceDisplayableManager, vtkMRMLViewDisplayableManager, vtkSlicerTerminologiesModuleLogic, vtkMRMLAbstractThreeDViewDisplayableManager, vtkSlicerDoubleArraysLogic, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, vtkMRMLModelHierarchyLogic, vtkSlicerDataModuleLogic, vtkMRMLCrosshairDisplayableManager, vtkMRMLColorLogic, vtkSlicerCamerasModuleLogic, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLAnnotationRulerDisplayableManager, vtkMRMLMarkupsFiducialDisplayableManager2D, vtkMRMLMarkupsFiducialDisplayableManager3D, vtkMRMLSegmentationsDisplayableManager2D, vtkSlicerScriptedLoadableModuleLogic, vtkMRMLCameraDisplayableManager, vtkMRMLLightBoxRendererManagerProxy, vtkMRMLOrientationMarkerDisplayableManager, vtkMRMLRulerDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLDisplayableHierarchyLogic, vtkMRMLRemoteIOLogic, vtkMRMLAnnotationBidimensionalDisplayableManager, vtkMRMLAnnotationFiducialDisplayableManager, vtkMRMLAnnotationTextDisplayableManager, vtkSlicerModelsLogic, vtkSlicerFiducialsLogic, vtkMRMLAnnotationAngleDisplayableManager, vtkMRMLAnnotationROIDisplayableManager, vtkMRMLAnnotationSplineDisplayableManager, vtkMRMLAnnotationStickyDisplayableManager, vtkMRMLCrosshairDisplayableManager3D, vtkMRMLScriptedDisplayableManager, vtkAtlasCreatorLogic, vtkDataIOManagerLogic, vtkSlicerModuleLogic, vtkSlicerColorLogic, and vtkSlicerAnnotationModuleLogic.

◆ IsTypeOf()

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

◆ Modified()

virtual void vtkMRMLAbstractLogic::Modified ( )
protectedvirtual

overrides the vtkObject method so that all changes to the node which would normally generate a ModifiedEvent can be grouped into an 'atomic' operation. Typical usage would be to disable modified events, call a series of Set* operations, and then re-enable modified events and call InvokePendingModifiedEvent to invoke the event (if any of the Set* calls actually changed the values of the instance variables).

◆ MRMLLogicsCallback()

static void vtkMRMLAbstractLogic::MRMLLogicsCallback ( vtkObject *  caller,
unsigned long  eid,
void *  clientData,
void *  callData 
)
staticprotected

MRMLLogicCallback is a static function to relay modified events from the logics.

◆ MRMLNodesCallback()

static void vtkMRMLAbstractLogic::MRMLNodesCallback ( vtkObject *  caller,
unsigned long  eid,
void *  clientData,
void *  callData 
)
staticprotected

MRMLNodesCallback is a static function to relay modified events from the nodes.

◆ MRMLSceneCallback()

static void vtkMRMLAbstractLogic::MRMLSceneCallback ( vtkObject *  caller,
unsigned long  eid,
void *  clientData,
void *  callData 
)
staticprotected

MRMLSceneCallback is a static function to relay modified events from the MRML Scene In subclass, MRMLSceneCallback can also be used to relay event from observe MRML node(s)

◆ New()

static vtkMRMLAbstractLogic* vtkMRMLAbstractLogic::New ( )
static

◆ ObserveMRMLScene()

virtual void vtkMRMLAbstractLogic::ObserveMRMLScene ( )
protectedvirtual

Called after a scene is set to the logic and nodes are registered (RegisterNodes()). The scene events to observe are already set in SetMRMLSceneInternal(). By default, ObserveMRMLScene() calls UpdateFromMRMLScene(). Overide for a custom behavior.

See also
SetMRMLSceneInternal, RegisterNodes, UnobserveMRMLScene
UpdateFromMRMLScene

Reimplemented in vtkSlicerVolumeRenderingLogic, vtkSlicerAnnotationModuleLogic, vtkSlicerMarkupsLogic, vtkSlicerUnitsLogic, and vtkSlicerModelsLogic.

◆ OnMRMLNodeModified()

virtual void vtkMRMLAbstractLogic::OnMRMLNodeModified ( vtkMRMLNode )
inlineprotectedvirtual

◆ OnMRMLSceneEndBatchProcess()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndBatchProcess ( )
protectedvirtual

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 in vtkMRMLLinearTransformsDisplayableManager3D, vtkMRMLModelSliceDisplayableManager, vtkMRMLSegmentationsDisplayableManager3D, vtkMRMLTransformsDisplayableManager2D, vtkMRMLTransformsDisplayableManager3D, vtkMRMLSliceLinkLogic, and vtkMRMLSegmentationsDisplayableManager2D.

◆ OnMRMLSceneEndClose()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndClose ( )
inlineprotectedvirtual

◆ OnMRMLSceneEndImport()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndImport ( )
inlineprotectedvirtual

◆ OnMRMLSceneEndRestore()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndRestore ( )
inlineprotectedvirtual

◆ OnMRMLSceneNew()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneNew ( )
inlineprotectedvirtual

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

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneStartImport, OnMRMLSceneEndImport

Definition at line 299 of file vtkMRMLAbstractLogic.h.

◆ OnMRMLSceneNodeAdded()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneNodeAdded ( vtkMRMLNode )
inlineprotectedvirtual

◆ OnMRMLSceneNodeRemoved()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneNodeRemoved ( vtkMRMLNode )
inlineprotectedvirtual

◆ OnMRMLSceneStartBatchProcess()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartBatchProcess ( )
inlineprotectedvirtual

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 in vtkSlicerUnitsLogic, and vtkMRMLSliceLinkLogic.

Definition at line 257 of file vtkMRMLAbstractLogic.h.

◆ OnMRMLSceneStartClose()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartClose ( )
inlineprotectedvirtual

◆ OnMRMLSceneStartImport()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartImport ( )
inlineprotectedvirtual

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

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneEndImport, OnMRMLSceneNew

Reimplemented in vtkMRMLCameraDisplayableManager, and vtkMRMLSliceLinkLogic.

Definition at line 279 of file vtkMRMLAbstractLogic.h.

◆ OnMRMLSceneStartRestore()

virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartRestore ( )
inlineprotectedvirtual

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

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneEndRestore

Reimplemented in vtkMRMLLayoutLogic, and vtkMRMLSliceLinkLogic.

Definition at line 289 of file vtkMRMLAbstractLogic.h.

◆ PrintSelf()

void vtkMRMLAbstractLogic::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

◆ ProcessMRMLLogicsEvents()

virtual void vtkMRMLAbstractLogic::ProcessMRMLLogicsEvents ( vtkObject *  caller,
unsigned long  event,
void *  callData 
)
protectedvirtual

Receives all the events fired by the logics. To listen to a logic, you can add an observer using GetMRMLLogicsCallbackCommand(). To be reimplemented in subclasses if needed.

See also
GetMRMLLogicsCallbackCommand() ,ProcessMRMLSceneEvents(), ProcessMRMLNodesEvents()

Reimplemented in vtkMRMLSliceLogic.

◆ ProcessMRMLNodesEvents()

virtual void vtkMRMLAbstractLogic::ProcessMRMLNodesEvents ( vtkObject *  caller,
unsigned long  event,
void *  callData 
)
protectedvirtual

◆ ProcessMRMLSceneEvents()

virtual void vtkMRMLAbstractLogic::ProcessMRMLSceneEvents ( vtkObject *  caller,
unsigned long  event,
void *  callData 
)
protectedvirtual

Receives all the events fired by the scene. By default, it calls OnMRMLScene*Event based on the event passed.

Reimplemented in vtkMRMLSliceLayerLogic, vtkSlicerCamerasModuleLogic, and vtkMRMLScriptedDisplayableManager.

◆ RegisterNodes()

virtual void vtkMRMLAbstractLogic::RegisterNodes ( )
inlineprotectedvirtual

Register node classes into the MRML scene. Called each time a new scene is set. Do nothing by default. Can be reimplemented in derivated classes.

Reimplemented in vtkSlicerSegmentationsModuleLogic, vtkSlicerVolumeRenderingLogic, vtkSlicerMarkupsLogic, vtkSlicerUnitsLogic, vtkSlicerCropVolumeLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerViewControllersLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerDataModuleLogic, and vtkSlicerAnnotationModuleLogic.

Definition at line 347 of file vtkMRMLAbstractLogic.h.

◆ SafeDownCast()

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

◆ SetAndObserveMRMLSceneEventsInternal()

void vtkMRMLAbstractLogic::SetAndObserveMRMLSceneEventsInternal ( vtkMRMLScene newScene,
vtkIntArray *  events,
vtkFloatArray *  priorities = 0 
)
protected

Typically called by a subclass in the derived SetMRMLSceneInternal to observe specific node events.

void vtkMRMLMyLogic::SetMRMLSceneInternal(vtkMRMLScene* newScene)
{
vtkNew<vtkIntArray> events;
events->InsertNextValue(vtkMRMLScene::NodeAddedEvent);
events->InsertNextValue(vtkMRMLScene::NodeRemovedEvent);
this->SetAndObserveMRMLSceneEventsInternal(newScene, events);
}
See also
SetMRMLSceneInternal()

◆ SetDisableModifiedEvent()

void vtkMRMLAbstractLogic::SetDisableModifiedEvent ( bool  onOff)
protected

◆ SetInMRMLLogicsCallbackFlag()

void vtkMRMLAbstractLogic::SetInMRMLLogicsCallbackFlag ( int  flag)
protected

Set InMRMLLogicsCallback flag. In InMRMLLogicsCallback, loop are avoided by checking the value of the flag.

See also
EnterMRMLLogicsCallback()

◆ SetInMRMLNodesCallbackFlag()

void vtkMRMLAbstractLogic::SetInMRMLNodesCallbackFlag ( int  flag)
protected

Set InMRMLNodesCallback flag. In InMRMLNodesCallback, loop are avoided by checking the value of the flag.

See also
EnterMRMLNodesCallback()

◆ SetInMRMLSceneCallbackFlag()

void vtkMRMLAbstractLogic::SetInMRMLSceneCallbackFlag ( int  flag)
protected

Set MRMLSceneCallback flag True means ProcessMRMLEvent has already been called In MRMLSceneCallback, loop are avoided by checking the value of the flag

See also
EnterMRMLSceneCallback()

◆ SetMRMLApplicationLogic()

virtual void vtkMRMLAbstractLogic::SetMRMLApplicationLogic ( vtkMRMLApplicationLogic logic)
virtual

Reimplemented in vtkSlicerCLIModuleLogic.

◆ SetMRMLScene()

void vtkMRMLAbstractLogic::SetMRMLScene ( vtkMRMLScene newScene)

Set and observe the MRMLScene.

◆ SetMRMLSceneInternal()

virtual void vtkMRMLAbstractLogic::SetMRMLSceneInternal ( vtkMRMLScene newScene)
protectedvirtual

◆ SetProcessingMRMLSceneEvent()

void vtkMRMLAbstractLogic::SetProcessingMRMLSceneEvent ( int  event)
protected

Set event id currently processed or 0 if any.

See also
EnterMRMLSceneCallback()

◆ StartModify()

bool vtkMRMLAbstractLogic::StartModify ( )
inlineprotected

Start modifying the logic. Disable Modify events. Returns the previous state of DisableModifiedEvent flag that should be passed to EndModify() method

Definition at line 449 of file vtkMRMLAbstractLogic.h.

◆ UnobserveMRMLScene()

virtual void vtkMRMLAbstractLogic::UnobserveMRMLScene ( )
protectedvirtual

◆ UpdateFromMRMLScene()

virtual void vtkMRMLAbstractLogic::UpdateFromMRMLScene ( )
protectedvirtual

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).

See also
SetMRMLSceneInternal, UnobserveMRMLScene, ObserveMRMLScene

Reimplemented in vtkMRMLSliceLogic, vtkSlicerMarkupsLogic, vtkMRMLModelDisplayableManager, vtkMRMLLayoutLogic, vtkMRMLMarkupsDisplayableManager2D, vtkMRMLAnnotationDisplayableManager, vtkSlicerSubjectHierarchyModuleLogic, vtkMRMLMarkupsDisplayableManager3D, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerDataModuleLogic, vtkMRMLThreeDReformatDisplayableManager, and vtkMRMLVolumeGlyphSliceDisplayableManager.


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