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

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

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

Classes

struct  InvokeRequest
 Structure passed as calldata pointer in the RequestEvent invoked event. More...
 

Public Types

enum  Events {
  RequestInvokeEvent = vtkCommand::UserEvent + 1, PauseRenderEvent = vtkCommand::UserEvent + 101, ResumeRenderEvent, EditNodeEvent,
  ShowViewContextMenuEvent
}
 List of custom events fired by the class. More...
 
enum  IntersectingSlicesOperation { IntersectingSlicesVisibility, IntersectingSlicesInteractive, IntersectingSlicesTranslation, IntersectingSlicesRotation }
 
enum  Layers { LabelLayer = 0x1, ForegroundLayer = 0x2, BackgroundLayer = 0x4, AllLayers = LabelLayer | ForegroundLayer | BackgroundLayer }
 
typedef vtkMRMLAbstractLogic Superclass
 
- Public Types inherited from vtkMRMLAbstractLogic
typedef vtkObject Superclass
 
typedef void(vtkMRMLAbstractLogic::* TaskFunctionPointer) (void *clientdata)
 

Public Member Functions

virtual void EditNode (vtkMRMLNode *node)
 Requests the application to show user interface for editing a node. More...
 
void FitSliceToAll (bool onlyIfPropagateVolumeSelectionAllowed=false, bool resetOrientation=true)
 
virtual const char * GetClassName ()
 
vtkMRMLColorLogicGetColorLogic () const
 
std::string GetFontFilePath (const std::string &fontFileName)
 Get full path to custom font file for rendering views from font file name. More...
 
std::string GetFontsDirectory ()
 Get folder where font files are stored ("Fonts" subfolder in application share folder). More...
 
vtkMRMLInteractionNodeGetInteractionNode () const
 Get default Interaction node. More...
 
bool GetIntersectingSlicesEnabled (IntersectingSlicesOperation operation)
 
int GetIntersectingSlicesIntersectionMode ()
 
int GetIntersectingSlicesLineThicknessMode ()
 
vtkMRMLAbstractLogicGetModuleLogic (const char *moduleName) const
 
vtkMRMLSelectionNodeGetSelectionNode () const
 Get default Selection node. More...
 
vtkMRMLSliceLogicGetSliceLogic (vtkMRMLSliceNode *sliceNode) const
 
vtkMRMLSliceLogicGetSliceLogicByLayoutName (const char *layoutName) const
 
vtkMRMLSliceLogicGetSliceLogicByModelDisplayNode (vtkMRMLModelDisplayNode *displayNode) const
 Get slice logic from slice model display node. More...
 
vtkCollection * GetSliceLogics () const
 
const char * GetTemporaryPath ()
 Return the temporary path that was set by the application. More...
 
vtkMRMLViewLogicGetViewLogic (vtkMRMLViewNode *viewNode) const
 
vtkMRMLViewLogicGetViewLogicByLayoutName (const char *layoutName) const
 
vtkCollection * GetViewLogics () const
 
void InvokeEventWithDelay (unsigned int delayInMs, vtkObject *caller, unsigned long eventID=vtkCommand::ModifiedEvent, void *callData=nullptr)
 Conveniently calls an InvokeEvent on an object with a delay. More...
 
virtual int IsA (const char *type)
 
bool OpenSlicerDataBundle (const char *sdbFilePath, const char *temporaryDirectory)
 
virtual void PauseRender ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void PropagateBackgroundVolumeSelection (int fit=1)
 
void PropagateForegroundVolumeSelection (int fit=1)
 
void PropagateLabelVolumeSelection (int fit=1)
 
void PropagatePlotChartSelection ()
 Propagate selected PlotChart in the SelectionNode to Plot view nodes. More...
 
void PropagateTableSelection ()
 Propagate selected table in the SelectionNode to table view nodes. More...
 
void PropagateVolumeSelection (int fit=1)
 
void PropagateVolumeSelection (int layer, int fit)
 
virtual void ResumeRender ()
 
void SaveSceneScreenshot (vtkImageData *screenshot)
 
bool SaveSceneToSlicerDataBundleDirectory (const char *sdbDir, vtkImageData *screenShot=nullptr)
 
void SetColorLogic (vtkMRMLColorLogic *newColorLogic)
 
void SetIntersectingSlicesEnabled (IntersectingSlicesOperation operation, bool enabled)
 
void SetIntersectingSlicesIntersectionMode (int mode)
 
void SetIntersectingSlicesLineThicknessMode (int mode)
 
