Slicer  5.3
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
vtkSlicerModelsLogic Class Reference

#include <Modules/Loadable/Models/Logic/vtkSlicerModelsLogic.h>

Inheritance diagram for vtkSlicerModelsLogic:
Inheritance graph
[legend]
Collaboration diagram for vtkSlicerModelsLogic:
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

vtkMRMLModelNodeAddModel (vtkPolyData *polyData=nullptr)
 
vtkMRMLModelNodeAddModel (vtkAlgorithmOutput *polyData=nullptr)
 
vtkMRMLModelNodeAddModel (const char *filename, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
 
int AddModels (const char *dirname, const char *suffix, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
 
virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
int SaveModel (const char *filename, vtkMRMLModelNode *modelNode, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
 
void SetAllModelsVisibility (int flag)
 
- 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 int IsTypeOf (const char *type)
 
static vtkSlicerModelsLogicNew ()
 The Usual vtk class functions. More...
 
static vtkSlicerModelsLogicSafeDownCast (vtkObject *o)
 
static void TransformModel (vtkMRMLTransformNode *tnode, vtkMRMLModelNode *modelNode, int transformNormals, vtkMRMLModelNode *modelOut)
 Transform models's polydata. More...
 
- 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

void ObserveMRMLScene () override
 
void OnMRMLSceneEndImport () override
 
void operator= (const vtkSlicerModelsLogic &)
 
void SetMRMLSceneInternal (vtkMRMLScene *newScene) override
 Reimplemented to observe the NodeRemovedEvent scene event. More...
 
 vtkSlicerModelsLogic ()
 
 vtkSlicerModelsLogic (const vtkSlicerModelsLogic &)
 
 ~vtkSlicerModelsLogic () 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 OnMRMLNodeModified (vtkMRMLNode *)
 
virtual void OnMRMLSceneEndBatchProcess ()
 
virtual void OnMRMLSceneEndClose ()
 
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=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 35 of file vtkSlicerModelsLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 42 of file vtkSlicerModelsLogic.h.

Constructor & Destructor Documentation

◆ vtkSlicerModelsLogic() [1/2]

vtkSlicerModelsLogic::vtkSlicerModelsLogic ( )
protected

◆ ~vtkSlicerModelsLogic()

vtkSlicerModelsLogic::~vtkSlicerModelsLogic ( )
overrideprotected

◆ vtkSlicerModelsLogic() [2/2]

vtkSlicerModelsLogic::vtkSlicerModelsLogic ( const vtkSlicerModelsLogic )
protected

Member Function Documentation

◆ AddModel() [1/3]

vtkMRMLModelNode* vtkSlicerModelsLogic::AddModel ( vtkPolyData *  polyData = nullptr)

Add into the scene a new mrml model node with an existing polydata A display node is also added into the scene. param polyData surface mesh in RAS coordinate system.

◆ AddModel() [2/3]

vtkMRMLModelNode* vtkSlicerModelsLogic::AddModel ( vtkAlgorithmOutput *  polyData = nullptr)

Add into the scene a new mrml model node with an existing polydata A display node is also added into the scene. param polyData surface mesh algorithm output in RAS coordinate system.

◆ AddModel() [3/3]

vtkMRMLModelNode* vtkSlicerModelsLogic::AddModel ( const char *  filename,
int  coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
vtkMRMLMessageCollection userMessages = nullptr 
)

Add into the scene a new mrml model node and read it's polydata from a specified file A display node and a storage node are also added into the scene

Parameters
coordinateSystemIf coordinate system is not specified in the file then this coordinate system is used. Default is LPS.
userMessagesUser-displayable warning or error messages can be received if userMessages object is specified.

◆ AddModels()

int vtkSlicerModelsLogic::AddModels ( const char *  dirname,
const char *  suffix,
int  coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
vtkMRMLMessageCollection userMessages = nullptr 
)

Create model nodes and read their polydata from a specified directory

Parameters
coordinateSystemIf coordinate system is not specified in the file then this coordinate system is used. Default is LPS.
userMessagesUser-displayable warning or error messages can be received if userMessages object is specified.

◆ GetClassName()

virtual const char* vtkSlicerModelsLogic::GetClassName ( )
virtual

Reimplemented from vtkSlicerModuleLogic.

◆ IsA()

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

Reimplemented from vtkSlicerModuleLogic.

◆ IsTypeOf()

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

◆ New()

static vtkSlicerModelsLogic* vtkSlicerModelsLogic::New ( )
static

The Usual vtk class functions.

◆ ObserveMRMLScene()

void vtkSlicerModelsLogic::ObserveMRMLScene ( )
overrideprotectedvirtual

Reimplemented to make sure the singleton vtkMRMLClipModelsNode is instantiated.

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneEndImport()

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

◆ operator=()

void vtkSlicerModelsLogic::operator= ( const vtkSlicerModelsLogic )
protected

◆ PrintSelf()

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

◆ SafeDownCast()

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

◆ SaveModel()

int vtkSlicerModelsLogic::SaveModel ( const char *  filename,
vtkMRMLModelNode modelNode,
int  coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
vtkMRMLMessageCollection userMessages = nullptr 
)

Write model's polydata to a specified file

Parameters
coordinateSystemIf coordinate system is not specified in the file then this coordinate system is used. Default is -1, which means that the coordinate system specified in the storage node will be used.
userMessagesUser-displayable warning or error messages can be received if userMessages object is specified.

◆ SetAllModelsVisibility()

void vtkSlicerModelsLogic::SetAllModelsVisibility ( int  flag)

Iterate through all models in the scene, find all their display nodes and set their visibility flag to flag. Does not touch model hierarchy nodes with display nodes

◆ SetMRMLSceneInternal()

void vtkSlicerModelsLogic::SetMRMLSceneInternal ( vtkMRMLScene newScene)
overrideprotectedvirtual

Reimplemented to observe the NodeRemovedEvent scene event.

Reimplemented from vtkMRMLAbstractLogic.

◆ TransformModel()

static void vtkSlicerModelsLogic::TransformModel ( vtkMRMLTransformNode tnode,
vtkMRMLModelNode modelNode,
int  transformNormals,
vtkMRMLModelNode modelOut 
)
static

Transform models's polydata.


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