Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
20#include "vtkSlicerModelsModuleLogicExport.h"
21
22// MRML includes
23#include "vtkMRMLStorageNode.h"
24
25// VTK includes
26#include <vtkVersion.h>
27
32class vtkAlgorithmOutput;
33class vtkPolyData;
34
35class VTK_SLICER_MODELS_MODULE_LOGIC_EXPORT vtkSlicerModelsLogic
37{
38 public:
39
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
48 vtkMRMLModelNode* AddModel(vtkPolyData* polyData = nullptr);
49
53 vtkMRMLModelNode* AddModel(vtkAlgorithmOutput* polyData = nullptr);
54
62 vtkMRMLModelNode* AddModel(const char* filename, int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
63 vtkMRMLMessageCollection* userMessages = nullptr);
64
71 int AddModels(const char* dirname, const char* suffix, int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
72 vtkMRMLMessageCollection* userMessages = nullptr);
73
80 int SaveModel(const char* filename, vtkMRMLModelNode *modelNode, int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
81 vtkMRMLMessageCollection* userMessages = nullptr);
82
85 vtkMRMLModelNode *modelNode,
86 int transformNormals,
87 vtkMRMLModelNode *modelOut);
88
92 void SetAllModelsVisibility(int flag);
93
94protected:
99
101 void SetMRMLSceneInternal(vtkMRMLScene* newScene) override;
102
103 void OnMRMLSceneEndImport() override;
104};
105
106#endif
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
A superclass for other storage nodes.
MRML node for representing a transformation between this node space and a parent node space.
void operator=(const vtkSlicerModelsLogic &)
vtkMRMLModelNode * AddModel(const char *filename, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
void SetMRMLSceneInternal(vtkMRMLScene *newScene) override
Reimplemented to observe the NodeRemovedEvent scene event.
void PrintSelf(ostream &os, vtkIndent indent) override
int AddModels(const char *dirname, const char *suffix, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
static vtkSlicerModelsLogic * New()
The Usual vtk class functions.
vtkMRMLModelNode * AddModel(vtkPolyData *polyData=nullptr)
~vtkSlicerModelsLogic() override
static void TransformModel(vtkMRMLTransformNode *tnode, vtkMRMLModelNode *modelNode, int transformNormals, vtkMRMLModelNode *modelOut)
Transform models's polydata.
vtkSlicerModelsLogic(const vtkSlicerModelsLogic &)
void SetAllModelsVisibility(int flag)
vtkMRMLModelNode * AddModel(vtkAlgorithmOutput *polyData=nullptr)
int SaveModel(const char *filename, vtkMRMLModelNode *modelNode, int coordinateSystem=vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection *userMessages=nullptr)
void OnMRMLSceneEndImport() override