void SetModuleLogic (const char *moduleName, vtkMRMLAbstractLogic *moduleLogic)
 
void SetSliceLogics (vtkCollection *sliceLogics)
 All the slice logics in the application. More...
 
void SetTemporaryPath (const char *path)
 Set the temporary path the logics can use. The path should be set by the application. More...
 
void SetViewLogics (vtkCollection *viewLogics)
 All the view logics in the application. More...
 
std::string UnpackSlicerDataBundle (const char *sdbFilePath, const char *temporaryDirectory)
 
bool Unzip (const char *zipFileName, const char *destinationDirectory)
 
void UseCustomFontFile (vtkTextProperty *textProperty)
 
bool Zip (const char *zipFileName, const char *directoryToZip)
 
void SetFontFileName (int fontFamily, const std::string &fontFileName)
 
std::string GetFontFileName (int fontFamily)
 
- 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 std::string CreateUniqueFileName (const std::string &filename, const std::string &knownExtension="")
 
static int IsTypeOf (const char *type)
 
static int LoadDefaultParameterSets (vtkMRMLScene *scene, const std::vector< std::string > &directories)
 
static vtkMRMLApplicationLogicNew ()
 
static std::string PercentEncode (std::string s)
 
static vtkMRMLApplicationLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractLogic
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogicNew ()
 
static vtkMRMLAbstractLogicSafeDownCast (vtkObject *o)
 

Protected Member Functions

void OnMRMLSceneEndBatchProcess () override
 
void OnMRMLSceneEndImport () override
 
void OnMRMLSceneEndRestore () override
 
void OnMRMLSceneStartBatchProcess () override
 
void OnMRMLSceneStartImport () override
 
void OnMRMLSceneStartRestore () override
 
void ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) override
 
void SetInteractionNode (vtkMRMLInteractionNode *)
 
void SetMRMLSceneInternal (vtkMRMLScene *newScene) override
 
void SetSelectionNode (vtkMRMLSelectionNode *)
 
 vtkMRMLApplicationLogic ()
 
 ~vtkMRMLApplicationLogic () 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 OnMRMLSceneEndClose ()
 
virtual void OnMRMLSceneNew ()
 
virtual void OnMRMLSceneNodeAdded (vtkMRMLNode *)
 
virtual void OnMRMLSceneNodeRemoved (vtkMRMLNode *)
 
virtual void OnMRMLSceneStartClose ()
 
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
 

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 49 of file vtkMRMLApplicationLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 56 of file vtkMRMLApplicationLogic.h.

Member Enumeration Documentation

◆ Events

List of custom events fired by the class.

Enumerator
RequestInvokeEvent 
PauseRenderEvent 
ResumeRenderEvent 
EditNodeEvent 
ShowViewContextMenuEvent 

Definition at line 190 of file vtkMRMLApplicationLogic.h.

◆ IntersectingSlicesOperation

Enumerator
IntersectingSlicesVisibility 
IntersectingSlicesInteractive 
IntersectingSlicesTranslation 
IntersectingSlicesRotation 

Definition at line 255 of file vtkMRMLApplicationLogic.h.

◆ Layers

Enumerator
LabelLayer 
ForegroundLayer 
BackgroundLayer 
AllLayers 

Definition at line 116 of file vtkMRMLApplicationLogic.h.

Constructor & Destructor Documentation

◆ vtkMRMLApplicationLogic()

vtkMRMLApplicationLogic::vtkMRMLApplicationLogic ( )
protected

◆ ~vtkMRMLApplicationLogic()

vtkMRMLApplicationLogic::~vtkMRMLApplicationLogic ( )
overrideprotected

Member Function Documentation

◆ CreateUniqueFileName()

static std::string vtkMRMLApplicationLogic::CreateUniqueFileName ( const std::string &  filename,
const std::string &  knownExtension = "" 
)
static

Creates a unique (non-existent) file name by adding an index after base file name. knownExtension specifies the extension the index should be inserted before. It is necessary to provide extension, because there is no reliable way of correctly determining extension automatically (for example, file extension of some.file.nii.gz could be gz, nii.gz, or file.nii.gz and only one of them is correct).

◆ EditNode()

virtual void vtkMRMLApplicationLogic::EditNode ( vtkMRMLNode node)
virtual

Requests the application to show user interface for editing a node.

◆ FitSliceToAll()

void vtkMRMLApplicationLogic::FitSliceToAll ( bool  onlyIfPropagateVolumeSelectionAllowed = false,
bool  resetOrientation = true 
)

