ITK  6.0.0
Insight Toolkit
itkSpatialObjectWriter.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 itkSpatialObjectWriter_h
19#define itkSpatialObjectWriter_h
20
23#include "itkSpatialObject.h"
24
25namespace itk
26{
32template <unsigned int VDimension = 3,
33 typename PixelType = unsigned char,
34 typename TMeshTraits = DefaultStaticMeshTraits<PixelType, VDimension, VDimension>>
35class ITK_TEMPLATE_EXPORT SpatialObjectWriter : public Object
36{
37public:
38 ITK_DISALLOW_COPY_AND_MOVE(SpatialObjectWriter);
39
43
46
50
55
57
59 itkNewMacro(Self);
60
61 itkOverrideGetNameOfClassMacro(SpatialObjectWriter);
62
64 void
66
68 itkSetStringMacro(FileName);
69
71 itkGetStringMacro(FileName);
72
74 void
76 {
77 m_SpatialObject = input;
78 }
79
80 itkSetMacro(BinaryPoints, bool);
81 itkGetConstMacro(BinaryPoints, bool);
82 itkBooleanMacro(BinaryPoints);
83
89 void
90 SetMetaIOVersion(unsigned int ver);
91 unsigned int
92 GetMetaIOVersion(void) const;
93
94 void
95 SetTransformPrecision(unsigned int precision);
96
97 unsigned int
99
101 itkSetMacro(WriteImagesInSeparateFile, bool);
102 itkGetConstMacro(WriteImagesInSeparateFile, bool);
103 itkBooleanMacro(WriteImagesInSeparateFile);
107 void
108 RegisterMetaConverter(const char * metaTypeName,
109 const char * spatialObjectTypeName,
110 MetaConverterBaseType * converter);
111
112protected:
113 std::string m_FileName{};
114 bool m_BinaryPoints{};
115 bool m_WriteImagesInSeparateFile{};
116
118 ~SpatialObjectWriter() override = default;
119
120private:
121 SpatialObjectConstPointer m_SpatialObject{};
122
123 typename MetaSceneConverterType::Pointer m_MetaToSpatialConverter{};
124};
125} // namespace itk
126
127#ifndef ITK_MANUAL_INSTANTIATION
128# include "itkSpatialObjectWriter.hxx"
129#endif
130
131#endif // itkSpatialObjectWriter_h
Light weight base class for most itk classes.
Converts between MetaObject and SpatialObject group.
Base class for most ITK classes.
Definition: itkObject.h:62
typename SpatialObjectType::ConstPointer SpatialObjectConstPointer
~SpatialObjectWriter() override=default
unsigned int GetTransformPrecision()
void SetInput(const SpatialObjectType *input)
void SetTransformPrecision(unsigned int precision)
typename SpatialObjectType::Pointer SpatialObjectPointer
void RegisterMetaConverter(const char *metaTypeName, const char *spatialObjectTypeName, MetaConverterBaseType *converter)
unsigned int GetMetaIOVersion(void) const
void SetMetaIOVersion(unsigned int ver)
Implementation of the composite pattern.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....