Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkSlicerModelsLogic.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
9 
14 
15 #ifndef __vtkSlicerModelsLogic_h
16 #define __vtkSlicerModelsLogic_h
17 
18 // Slicer includes
19 #include "vtkSlicerModuleLogic.h"
20 #include "vtkSlicerModelsModuleLogicExport.h"
21 
22 // VTK includes
23 #include <vtkVersion.h>
24 
25 class vtkMRMLModelNode;
26 class vtkMRMLStorageNode;
28 class vtkAlgorithmOutput;
29 class vtkPolyData;
30 
31 class VTK_SLICER_MODELS_MODULE_LOGIC_EXPORT vtkSlicerModelsLogic
32  : public vtkSlicerModuleLogic
33 {
34  public:
35 
37  static vtkSlicerModelsLogic *New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
44  virtual void SetColorLogic(vtkMRMLColorLogic* colorLogic);
45  vtkGetObjectMacro(ColorLogic, vtkMRMLColorLogic);
46 
49  vtkGetObjectMacro (ActiveModelNode, vtkMRMLModelNode);
50  void SetActiveModelNode (vtkMRMLModelNode *ActiveModelNode);
51 
56  vtkMRMLModelNode* AddModel(vtkPolyData* polyData = 0);
57 
62  vtkMRMLModelNode* AddModel(vtkAlgorithmOutput* polyData = 0);
63 
68  vtkMRMLModelNode* AddModel (const char* filename);
69 
73  int AddModels (const char* dirname, const char* suffix );
74 
77  int SaveModel (const char* filename, vtkMRMLModelNode *modelNode);
78 
82  bool AddScalar(const char* filename, vtkMRMLModelNode *modelNode);
83 
85  static void TransformModel(vtkMRMLTransformNode *tnode,
86  vtkMRMLModelNode *modelNode,
87  int transformNormals,
88  vtkMRMLModelNode *modelOut);
89 
93  void SetAllModelsVisibility(int flag);
94 
95 protected:
99  void operator=(const vtkSlicerModelsLogic&);
100 
102  virtual void SetMRMLSceneInternal(vtkMRMLScene* newScene) VTK_OVERRIDE;
103 
106  virtual void ObserveMRMLScene() VTK_OVERRIDE;
107 
108  //
109  vtkMRMLModelNode *ActiveModelNode;
110 
112  vtkMRMLColorLogic* ColorLogic;
113 
114 };
115 
116 #endif
117 
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node for representing a transformation between this node space and a parent node space...
MRML node to represent a 3D surface model.
MRML logic class for color manipulation.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
virtual void ObserveMRMLScene()
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
A superclass for other storage nodes.