Slicer  4.10
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
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=0)
 
vtkMRMLModelNodeAddModel (vtkAlgorithmOutput *polyData=0)
 
vtkMRMLModelNodeAddModel (const char *filename)
 
int AddModels (const char *dirname, const char *suffix)
 
bool AddScalar (const char *filename, vtkMRMLModelNode *modelNode)
 
virtual vtkMRMLModelNodeGetActiveModelNode ()
 
The currently active mrml volume node More...
 
virtual const char * GetClassName ()
 
virtual vtkMRMLColorLogicGetColorLogic ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
int SaveModel (const char *filename, vtkMRMLModelNode *modelNode)
 
Write model's polydata to a specified file More...
 
void SetActiveModelNode (vtkMRMLModelNode *ActiveModelNode)
 
void SetAllModelsVisibility (int flag)
 
virtual void SetColorLogic (vtkMRMLColorLogic *colorLogic)
 
- Public Member Functions inherited from vtkSlicerModuleLogic
virtual vtkSlicerApplicationLogicGetApplicationLogic ()
 Get access to overall application state. More...
 
std::string GetModuleShareDirectory () const
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_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) VTK_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

virtual void ObserveMRMLScene () VTK_OVERRIDE
 
void operator= (const vtkSlicerModelsLogic &)
 
virtual void SetMRMLSceneInternal (vtkMRMLScene *newScene) VTK_OVERRIDE
 Reimplemented to observe the NodeRemovedEvent scene event. More...
 
 vtkSlicerModelsLogic ()
 
 vtkSlicerModelsLogic (const vtkSlicerModelsLogic &)
 
 ~vtkSlicerModelsLogic ()
 
- Protected Member Functions inherited from vtkSlicerModuleLogic
 vtkSlicerModuleLogic ()
 
virtual ~vtkSlicerModuleLogic ()
 
- 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 ()
 
virtual void Modified () VTK_OVERRIDE
 
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 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 ()
 
virtual ~vtkMRMLAbstractLogic ()
 

Protected Attributes

vtkMRMLModelNodeActiveModelNode
 
vtkMRMLColorLogicColorLogic
 Color logic. More...
 

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 31 of file vtkSlicerModelsLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 38 of file vtkSlicerModelsLogic.h.

Constructor & Destructor Documentation

◆ vtkSlicerModelsLogic() [1/2]

vtkSlicerModelsLogic::vtkSlicerModelsLogic ( )
protected

◆ ~vtkSlicerModelsLogic()

vtkSlicerModelsLogic::~vtkSlicerModelsLogic ( )
protected

◆ vtkSlicerModelsLogic() [2/2]

vtkSlicerModelsLogic::vtkSlicerModelsLogic ( const vtkSlicerModelsLogic )
protected

Member Function Documentation

◆ AddModel() [1/3]

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

Add into the scene a new mrml model node with an existing polydata A display node is also added into the scene.

Todo:
Should the function AddModel also add a storage node ?

◆ AddModel() [2/3]

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

Add into the scene a new mrml model node with an existing polydata A display node is also added into the scene.

Todo:
Should the function AddModel also add a storage node ?

◆ AddModel() [3/3]

vtkMRMLModelNode* vtkSlicerModelsLogic::AddModel ( const char *  filename)

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

◆ AddModels()

int vtkSlicerModelsLogic::AddModels ( const char *  dirname,
const char *  suffix 
)

Create model nodes and read their polydata from a specified directory

◆ AddScalar()

bool vtkSlicerModelsLogic::AddScalar ( const char *  filename,
vtkMRMLModelNode modelNode 
)

Read in a scalar overlay and add it to the model node

Returns
True on success

◆ GetActiveModelNode()

virtual vtkMRMLModelNode* vtkSlicerModelsLogic::GetActiveModelNode ( )
virtual


The currently active mrml volume node

◆ GetClassName()

virtual const char* vtkSlicerModelsLogic::GetClassName ( )
virtual

Reimplemented from vtkSlicerModuleLogic.

◆ GetColorLogic()

virtual vtkMRMLColorLogic* vtkSlicerModelsLogic::GetColorLogic ( )
virtual

◆ 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()

virtual void vtkSlicerModelsLogic::ObserveMRMLScene ( )
protectedvirtual

Reimplemented to make sure the singleton vtkMRMLClipModelsNode is instantiated.

Reimplemented from vtkMRMLAbstractLogic.

◆ operator=()

void vtkSlicerModelsLogic::operator= ( const vtkSlicerModelsLogic )
protected

◆ PrintSelf()

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

◆ SafeDownCast()

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

◆ SaveModel()

int vtkSlicerModelsLogic::SaveModel ( const char *  filename,
vtkMRMLModelNode modelNode 
)


Write model's polydata to a specified file

◆ SetActiveModelNode()

void vtkSlicerModelsLogic::SetActiveModelNode ( vtkMRMLModelNode ActiveModelNode)

◆ 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

◆ SetColorLogic()

virtual void vtkSlicerModelsLogic::SetColorLogic ( vtkMRMLColorLogic colorLogic)
virtual

The color logic is used to retrieve the default color node ID for model nodes.

◆ SetMRMLSceneInternal()

virtual void vtkSlicerModelsLogic::SetMRMLSceneInternal ( vtkMRMLScene newScene)
protectedvirtual

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.

Member Data Documentation

◆ ActiveModelNode

vtkMRMLModelNode* vtkSlicerModelsLogic::ActiveModelNode
protected

Definition at line 109 of file vtkSlicerModelsLogic.h.

◆ ColorLogic

vtkMRMLColorLogic* vtkSlicerModelsLogic::ColorLogic
protected

Color logic.

Definition at line 112 of file vtkSlicerModelsLogic.h.


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