Fit all the volumes into their views If onlyIfPropagateVolumeSelectionAllowed is true then field of view will be reset on only those slices where propagate volume selection is allowed If resetOrientation is true then slice orientation can be modified during function call

◆ GetClassName()

virtual const char* vtkMRMLApplicationLogic::GetClassName ( )
virtual

Reimplemented from vtkMRMLAbstractLogic.

Reimplemented in vtkSlicerApplicationLogic.

◆ GetColorLogic()

vtkMRMLColorLogic* vtkMRMLApplicationLogic::GetColorLogic ( ) const

◆ GetFontFileName()

std::string vtkMRMLApplicationLogic::GetFontFileName ( int  fontFamily)

◆ GetFontFilePath()

std::string vtkMRMLApplicationLogic::GetFontFilePath ( const std::string &  fontFileName)

Get full path to custom font file for rendering views from font file name.

◆ GetFontsDirectory()

std::string vtkMRMLApplicationLogic::GetFontsDirectory ( )

Get folder where font files are stored ("Fonts" subfolder in application share folder).

◆ GetInteractionNode()

vtkMRMLInteractionNode* vtkMRMLApplicationLogic::GetInteractionNode ( ) const

Get default Interaction node.

◆ GetIntersectingSlicesEnabled()

bool vtkMRMLApplicationLogic::GetIntersectingSlicesEnabled ( IntersectingSlicesOperation  operation)

◆ GetIntersectingSlicesIntersectionMode()

int vtkMRMLApplicationLogic::GetIntersectingSlicesIntersectionMode ( )

◆ GetIntersectingSlicesLineThicknessMode()

int vtkMRMLApplicationLogic::GetIntersectingSlicesLineThicknessMode ( )

◆ GetModuleLogic()

vtkMRMLAbstractLogic* vtkMRMLApplicationLogic::GetModuleLogic ( const char *  moduleName) const

Gets a constant pointer to module logic associated with a given module

Parameters
moduleNamename of the module associated to the logic
Returns
constant pointer to vtkMRMLAbstractLogic corresponding to the logic associated to th logic

◆ GetSelectionNode()

vtkMRMLSelectionNode* vtkMRMLApplicationLogic::GetSelectionNode ( ) const

Get default Selection node.

◆ GetSliceLogic()

vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogic ( vtkMRMLSliceNode sliceNode) const

◆ GetSliceLogicByLayoutName()

vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogicByLayoutName ( const char *  layoutName) const

◆ GetSliceLogicByModelDisplayNode()

vtkMRMLSliceLogic* vtkMRMLApplicationLogic::GetSliceLogicByModelDisplayNode ( vtkMRMLModelDisplayNode displayNode) const

Get slice logic from slice model display node.

◆ GetSliceLogics()

vtkCollection* vtkMRMLApplicationLogic::GetSliceLogics ( ) const

◆ GetTemporaryPath()

const char* vtkMRMLApplicationLogic::GetTemporaryPath ( )

Return the temporary path that was set by the application.

◆ GetViewLogic()

vtkMRMLViewLogic* vtkMRMLApplicationLogic::GetViewLogic ( vtkMRMLViewNode viewNode) const

◆ GetViewLogicByLayoutName()

vtkMRMLViewLogic* vtkMRMLApplicationLogic::GetViewLogicByLayoutName ( const char *  layoutName) const

◆ GetViewLogics()

vtkCollection* vtkMRMLApplicationLogic::GetViewLogics ( ) const

◆ InvokeEventWithDelay()

void vtkMRMLApplicationLogic::InvokeEventWithDelay ( unsigned int  delayInMs,
vtkObject *  caller,
unsigned long  eventID = vtkCommand::ModifiedEvent,
void *  callData = nullptr 
)

Conveniently calls an InvokeEvent on an object with a delay.

◆ IsA()

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

Reimplemented from vtkMRMLAbstractLogic.

Reimplemented in vtkSlicerApplicationLogic.

◆ IsTypeOf()

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

◆ LoadDefaultParameterSets()

static int vtkMRMLApplicationLogic::LoadDefaultParameterSets ( vtkMRMLScene scene,
const std::vector< std::string > &  directories 
)
static

Load any default parameter sets into the specified scene Returns the total number of loaded parameter sets

◆ New()

static vtkMRMLApplicationLogic* vtkMRMLApplicationLogic::New ( )
static

◆ OnMRMLSceneEndBatchProcess()

void vtkMRMLApplicationLogic::OnMRMLSceneEndBatchProcess ( )
overrideprotectedvirtual

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

