![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Modules/Loadable/SceneViews/Logic/vtkSlicerSceneViewsModuleLogic.h>
Public Types | |
enum | { ScreenShotType3D = 0 , ScreenShotTypeRed = 1 , ScreenShotTypeYellow = 2 , ScreenShotTypeGreen = 3 , ScreenShotTypeFullLayout = 4 } |
The screenshot type of a sceneView. More... | |
enum | { SceneViewsModifiedEvent = 22001 } |
typedef vtkSlicerModuleLogic | Superclass |
![]() | |
typedef vtkMRMLAbstractLogic | Superclass |
![]() | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
vtkMRMLSequenceBrowserNode * | AddNewSceneViewSequenceBrowserNode () |
void | CreateSceneView (std::string name, std::string description="", int screenshotType=ScreenShotType3D, vtkImageData *screenshot=nullptr, bool saveDisplayNodes=true, bool saveViewNodes=true, vtkMRMLSequenceBrowserNode *sequenceBrowser=nullptr) |
Create a sceneView.. | |
void | CreateSceneView (std::vector< vtkMRMLNode * > savedNodes, std::string name, std::string description="", int screenshotType=ScreenShotType3D, vtkImageData *screenshot=nullptr, vtkMRMLSequenceBrowserNode *sequenceBrowser=nullptr) |
void | CreateSceneView (vtkCollection *savedNodes, std::string name, std::string description="", int screenshotType=ScreenShotType3D, vtkImageData *screenshot=nullptr, vtkMRMLSequenceBrowserNode *sequenceBrowser=nullptr) |
virtual const char * | GetClassName () |
std::string | GetNthSceneViewDescription (int index) |
std::string | GetNthSceneViewName (int index) |
vtkImageData * | GetNthSceneViewScreenshot (int index) |
int | GetNthSceneViewScreenshotType (int index) |
vtkMRMLSequenceBrowserNode * | GetNthSceneViewSequenceBrowserNode (int index) |
int | GetNumberOfSceneViews () |
Get the number of sceneViews. | |
int | GetSceneViewIndexByName (std::string name) |
Returns the index for a scene view with the given name. If no matching scene view is found, returns -1. | |
vtkMRMLSequenceBrowserNode * | GetSceneViewSequenceBrowserNode (bool addMissingNode) |
std::string | GetScreenShotTypeAsString (int type) |
Convert string to/from scene view enum type. | |
int | GetScreenShotTypeFromString (const std::string &type) |
virtual int | IsA (const char *type) |
bool | IsSceneViewNode (vtkMRMLNode *node) |
Returns true if the node is a scene view node. | |
void | ModifyNthSceneView (int sceneViewIndex, std::string name, std::string, int screenshotType, vtkImageData *screenshot) |
Modify an existing sceneView. | |
std::string | MoveSceneViewDown (std::string id) |
Move sceneView up. | |
std::string | MoveSceneViewUp (std::string id) |
Move sceneView up. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | RegisterNodes () override |
Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. | |
bool | RemoveSceneView (int index) |
Remove a sceneView. | |
bool | RestoreSceneView (int sceneViewIndex) |
Restore a sceneView. | |
bool | RestoreSceneView (std::string sceneViewName) |
int | SceneViewIndexToSequenceBrowserIndex (int sceneViewIndex) |
Convert the index of the scene view to the corresponding value index of the sequence browser that holds the snapshot. | |
void | SetMRMLSceneInternal (vtkMRMLScene *newScene) override |
Initialize listening to MRML events. | |
void | SetNthSceneViewDescription (int index, std::string description) |
Set/Get the description of an existing sceneView. | |
void | SetNthSceneViewName (int index, std::string name) |
Set/Get the name of an existing sceneView. | |
void | SetNthSceneViewScreenshot (int index, vtkImageData *screenshot) |
Set/Get the screenshot of an existing sceneView. | |
void | SetNthSceneViewScreenshotType (int index, int type) |
Set/Get the screenshot type of an existing sceneView. | |
![]() | |
virtual vtkSlicerApplicationLogic * | GetApplicationLogic () |
Get access to overall application state. | |
virtual vtkMRMLAbstractLogic * | GetModuleLogic (const char *moduleName) |
Convenience method for getting another module's logic from the application logic. | |
std::string | GetModuleShareDirectory () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | SetModuleShareDirectory (const std::string &shareDirectory) |
![]() | |
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 const char * | GetSceneViewDescriptionAttributeName () |
static const char * | GetSceneViewNameAttributeName () |
static const char * | GetSceneViewNodeAttributeName () |
static const char * | GetSceneViewNodeAttributeValue () |
static const char * | GetSceneViewScreenshotReferenceRole () |
static const char * | GetSceneViewScreenshotTypeAttributeName () |
static int | IsTypeOf (const char *type) |
static vtkSlicerSceneViewsModuleLogic * | New () |
static vtkSlicerSceneViewsModuleLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSlicerModuleLogic * | New () |
The Usual vtk class functions. | |
static vtkSlicerModuleLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | ConvertSceneViewNodesToSequenceBrowserNodes (vtkMRMLScene *scene) |
Convert all existing vtkMRMLSceneViewNode in the scene to use Sequences. | |
vtkMRMLSequenceBrowserNode * | ConvertSceneViewNodeToSequenceBrowserNode (vtkMRMLSceneViewNode *sceneView, vtkMRMLSequenceBrowserNode *sequenceBrowserNode) |
Convert the specified vtkMRMLSceneViewNode to use sequences. | |
void | GetDisplayNodes (std::vector< vtkMRMLNode * > &displayNodes) |
Add all display-related nodes to the vector. | |
std::string | GetNthNodeAttribute (vtkMRMLNode *proxyTextNode, int index, std::string attributeName) |
vtkMRMLNode * | GetNthSceneViewDataNode (int index, vtkMRMLNode *proxyNode) |
Return the data node for the specified proxy node in the Nth scene view index. | |
vtkMRMLVolumeNode * | GetNthSceneViewScreenshotDataNode (int index) |
Return the screenshot data node in the Nth scene view index. | |
vtkMRMLVolumeNode * | GetNthSceneViewScreenshotProxyNode (int index) |
Returns the proxy node in the scene for the Nth scene view. | |
vtkMRMLVolumeNode * | GetSceneViewScreenshotProxyNode (vtkMRMLSequenceBrowserNode *sequenceBrowser=nullptr) |
Returns the proxy node containing the scene view screenshot. | |
void | GetViewNodes (std::vector< vtkMRMLNode * > &viewNodes) |
Add all view-related nodes to the vector. | |
void | OnMRMLNodeModified (vtkMRMLNode *node) override |
Called when a scene view sequence browser node is modified. | |
void | OnMRMLSceneEndClose () override |
void | OnMRMLSceneEndImport () override |
void | OnMRMLSceneEndRestore () override |
void | OnMRMLSceneNodeAdded (vtkMRMLNode *node) override |
Called when MRMLScene events are invoked. | |
void | SetNthNodeAttribute (vtkMRMLNode *proxyTextNode, int index, std::string attributeName, std::string text) |
vtkSlicerSceneViewsModuleLogic () | |
~vtkSlicerSceneViewsModuleLogic () override | |
![]() | |
vtkSlicerModuleLogic () | |
~vtkSlicerModuleLogic () override | |
![]() | |
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 | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneNew () |
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) |
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 | |
Additional Inherited Members | |
![]() | |
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) |
Definition at line 47 of file vtkSlicerSceneViewsModuleLogic.h.
Definition at line 53 of file vtkSlicerSceneViewsModuleLogic.h.
anonymous enum |
The screenshot type of a sceneView.
Enumerator | |
---|---|
ScreenShotType3D | |
ScreenShotTypeRed | |
ScreenShotTypeYellow | |
ScreenShotTypeGreen | |
ScreenShotTypeFullLayout |
Definition at line 151 of file vtkSlicerSceneViewsModuleLogic.h.
anonymous enum |
Enumerator | |
---|---|
SceneViewsModifiedEvent |
Definition at line 160 of file vtkSlicerSceneViewsModuleLogic.h.
|
protected |
|
overrideprotected |
vtkMRMLSequenceBrowserNode * vtkSlicerSceneViewsModuleLogic::AddNewSceneViewSequenceBrowserNode | ( | ) |
|
protected |
Convert all existing vtkMRMLSceneViewNode in the scene to use Sequences.
|
protected |
Convert the specified vtkMRMLSceneViewNode to use sequences.
void vtkSlicerSceneViewsModuleLogic::CreateSceneView | ( | std::string | name, |
std::string | description = "", | ||
int | screenshotType = ScreenShotType3D, | ||
vtkImageData * | screenshot = nullptr, | ||
bool | saveDisplayNodes = true, | ||
bool | saveViewNodes = true, | ||
vtkMRMLSequenceBrowserNode * | sequenceBrowser = nullptr ) |
Create a sceneView..
void vtkSlicerSceneViewsModuleLogic::CreateSceneView | ( | std::vector< vtkMRMLNode * > | savedNodes, |
std::string | name, | ||
std::string | description = "", | ||
int | screenshotType = ScreenShotType3D, | ||
vtkImageData * | screenshot = nullptr, | ||
vtkMRMLSequenceBrowserNode * | sequenceBrowser = nullptr ) |
void vtkSlicerSceneViewsModuleLogic::CreateSceneView | ( | vtkCollection * | savedNodes, |
std::string | name, | ||
std::string | description = "", | ||
int | screenshotType = ScreenShotType3D, | ||
vtkImageData * | screenshot = nullptr, | ||
vtkMRMLSequenceBrowserNode * | sequenceBrowser = nullptr ) |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
|
protected |
Add all display-related nodes to the vector.
|
protected |
|
protected |
Return the data node for the specified proxy node in the Nth scene view index.
std::string vtkSlicerSceneViewsModuleLogic::GetNthSceneViewDescription | ( | int | index | ) |
std::string vtkSlicerSceneViewsModuleLogic::GetNthSceneViewName | ( | int | index | ) |
vtkImageData * vtkSlicerSceneViewsModuleLogic::GetNthSceneViewScreenshot | ( | int | index | ) |
|
protected |
Return the screenshot data node in the Nth scene view index.
|
protected |
Returns the proxy node in the scene for the Nth scene view.
int vtkSlicerSceneViewsModuleLogic::GetNthSceneViewScreenshotType | ( | int | index | ) |
vtkMRMLSequenceBrowserNode * vtkSlicerSceneViewsModuleLogic::GetNthSceneViewSequenceBrowserNode | ( | int | index | ) |
int vtkSlicerSceneViewsModuleLogic::GetNumberOfSceneViews | ( | ) |
Get the number of sceneViews.
|
static |
int vtkSlicerSceneViewsModuleLogic::GetSceneViewIndexByName | ( | std::string | name | ) |
Returns the index for a scene view with the given name. If no matching scene view is found, returns -1.
|
static |
|
static |
|
static |
|
protected |
Returns the proxy node containing the scene view screenshot.
|
static |
|
static |
vtkMRMLSequenceBrowserNode * vtkSlicerSceneViewsModuleLogic::GetSceneViewSequenceBrowserNode | ( | bool | addMissingNode | ) |
std::string vtkSlicerSceneViewsModuleLogic::GetScreenShotTypeAsString | ( | int | type | ) |
Convert string to/from scene view enum type.
int vtkSlicerSceneViewsModuleLogic::GetScreenShotTypeFromString | ( | const std::string & | type | ) |
|
protected |
Add all view-related nodes to the vector.
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
bool vtkSlicerSceneViewsModuleLogic::IsSceneViewNode | ( | vtkMRMLNode * | node | ) |
Returns true if the node is a scene view node.
|
static |
void vtkSlicerSceneViewsModuleLogic::ModifyNthSceneView | ( | int | sceneViewIndex, |
std::string | name, | ||
std::string | , | ||
int | screenshotType, | ||
vtkImageData * | screenshot ) |
Modify an existing sceneView.
std::string vtkSlicerSceneViewsModuleLogic::MoveSceneViewDown | ( | std::string | id | ) |
Move sceneView up.
std::string vtkSlicerSceneViewsModuleLogic::MoveSceneViewUp | ( | std::string | id | ) |
Move sceneView up.
|
static |
|
overrideprotectedvirtual |
Called when a scene view sequence browser node is modified.
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::EndCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::EndImportEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::EndRestoreEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
Called when MRMLScene events are invoked.
Reimplemented from vtkMRMLAbstractLogic.
|
override |
|
overridevirtual |
Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.
Reimplemented from vtkMRMLAbstractLogic.
bool vtkSlicerSceneViewsModuleLogic::RemoveSceneView | ( | int | index | ) |
Remove a sceneView.
bool vtkSlicerSceneViewsModuleLogic::RestoreSceneView | ( | int | sceneViewIndex | ) |
Restore a sceneView.
bool vtkSlicerSceneViewsModuleLogic::RestoreSceneView | ( | std::string | sceneViewName | ) |
|
static |
int vtkSlicerSceneViewsModuleLogic::SceneViewIndexToSequenceBrowserIndex | ( | int | sceneViewIndex | ) |
Convert the index of the scene view to the corresponding value index of the sequence browser that holds the snapshot.
|
overridevirtual |
Initialize listening to MRML events.
Reimplemented from vtkMRMLAbstractLogic.
|
protected |
void vtkSlicerSceneViewsModuleLogic::SetNthSceneViewDescription | ( | int | index, |
std::string | description ) |
Set/Get the description of an existing sceneView.
void vtkSlicerSceneViewsModuleLogic::SetNthSceneViewName | ( | int | index, |
std::string | name ) |
Set/Get the name of an existing sceneView.
void vtkSlicerSceneViewsModuleLogic::SetNthSceneViewScreenshot | ( | int | index, |
vtkImageData * | screenshot ) |
Set/Get the screenshot of an existing sceneView.
void vtkSlicerSceneViewsModuleLogic::SetNthSceneViewScreenshotType | ( | int | index, |
int | type ) |
Set/Get the screenshot type of an existing sceneView.