Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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 : public vtkSlicerModuleLogic
36{
37public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
46 vtkMRMLModelNode* AddModel(vtkPolyData* polyData = nullptr);
47
51 vtkMRMLModelNode* AddModel(vtkAlgorithmOutput* polyData = nullptr);
52
60 vtkMRMLModelNode* AddModel(const char* filename, int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection* userMessages = nullptr);
61
68 int AddModels(const char* dirname, const char* suffix, int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS, vtkMRMLMessageCollection* userMessages = nullptr);
69
76 int SaveModel(const char* filename,
77 vtkMRMLModelNode* modelNode,
78 int coordinateSystem = vtkMRMLStorageNode::CoordinateSystemLPS,
79 vtkMRMLMessageCollection* userMessages = nullptr);
80
82 static void TransformModel(vtkMRMLTransformNode* tnode, vtkMRMLModelNode* modelNode, int transformNormals, vtkMRMLModelNode* modelOut);
83
87 void SetAllModelsVisibility(int flag);
88
89protected:
94
96 void SetMRMLSceneInternal(vtkMRMLScene* newScene) override;
97
98 void OnMRMLSceneEndImport() override;
99};
100
101#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