◆ OnMRMLSceneEndImport()

void vtkMRMLApplicationLogic::OnMRMLSceneEndImport ( )
overrideprotectedvirtual

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

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneStartImport, OnMRMLSceneNew

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneEndRestore()

void vtkMRMLApplicationLogic::OnMRMLSceneEndRestore ( )
overrideprotectedvirtual

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

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneStartRestore

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneStartBatchProcess()

void vtkMRMLApplicationLogic::OnMRMLSceneStartBatchProcess ( )
overrideprotectedvirtual

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

◆ OnMRMLSceneStartImport()

void vtkMRMLApplicationLogic::OnMRMLSceneStartImport ( )
overrideprotectedvirtual

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

◆ OnMRMLSceneStartRestore()

void vtkMRMLApplicationLogic::OnMRMLSceneStartRestore ( )
overrideprotectedvirtual

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

◆ OpenSlicerDataBundle()

bool vtkMRMLApplicationLogic::OpenSlicerDataBundle ( const char *  sdbFilePath,
const char *  temporaryDirectory 
)

Open the file into a temp directory and load the scene file inside. Note that the first mrml file found in the extracted directory will be used.

◆ PauseRender()

virtual void vtkMRMLApplicationLogic::PauseRender ( )
virtual

Pauses rendering for all views in the current layout. It should be used in situations where multiple nodes are modified, and it is undesirable to display an intermediate state. The caller is responsible for making sure that each PauseRender() is paired with ResumeRender().

See also
vtkMRMLApplicationLogic::ResumeRender()
qSlicerApplication::setRenderPaused()

◆ PercentEncode()

static std::string vtkMRMLApplicationLogic::PercentEncode ( std::string  s)
static

Convert reserved characters into percent notation to avoid issues with filenames containing things that might be mistaken, for example, for windows drive letters. Used internally by SaveSceneToSlicerDataBundleDirectory. This is not a general purpose implementation; it preserves commonly used characters for filenames but avoids known issue like slashes or colons. Ideally a version from vtksys or similar should be used, but nothing seems to be available. https://en.wikipedia.org/wiki/Percent-encoding See https://github.com/Slicer/Slicer/issues/2605

◆ PrintSelf()

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

◆ ProcessMRMLNodesEvents()

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

◆ PropagateBackgroundVolumeSelection()

void vtkMRMLApplicationLogic::PropagateBackgroundVolumeSelection ( int  fit = 1)

Propagate only active background volume in the SelectionNode to slice composite nodes

See also
FitSliceToAll()
vtkMRMLSelectionNode::SetActiveVolumeID()
Layers::BackgroundLayer

◆ PropagateForegroundVolumeSelection()

void vtkMRMLApplicationLogic::PropagateForegroundVolumeSelection ( int  fit = 1)

Propagate only active foreground volume in the SelectionNode to slice composite nodes

See also
FitSliceToAll()
vtkMRMLSelectionNode::SetSecondaryVolumeID()
Layers::ForegroundLayer

◆ PropagateLabelVolumeSelection()

void vtkMRMLApplicationLogic::PropagateLabelVolumeSelection ( int  fit = 1)

Propagate only active label volume in the SelectionNode to slice composite nodes

See also
FitSliceToAll()
vtkMRMLSelectionNode::SetActiveLabelVolumeID()
Layers::LabelLayer

◆ PropagatePlotChartSelection()

void vtkMRMLApplicationLogic::PropagatePlotChartSelection ( )

Propagate selected PlotChart in the SelectionNode to Plot view nodes.

◆ PropagateTableSelection()

void vtkMRMLApplicationLogic::PropagateTableSelection ( )

Propagate selected table in the SelectionNode to table view nodes.

◆ PropagateVolumeSelection() [1/2]

void vtkMRMLApplicationLogic::PropagateVolumeSelection ( int  fit = 1)

Apply the active volumes in the SelectionNode to the slice composite nodes Perform the default behavior related to selecting a volume (in this case, making it the background for all SliceCompositeNodes)

See also
vtkInternal::PropagateVolumeSelection()
FitSliceToAll()
vtkMRMLSelectionNode::SetActiveVolumeID()
vtkMRMLSelectionNode::SetSecondaryVolumeID()
vtkMRMLSelectionNode::SetActiveLabelVolumeID()

◆ PropagateVolumeSelection() [2/2]

void vtkMRMLApplicationLogic::PropagateVolumeSelection ( int  layer,
int  fit 
)

Propagate selected volume layer in the SelectionNode to the slice composite nodes.

