ITK  5.4.0
Insight Toolkit
itkMetaConverterBase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkMetaConverterBase_h
19#define itkMetaConverterBase_h
20
21#include "itkSpatialObject.h"
22#include "metaObject.h"
23
24namespace itk
25{
26
41template <unsigned int VDimension = 3>
42class ITK_TEMPLATE_EXPORT MetaConverterBase : public Object
43{
44public:
45
51
53 itkOverrideGetNameOfClassMacro(MetaConverterBase);
54
57 using MetaObjectType = MetaObject;
58
61 ReadMeta(const char * name);
62
64 virtual bool
65 WriteMeta(const SpatialObjectType * spatialObject, const char * name);
66
70
72 virtual MetaObjectType *
73 SpatialObjectToMetaObject(const SpatialObjectType * spatialObject) = 0;
74
78 itkSetMacro(WriteImagesInSeparateFile, bool);
79 itkGetConstMacro(WriteImagesInSeparateFile, bool);
80 itkBooleanMacro(WriteImagesInSeparateFile);
83protected:
84 MetaConverterBase() = default;
85 ~MetaConverterBase() override = default;
86
88 virtual MetaObjectType *
90
91
92private:
93 bool m_WriteImagesInSeparateFile{ false };
94};
95
96} // namespace itk
97
98#ifndef ITK_MANUAL_INSTATIATION
99# include "itkMetaConverterBase.hxx"
100#endif
101
102#endif // itkMetaConverterBase_h
Light weight base class for most itk classes.
Base class for MetaObject<->SpatialObject converters.
virtual SpatialObjectPointer MetaObjectToSpatialObject(const MetaObjectType *mo)=0
typename SpatialObjectType::Pointer SpatialObjectPointer
~MetaConverterBase() override=default
virtual SpatialObjectPointer ReadMeta(const char *name)
virtual MetaObjectType * SpatialObjectToMetaObject(const SpatialObjectType *spatialObject)=0
virtual MetaObjectType * CreateMetaObject()=0
virtual bool WriteMeta(const SpatialObjectType *spatialObject, const char *name)
Base class for most ITK classes.
Definition: itkObject.h:62
Implementation of the composite pattern.
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....