Slicer  5.0
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 | Protected Attributes
vtkSlicerSequencesLogic Class Reference

#include <Modules/Loadable/Sequences/Logic/vtkSlicerSequencesLogic.h>

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

Public Types

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

Public Member Functions

vtkMRMLSequenceNodeAddSequence (const char *filename, vtkMRMLMessageCollection *userMessages=nullptr)
 
vtkMRMLSequenceNodeAddSynchronizedNode (vtkMRMLNode *sequenceNode, vtkMRMLNode *proxyNode, vtkMRMLNode *browserNode)
 
void GetBrowserNodesForProxyNode (vtkMRMLNode *proxyNode, vtkCollection *foundBrowserNodes)
 Get collection of browser nodes that use a specific proxy node. More...
 
void GetBrowserNodesForSequenceNode (vtkMRMLSequenceNode *sequenceNode, vtkCollection *foundBrowserNodes)
 Get collection of browser nodes that use a specific sequence node. More...
 
virtual const char * GetClassName ()
 
void GetCompatibleNodesFromScene (vtkCollection *compatibleNodes, vtkMRMLSequenceNode *sequenceNode)
 
vtkMRMLSequenceBrowserNodeGetFirstBrowserNodeForProxyNode (vtkMRMLNode *proxyNode)
 
vtkMRMLSequenceBrowserNodeGetFirstBrowserNodeForSequenceNode (vtkMRMLSequenceNode *sequenceNode)
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void UpdateAllProxyNodes ()
 Refreshes the output of all the active browser nodes. Called regularly by a timer. More...
 
void UpdateProxyNodesFromSequences (vtkMRMLSequenceBrowserNode *browserNode)
 Updates the contents of all the proxy nodes (all the nodes copied from the master and synchronized sequences to the scene) More...
 
void UpdateSequencesFromProxyNodes (vtkMRMLSequenceBrowserNode *browserNode, vtkMRMLNode *proxyNode)
 Updates the sequence from a changed proxy node (if saving of state changes is allowed) More...
 
void UpdateVirtualOutputNodes (vtkMRMLSequenceBrowserNode *browserNode)
 Deprecated method! More...
 
- Public Member Functions inherited from vtkSlicerModuleLogic
virtual vtkSlicerApplicationLogicGetApplicationLogic ()
 Get access to overall application state. More...
 
virtual vtkMRMLAbstractLogicGetModuleLogic (const char *moduleName)
 Convenience method for getting another module's logic from the application logic. More...
 
std::string GetModuleShareDirectory () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetModuleShareDirectory (const std::string &shareDirectory)
 
- Public Member Functions inherited from vtkMRMLAbstractLogic
virtual vtkMRMLApplicationLogicGetMRMLApplicationLogic () const
 Get access to overall application state. More...
 
vtkMRMLSceneGetMRMLScene () const
 Return a reference to the current MRML scene. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic)
 
void SetMRMLScene (vtkMRMLScene *newScene)
 Set and observe the MRMLScene. More...
 

Static Public Member Functions

static bool IsNodeCompatibleForBrowsing (vtkMRMLSequenceNode *masterNode, vtkMRMLSequenceNode *testedNode)
 
static int IsTypeOf (const char *type)
 
static vtkSlicerSequencesLogicNew ()
 
static vtkSlicerSequencesLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSlicerModuleLogic
static int IsTypeOf (const char *type)
 
static vtkSlicerModuleLogicNew ()
 The Usual vtk class functions. More...
 
static vtkSlicerModuleLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractLogic
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogicNew ()
 
static vtkMRMLAbstractLogicSafeDownCast (vtkObject *o)
 

Protected Member Functions

bool IsDataConnectorNode (vtkMRMLNode *)
 
void OnMRMLSceneNodeAdded (vtkMRMLNode *node) override
 
void OnMRMLSceneNodeRemoved (vtkMRMLNode *node) override
 
void ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) override
 
void RegisterNodes () override
 Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. More...
 
void SetMRMLSceneInternal (vtkMRMLScene *newScene) override
 
void UpdateFromMRMLScene () override
 
 vtkSlicerSequencesLogic ()
 
 ~vtkSlicerSequencesLogic () override
 
- Protected Member Functions inherited from vtkSlicerModuleLogic
 vtkSlicerModuleLogic ()
 
 ~vtkSlicerModuleLogic () 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 ()
 
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 ()
 
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 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)
 
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
 

Protected Attributes

std::map< vtkMRMLSequenceBrowserNode *, double > LastSequenceBrowserUpdateTimeSec
 

Additional Inherited Members

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

Definition at line 43 of file vtkSlicerSequencesLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 49 of file vtkSlicerSequencesLogic.h.

Constructor & Destructor Documentation

◆ vtkSlicerSequencesLogic()

vtkSlicerSequencesLogic::vtkSlicerSequencesLogic ( )
protected

◆ ~vtkSlicerSequencesLogic()

vtkSlicerSequencesLogic::~vtkSlicerSequencesLogic ( )
overrideprotected

Member Function Documentation

◆ AddSequence()

vtkMRMLSequenceNode* vtkSlicerSequencesLogic::AddSequence ( const char *  filename,
vtkMRMLMessageCollection userMessages = nullptr 
)

Add into the scene a new mrml sequence node and read its data from a specified file. A storage node is also added into the scene. User-displayable warning or error messages can be received if userMessages object is specified.

◆ AddSynchronizedNode()

vtkMRMLSequenceNode* vtkSlicerSequencesLogic::AddSynchronizedNode ( vtkMRMLNode sequenceNode,
vtkMRMLNode proxyNode,
vtkMRMLNode browserNode 
)

