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
vtkSegmentationConverterFactory.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Andras Lasso, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __vtkSegmentationConverterFactory_h
22#define __vtkSegmentationConverterFactory_h
23
24#include "vtkSegmentationCoreConfigure.h"
25
26// VTK includes
27#include <vtkObject.h>
28#include <vtkSmartPointer.h>
29
30// STD includes
31#include <vector>
32
34class vtkDataObject;
35
40class vtkSegmentationCore_EXPORT vtkSegmentationConverterFactory : public vtkObject
41{
42public:
43 typedef std::vector< vtkSmartPointer<vtkSegmentationConverterRule> > RuleListType;
44
45 vtkTypeMacro(vtkSegmentationConverterFactory, vtkObject);
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
52
57
61
64
68 bool DisableConverterRule(std::string sourceRepresentationName, std::string targetRepresentationName);
69
72 void DisableRepresentation(std::string representationName);
73
77 vtkDataObject* ConstructRepresentationObjectByClass(std::string className);
78
82 vtkDataObject* ConstructRepresentationObjectByRepresentation(std::string representationName);
83
84public:
87
94
95protected:
100
101 // Singleton management functions.
102 static void classInitialize();
103 static void classFinalize();
104
107
110};
111
123
128
129#endif
Utility class to make sure qSlicerModuleManager is initialized before it is used.
vtkSegmentationConverterFactoryInitialize Self
vtkDataObject * ConstructRepresentationObjectByRepresentation(std::string representationName)
std::vector< vtkSmartPointer< vtkSegmentationConverterRule > > RuleListType
void DisableRepresentation(std::string representationName)
static vtkSegmentationConverterFactory * GetInstance()
Return the singleton instance with no reference counting.
vtkDataObject * ConstructRepresentationObjectByClass(std::string className)
void operator=(const vtkSegmentationConverterFactory &)
void RegisterConverterRule(vtkSegmentationConverterRule *rule)
void CopyConverterRules(RuleListType &rules)
static vtkSegmentationConverterFactory * New()
const RuleListType & GetConverterRules()
Get all registered converter rules.
vtkSegmentationConverterFactory(const vtkSegmentationConverterFactory &)
void PrintSelf(ostream &os, vtkIndent indent) override
void UnregisterConverterRule(vtkSegmentationConverterRule *rule)
RuleListType Rules
Registered converter rules.
bool DisableConverterRule(std::string sourceRepresentationName, std::string targetRepresentationName)
Abstract converter rule class. Subclasses perform conversions between specific representation types....
static vtkSegmentationConverterFactoryInitialize vtkSegmentationConverterFactoryInitializer