See also
Layers

◆ ResumeRender()

virtual void vtkMRMLApplicationLogic::ResumeRender ( )
virtual

Resumes rendering for all views in the current layout.

See also
vtkMRMLApplicationLogic::PauseRender()
qSlicerApplication::setRenderPaused()

◆ SafeDownCast()

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

◆ SaveSceneScreenshot()

void vtkMRMLApplicationLogic::SaveSceneScreenshot ( vtkImageData *  screenshot)

Saves the provided image as screenshot of the scene (same filepath as the scene URL but extension is .png instead of .mrml). Uses current scene's URL property, so the URL must be up-to-date when calling this method.

◆ SaveSceneToSlicerDataBundleDirectory()

bool vtkMRMLApplicationLogic::SaveSceneToSlicerDataBundleDirectory ( const char *  sdbDir,
vtkImageData *  screenShot = nullptr 
)

Save the scene into a self contained directory, sdbDir Called by the qSlicerSceneWriter, which can be accessed via

See also
qSlicerCoreIOManager::saveScene If screenShot is not null, use it as the screen shot for a scene view Returns false if the save failed

◆ SetColorLogic()

void vtkMRMLApplicationLogic::SetColorLogic ( vtkMRMLColorLogic newColorLogic)

Set/Get color logic. The application typically sets a custom color logic (i.e. vtkSlicerColorLogic) that contains default color nodes. By default, a vtkMRMLColorLogic is instantiated.

◆ SetFontFileName()

void vtkMRMLApplicationLogic::SetFontFileName ( int  fontFamily,
const std::string &  fontFileName 
)

Set custom font file name for rendering views. fontFamily can be VTK_ARIAL, VTK_COURIER, VTK_TIMES. Font file must be in GetFontsDirectory().

◆ SetInteractionNode()

void vtkMRMLApplicationLogic::SetInteractionNode ( vtkMRMLInteractionNode )
protected

◆ SetIntersectingSlicesEnabled()

void vtkMRMLApplicationLogic::SetIntersectingSlicesEnabled ( IntersectingSlicesOperation  operation,
bool  enabled 
)

◆ SetIntersectingSlicesIntersectionMode()

void vtkMRMLApplicationLogic::SetIntersectingSlicesIntersectionMode ( int  mode)

◆ SetIntersectingSlicesLineThicknessMode()

void vtkMRMLApplicationLogic::SetIntersectingSlicesLineThicknessMode ( int  mode)

◆ SetModuleLogic()

void vtkMRMLApplicationLogic::SetModuleLogic ( const char *  moduleName,
vtkMRMLAbstractLogic moduleLogic 
)

Sets a module with its corresponding logic to the application logic.

Parameters
moduleNamename of the module.
moduleLogicpointer to logic to be associated to the module. If this parameter is nullptr, then the module logic will be removed from the application logic.

◆ SetMRMLSceneInternal()

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

◆ SetSelectionNode()

void vtkMRMLApplicationLogic::SetSelectionNode ( vtkMRMLSelectionNode )
protected

◆ SetSliceLogics()

void vtkMRMLApplicationLogic::SetSliceLogics ( vtkCollection *  sliceLogics)

All the slice logics in the application.

◆ SetTemporaryPath()

void vtkMRMLApplicationLogic::SetTemporaryPath ( const char *  path)

Set the temporary path the logics can use. The path should be set by the application.

◆ SetViewLogics()

void vtkMRMLApplicationLogic::SetViewLogics ( vtkCollection *  viewLogics)

All the view logics in the application.

◆ UnpackSlicerDataBundle()

std::string vtkMRMLApplicationLogic::UnpackSlicerDataBundle ( const char *  sdbFilePath,
const char *  temporaryDirectory 
)

Unpack the file into a temp directory and return the scene file inside. Note that the first mrml file found in the extracted directory will be used.

◆ Unzip()

bool vtkMRMLApplicationLogic::Unzip ( const char *  zipFileName,
const char *  destinationDirectory 
)

unzip the zip file to the current working directory Returns success or failure.

◆ UseCustomFontFile()

void vtkMRMLApplicationLogic::UseCustomFontFile ( vtkTextProperty *  textProperty)

Update text property to use custom font file. Font family is set from arial/courier/times font family to custom fontfile. Font file path is set to the one specified in FontFileName property in this object.

◆ Zip()

bool vtkMRMLApplicationLogic::Zip ( const char *  zipFileName,
const char *  directoryToZip 
)

zip the directory into a zip file Returns success or failure.


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