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

Public Types | |
| typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer )(void *clientdata) |
Public Member Functions | |
| 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) |
| void | SetAndObserveMRMLScene (vtkMRMLScene *newScene) |
| void | SetAndObserveMRMLSceneEvents (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=0) |
| virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
| void | SetMRMLScene (vtkMRMLScene *newScene) |
| Set and observe the MRMLScene. | |
| vtkTypeRevisionMacro (vtkMRMLAbstractLogic, vtkObject) | |
Static Public Member Functions | |
| static vtkMRMLAbstractLogic * | New () |
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 () |
| 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 () |
| virtual void | Modified () |
| 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 | SetAndObserveMRMLSceneInternal (vtkMRMLScene *newScene) |
| 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. | |
| 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) |
Superclass for MRML logic classes.
Superclass for all MRML logic classes. When a scene is set, SetMRMLScene(vtkMRMLScene*),
Definition at line 139 of file vtkMRMLAbstractLogic.h.
| typedef void(vtkMRMLAbstractLogic::* vtkMRMLAbstractLogic::TaskFunctionPointer)(void *clientdata) |
Typedef for member functions of MRMLLogic that can be used as scheduled tasks.
Definition at line 144 of file vtkMRMLAbstractLogic.h.
| vtkMRMLAbstractLogic::vtkMRMLAbstractLogic | ( | ) | [protected] |
| virtual vtkMRMLAbstractLogic::~vtkMRMLAbstractLogic | ( | ) | [protected, virtual] |
| int vtkMRMLAbstractLogic::EndModify | ( | bool | wasModifying | ) | [inline, protected] |
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 459 of file vtkMRMLAbstractLogic.h.
| virtual bool vtkMRMLAbstractLogic::EnterMRMLLogicsCallback | ( | ) | const [protected, virtual] |
Return true if the Logics callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses
| virtual bool vtkMRMLAbstractLogic::EnterMRMLNodesCallback | ( | ) | const [protected, virtual] |
Return true if the MRML Nodes callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses.
Reimplemented in vtkMRMLVolumeRenderingDisplayableManager.
| virtual bool vtkMRMLAbstractLogic::EnterMRMLSceneCallback | ( | ) | const [protected, virtual] |
Return true if the MRML callback must be executed, false otherwise. By default, it returns true, you can reimplement it in subclasses
| bool vtkMRMLAbstractLogic::GetDisableModifiedEvent | ( | ) | const [protected] |
| 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.
| 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.
| 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.
| virtual vtkMRMLApplicationLogic* vtkMRMLAbstractLogic::GetMRMLApplicationLogic | ( | ) | const [virtual] |
Get access to overall application state.
| vtkCallbackCommand* vtkMRMLAbstractLogic::GetMRMLLogicsCallbackCommand | ( | ) | [protected] |
Get the MRML Logic callback command.
| vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLLogicsObserverManager | ( | ) | const [protected] |
Get MRML logics observerManager. It points to the logics callback.
| vtkCallbackCommand* vtkMRMLAbstractLogic::GetMRMLNodesCallbackCommand | ( | ) | [protected] |
Get the MRML nodes callbackCommand. The Execute function associated the the callback calls ProcessMRMLNodesEvents. Only vtkMRMLNodes can be listened to.
| vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLNodesObserverManager | ( | ) | const [protected] |
Get MRML nodes observerManager. It points to the nodes callback.
| vtkMRMLScene* vtkMRMLAbstractLogic::GetMRMLScene | ( | ) | const |
Return a reference to the current MRML scene.
| 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.
| vtkObserverManager* vtkMRMLAbstractLogic::GetMRMLSceneObserverManager | ( | ) | const [protected] |
Get MRML scene observerManager. It points to the scene callback.
| int vtkMRMLAbstractLogic::GetPendingModifiedEventCount | ( | ) | const [protected] |
| int vtkMRMLAbstractLogic::GetProcessingMRMLSceneEvent | ( | ) | const [protected] |
Return the event id currently processed or 0 if any.
| int vtkMRMLAbstractLogic::InvokePendingModifiedEvent | ( | ) | [protected] |
Invokes any modified events that are 'pending', meaning they were generated while the DisableModifiedEvent flag was nonzero.
| virtual void vtkMRMLAbstractLogic::Modified | ( | ) | [protected, virtual] |
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).
| static void vtkMRMLAbstractLogic::MRMLLogicsCallback | ( | vtkObject * | caller, |
| unsigned long | eid, | ||
| void * | clientData, | ||
| void * | callData | ||
| ) | [static, protected] |
MRMLLogicCallback is a static function to relay modified events from the logics.
| static void vtkMRMLAbstractLogic::MRMLNodesCallback | ( | vtkObject * | caller, |
| unsigned long | eid, | ||
| void * | clientData, | ||
| void * | callData | ||
| ) | [static, protected] |
MRMLNodesCallback is a static function to relay modified events from the nodes.
| static void vtkMRMLAbstractLogic::MRMLSceneCallback | ( | vtkObject * | caller, |
| unsigned long | eid, | ||
| void * | clientData, | ||
| void * | callData | ||
| ) | [static, protected] |
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)
| static vtkMRMLAbstractLogic* vtkMRMLAbstractLogic::New | ( | ) | [static] |
Reimplemented in vtkDataIOManagerLogic, vtkSlicerApplicationLogic, vtkSlicerFiducialsLogic, vtkSlicerModuleLogic, vtkSlicerScriptedLoadableModuleLogic, vtkSlicerTransformLogic, vtkSlicerCLIModuleLogic, vtkMRMLAbstractDisplayableManager, vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLAbstractThreeDViewDisplayableManager, vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLLightBoxRendererManagerProxy, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLApplicationLogic, vtkMRMLColorLogic, vtkMRMLDisplayableHierarchyLogic, vtkMRMLLayoutLogic, vtkMRMLModelHierarchyLogic, vtkMRMLRemoteIOLogic, vtkMRMLSliceLayerLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationAngleDisplayableManager, vtkMRMLAnnotationBidimensionalDisplayableManager, vtkMRMLAnnotationDisplayableManager, vtkMRMLAnnotationFiducialDisplayableManager, vtkMRMLAnnotationROIDisplayableManager, vtkMRMLAnnotationRulerDisplayableManager, vtkMRMLAnnotationSplineDisplayableManager, vtkMRMLAnnotationStickyDisplayableManager, vtkMRMLAnnotationTextDisplayableManager, vtkAtlasCreatorLogic, vtkSlicerCamerasModuleLogic, vtkSlicerColorLogic, vtkSlicerCropVolumeLogic, vtkSlicerDataModuleLogic, vtkSlicerDoubleArraysLogic, vtkFetchMILogic, vtkModelMirrorLogic, vtkSlicerModelsLogic, vtkModelTransformLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerReformatLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerFiberBundleLogic, vtkMRMLTractographyDisplayDisplayableManager, vtkSlicerTractographyInteractiveSeedingLogic, vtkSlicerVolumeRenderingLogic, vtkMRMLVolumeRenderingDisplayableManager, and vtkSlicerVolumesLogic.
| virtual void vtkMRMLAbstractLogic::ObserveMRMLScene | ( | ) | [protected, virtual] |
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.
Reimplemented in vtkSlicerAnnotationModuleLogic.
| virtual void vtkMRMLAbstractLogic::OnMRMLNodeModified | ( | vtkMRMLNode * | ) | [inline, protected, virtual] |
Called after the corresponding MRML event is triggered.
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLLayoutLogic, vtkMRMLSliceLayerLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerTractographyInteractiveSeedingLogic, and vtkSlicerVolumeRenderingLogic.
Definition at line 318 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndBatchProcess | ( | ) | [protected, virtual] |
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.
Reimplemented in vtkMRMLModelSliceDisplayableManager, and vtkMRMLSliceLinkLogic.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndClose | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::EndCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkMRMLAnnotationFiducialDisplayableManager, vtkSlicerSceneViewsModuleLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 279 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndImport | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::EndImportEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerTractographyInteractiveSeedingLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 289 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneEndRestore | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::EndRestoreEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLLayoutLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerTractographyInteractiveSeedingLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 299 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneNew | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::SceneNewEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Definition at line 304 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneNodeAdded | ( | vtkMRMLNode * | ) | [inline, protected, virtual] |
If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkSlicerCLIModuleLogic, vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkFetchMILogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerVolumeRenderingLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 309 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneNodeRemoved | ( | vtkMRMLNode * | ) | [inline, protected, virtual] |
If vtkMRMLScene::NodeRemovedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLDisplayableHierarchyLogic, vtkMRMLModelHierarchyLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkMRMLAnnotationDisplayableManager, vtkMRMLAnnotationROIDisplayableManager, vtkSlicerDataModuleLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerTractographyInteractiveSeedingLogic, vtkSlicerVolumeRenderingLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 314 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartBatchProcess | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::StartBatchProcessEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLSliceLinkLogic.
Definition at line 262 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartClose | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::StartCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLSliceLogic, and vtkMRMLVolumeRenderingDisplayableManager.
Definition at line 274 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartImport | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::StartImportEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLCameraDisplayableManager, and vtkMRMLSliceLinkLogic.
Definition at line 284 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::OnMRMLSceneStartRestore | ( | ) | [inline, protected, virtual] |
If vtkMRMLScene::StartRestoreEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented in vtkMRMLLayoutLogic, and vtkMRMLSliceLinkLogic.
Definition at line 294 of file vtkMRMLAbstractLogic.h.
| void vtkMRMLAbstractLogic::PrintSelf | ( | ostream & | os, |
| vtkIndent | indent | ||
| ) |
Reimplemented in vtkDataIOManagerLogic, vtkSlicerApplicationLogic, vtkSlicerFiducialsLogic, vtkSlicerModuleLogic, vtkSlicerScriptedLoadableModuleLogic, vtkSlicerTransformLogic, vtkSlicerCLIModuleLogic, vtkMRMLAbstractDisplayableManager, vtkMRMLAbstractSliceViewDisplayableManager, vtkMRMLAbstractThreeDViewDisplayableManager, vtkMRMLCameraDisplayableManager, vtkMRMLCrosshairDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLApplicationLogic, vtkMRMLColorLogic, vtkMRMLLayoutLogic, vtkMRMLRemoteIOLogic, vtkMRMLSliceLayerLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationAngleDisplayableManager, vtkMRMLAnnotationBidimensionalDisplayableManager, vtkMRMLAnnotationDisplayableManager, vtkMRMLAnnotationFiducialDisplayableManager, vtkMRMLAnnotationROIDisplayableManager, vtkMRMLAnnotationRulerDisplayableManager, vtkMRMLAnnotationSplineDisplayableManager, vtkMRMLAnnotationStickyDisplayableManager, vtkMRMLAnnotationTextDisplayableManager, vtkAtlasCreatorLogic, vtkSlicerCamerasModuleLogic, vtkSlicerColorLogic, vtkSlicerCropVolumeLogic, vtkSlicerDataModuleLogic, vtkSlicerDoubleArraysLogic, vtkFetchMILogic, vtkModelMirrorLogic, vtkSlicerModelsLogic, vtkModelTransformLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerReformatLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerFiberBundleLogic, vtkMRMLTractographyDisplayDisplayableManager, vtkSlicerTractographyInteractiveSeedingLogic, vtkSlicerVolumeRenderingLogic, vtkMRMLVolumeRenderingDisplayableManager, and vtkSlicerVolumesLogic.
| virtual void vtkMRMLAbstractLogic::ProcessMRMLLogicsEvents | ( | vtkObject * | caller, |
| unsigned long | event, | ||
| void * | callData | ||
| ) | [protected, virtual] |
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.
Reimplemented in vtkMRMLSliceLogic.
| virtual void vtkMRMLAbstractLogic::ProcessMRMLNodesEvents | ( | vtkObject * | caller, |
| unsigned long | event, | ||
| void * | callData | ||
| ) | [protected, virtual] |
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 vtkSet[AndObserve]MRMLNode[Event]Macro ProcessMRMLNodesEvents calls OnMRMLNodeModified when event is vtkCommand::ModifiedEvent.
Reimplemented in vtkSlicerCLIModuleLogic, vtkMRMLAbstractDisplayableManager, vtkMRMLCameraDisplayableManager, vtkMRMLModelDisplayableManager, vtkMRMLModelSliceDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLViewDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLSliceLayerLogic, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkFetchMILogic, vtkMRMLTractographyDisplayDisplayableManager, vtkSlicerTractographyInteractiveSeedingLogic, vtkMRMLVolumeRenderingDisplayableManager, and vtkSlicerVolumesLogic.
| virtual void vtkMRMLAbstractLogic::ProcessMRMLSceneEvents | ( | vtkObject * | caller, |
| unsigned long | event, | ||
| void * | callData | ||
| ) | [protected, virtual] |
Receives all the events fired by the scene. By default, it calls OnMRMLScene*Event based on the event passed.
Reimplemented in vtkMRMLScriptedDisplayableManager, vtkMRMLSliceLayerLogic, vtkSlicerCamerasModuleLogic, and vtkFetchMILogic.
| virtual void vtkMRMLAbstractLogic::RegisterNodes | ( | ) | [inline, protected, virtual] |
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 vtkSlicerAnnotationModuleLogic, vtkSlicerCropVolumeLogic, vtkSlicerDataModuleLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerSceneViewsModuleLogic, vtkSlicerFiberBundleLogic, vtkSlicerTractographyInteractiveSeedingLogic, and vtkSlicerVolumeRenderingLogic.
Definition at line 349 of file vtkMRMLAbstractLogic.h.
| void vtkMRMLAbstractLogic::SetAndObserveMRMLScene | ( | vtkMRMLScene * | newScene | ) |
<HACK> Still here for EMSegment </HACK> Set and observe MRML Scene. In order to provide a single method to set the scene, consider overloading SetMRMLSceneInternal().
| void vtkMRMLAbstractLogic::SetAndObserveMRMLSceneEvents | ( | vtkMRMLScene * | newScene, |
| vtkIntArray * | events, | ||
| vtkFloatArray * | priorities = 0 |
||
| ) |
| 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); }
| void vtkMRMLAbstractLogic::SetAndObserveMRMLSceneInternal | ( | vtkMRMLScene * | newScene | ) | [protected] |
Convenient method to set and observe the scene. The Modified event on the scene is deprecated.
| void vtkMRMLAbstractLogic::SetDisableModifiedEvent | ( | bool | onOff | ) | [protected] |
| void vtkMRMLAbstractLogic::SetInMRMLLogicsCallbackFlag | ( | int | flag | ) | [protected] |
Set InMRMLLogicsCallback flag. In InMRMLLogicsCallback, loop are avoided by checking the value of the flag.
| void vtkMRMLAbstractLogic::SetInMRMLNodesCallbackFlag | ( | int | flag | ) | [protected] |
Set InMRMLNodesCallback flag. In InMRMLNodesCallback, loop are avoided by checking the value of the flag.
| 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
| virtual void vtkMRMLAbstractLogic::SetMRMLApplicationLogic | ( | vtkMRMLApplicationLogic * | logic | ) | [virtual] |
| void vtkMRMLAbstractLogic::SetMRMLScene | ( | vtkMRMLScene * | newScene | ) |
Set and observe the MRMLScene.
| virtual void vtkMRMLAbstractLogic::SetMRMLSceneInternal | ( | vtkMRMLScene * | newScene | ) | [protected, virtual] |
Called each time a new scene is set. Can be reimplemented in derivated classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.
Reimplemented in vtkSlicerCLIModuleLogic, vtkMRMLAbstractDisplayableManager, vtkMRMLScriptedDisplayableManager, vtkMRMLApplicationLogic, vtkMRMLColorLogic, vtkMRMLDisplayableHierarchyLogic, vtkMRMLLayoutLogic, vtkMRMLModelHierarchyLogic, vtkMRMLSliceLayerLogic, vtkMRMLSliceLinkLogic, vtkMRMLSliceLogic, vtkSlicerAnnotationModuleLogic, vtkMRMLAnnotationDisplayableManager, vtkSlicerCamerasModuleLogic, vtkSlicerDataModuleLogic, vtkSlicerModelsLogic, vtkSlicerMultiVolumeRenderingLogic, vtkSlicerSceneViewsModuleLogic, vtkMRMLTractographyDisplayDisplayableManager, vtkSlicerTractographyInteractiveSeedingLogic, and vtkSlicerVolumeRenderingLogic.
| void vtkMRMLAbstractLogic::SetProcessingMRMLSceneEvent | ( | int | event | ) | [protected] |
Set event id currently processed or 0 if any.
| bool vtkMRMLAbstractLogic::StartModify | ( | ) | [inline, protected] |
Start modifying the logic. Disable Modify events. Returns the previous state of DisableModifiedEvent flag that should be passed to EndModify() method
Definition at line 451 of file vtkMRMLAbstractLogic.h.
| virtual void vtkMRMLAbstractLogic::UnobserveMRMLScene | ( | ) | [protected, virtual] |
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...
Reimplemented in vtkMRMLModelSliceDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, and vtkMRMLLayoutLogic.
| virtual void vtkMRMLAbstractLogic::UpdateFromMRMLScene | ( | ) | [protected, virtual] |
Called everytime the scene has been significantly changed. If the scene BatchProcessState events are observed (in SetMRMLSceneInternal() ), UpdateFromMRMLScene is called after each batch process (Close, Import, Restore...). It is also being called by default when a new scene is set (SetMRMLScene).
Reimplemented in vtkMRMLModelDisplayableManager, vtkMRMLThreeDReformatDisplayableManager, vtkMRMLVolumeGlyphSliceDisplayableManager, vtkMRMLLayoutLogic, vtkMRMLSliceLogic, vtkMRMLAnnotationDisplayableManager, vtkSlicerDataModuleLogic, and vtkSlicerMultiVolumeRenderingLogic.
| vtkMRMLAbstractLogic::vtkTypeRevisionMacro | ( | vtkMRMLAbstractLogic | , |
| vtkObject | |||
| ) |
1.7.4