Add a synchronized sequence node and virtual output node pair to the browser node for playback/recording

Parameters
sequenceNodeSequence node to add. If nullptr, then a new node is created.
proxyNodeProxy node to use to represent selected item in the scene. May be nullptr. Returns the added/created sequence node, nullptr on error.

◆ GetBrowserNodesForProxyNode()

void vtkSlicerSequencesLogic::GetBrowserNodesForProxyNode ( vtkMRMLNode proxyNode,
vtkCollection *  foundBrowserNodes 
)

Get collection of browser nodes that use a specific proxy node.

◆ GetBrowserNodesForSequenceNode()

void vtkSlicerSequencesLogic::GetBrowserNodesForSequenceNode ( vtkMRMLSequenceNode sequenceNode,
vtkCollection *  foundBrowserNodes 
)

Get collection of browser nodes that use a specific sequence node.

◆ GetClassName()

virtual const char* vtkSlicerSequencesLogic::GetClassName ( )
virtual

Reimplemented from vtkSlicerModuleLogic.

◆ GetCompatibleNodesFromScene()

void vtkSlicerSequencesLogic::GetCompatibleNodesFromScene ( vtkCollection *  compatibleNodes,
vtkMRMLSequenceNode sequenceNode 
)

◆ GetFirstBrowserNodeForProxyNode()

vtkMRMLSequenceBrowserNode* vtkSlicerSequencesLogic::GetFirstBrowserNodeForProxyNode ( vtkMRMLNode proxyNode)

Get first browser node that use a specific proxy node. This is a convenience method for cases when it is known that a proxy node is only used in one browser node. In general case, use GetBrowserNodesForProxyNode instead.

◆ GetFirstBrowserNodeForSequenceNode()

vtkMRMLSequenceBrowserNode* vtkSlicerSequencesLogic::GetFirstBrowserNodeForSequenceNode ( vtkMRMLSequenceNode sequenceNode)

Get first browser node that use a specific sequence node. This is a convenience method for cases when it is known that a sequence is only used in one browser node. In general case, use GetBrowserNodesForSequenceNode instead.

◆ IsA()

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

Reimplemented from vtkSlicerModuleLogic.

◆ IsDataConnectorNode()

bool vtkSlicerSequencesLogic::IsDataConnectorNode ( vtkMRMLNode )
protected

◆ IsNodeCompatibleForBrowsing()

static bool vtkSlicerSequencesLogic::IsNodeCompatibleForBrowsing ( vtkMRMLSequenceNode masterNode,
vtkMRMLSequenceNode testedNode 
)
static

◆ IsTypeOf()

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

◆ New()

static vtkSlicerSequencesLogic* vtkSlicerSequencesLogic::New ( )
static

◆ OnMRMLSceneNodeAdded()

void vtkSlicerSequencesLogic::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 vtkSlicerSequencesLogic::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.

◆ PrintSelf()

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

◆ ProcessMRMLNodesEvents()

void vtkSlicerSequencesLogic::ProcessMRMLNodesEvents ( vtkObject *  caller,
unsigned long  event,
void *  callData 
)
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.

See also
ProcessMRMLSceneEvents, ProcessMRMLLogicsEvents, OnMRMLNodeModified(), vtkSetAndObserveMRMLNodeMacro, vtkObserveMRMLNodeMacro, vtkSetAndObserveMRMLNodeEventMacro

Reimplemented from vtkMRMLAbstractLogic.

◆ RegisterNodes()

void vtkSlicerSequencesLogic::RegisterNodes ( )
overrideprotectedvirtual

Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.

Reimplemented from vtkMRMLAbstractLogic.

◆ SafeDownCast()

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

◆ SetMRMLSceneInternal()

void vtkSlicerSequencesLogic::SetMRMLSceneInternal ( vtkMRMLScene newScene)
overrideprotectedvirtual

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.

See also
SetAndObserveMRMLSceneInternal() SetAndObserveMRMLSceneEventsInternal()
UpdateFromMRMLScene()

Reimplemented from vtkMRMLAbstractLogic.

◆ UpdateAllProxyNodes()

void vtkSlicerSequencesLogic::UpdateAllProxyNodes ( )

Refreshes the output of all the active browser nodes. Called regularly by a timer.

◆ UpdateFromMRMLScene()

void vtkSlicerSequencesLogic::UpdateFromMRMLScene ( )
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).

See also
SetMRMLSceneInternal, UnobserveMRMLScene, ObserveMRMLScene

Reimplemented from vtkMRMLAbstractLogic.

◆ UpdateProxyNodesFromSequences()

void vtkSlicerSequencesLogic::UpdateProxyNodesFromSequences ( vtkMRMLSequenceBrowserNode browserNode)

Updates the contents of all the proxy nodes (all the nodes copied from the master and synchronized sequences to the scene)

◆ UpdateSequencesFromProxyNodes()

void vtkSlicerSequencesLogic::UpdateSequencesFromProxyNodes ( vtkMRMLSequenceBrowserNode browserNode,
vtkMRMLNode proxyNode 
)

Updates the sequence from a changed proxy node (if saving of state changes is allowed)

◆ UpdateVirtualOutputNodes()

void vtkSlicerSequencesLogic::UpdateVirtualOutputNodes ( vtkMRMLSequenceBrowserNode browserNode)
inline

Deprecated method!

Definition at line 70 of file vtkSlicerSequencesLogic.h.

Member Data Documentation

◆ LastSequenceBrowserUpdateTimeSec

std::map< vtkMRMLSequenceBrowserNode*, double > vtkSlicerSequencesLogic::LastSequenceBrowserUpdateTimeSec
protected

Definition at line 123 of file vtkSlicerSequencesLogic.h.


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