ITK  5.2.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  * http://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 
21 #include "itkMetaSceneConverter.h"
22 #include "itkMetaConverterBase.h"
23 #include "itkSpatialObject.h"
24 
25 namespace itk
26 {
32 template <unsigned int NDimensions = 3,
33  typename PixelType = unsigned char,
34  typename TMeshTraits = DefaultStaticMeshTraits<PixelType, NDimensions, NDimensions>>
35 class ITK_TEMPLATE_EXPORT SpatialObjectWriter : public Object
36 {
37 public:
38  ITK_DISALLOW_COPY_AND_MOVE(SpatialObjectWriter);
39 
43 
45  using Superclass = Object;
46 
49 
54 
56 
58  itkNewMacro(Self);
59 
60  itkTypeMacro(SpatialObjectWriter, Object);
61 
63  void
64  Update();
65 
67  itkSetStringMacro(FileName);
68 
70  itkGetStringMacro(FileName);
71 
73  void
75  {
76  m_SpatialObject = input;
77  }
78 
79  itkSetMacro(BinaryPoints, bool);
80  itkGetConstMacro(BinaryPoints, bool);
81 
82  void
83  SetTransformPrecision(unsigned int precision);
84 
85  unsigned int
86  GetTransformPrecision();
87 
89  itkSetMacro(WriteImagesInSeparateFile, bool);
90  itkGetConstMacro(WriteImagesInSeparateFile, bool);
92 
94  void
95  RegisterMetaConverter(const char * metaTypeName,
96  const char * spatialObjectTypeName,
97  MetaConverterBaseType * converter);
98 
99 protected:
100  std::string m_FileName;
103 
105  ~SpatialObjectWriter() override = default;
106 
107 private:
109 
111 };
112 } // namespace itk
113 
114 #ifndef ITK_MANUAL_INSTANTIATION
115 # include "itkSpatialObjectWriter.hxx"
116 #endif
117 
118 #endif // itkSpatialObjectWriter_h
itk::SpatialObjectWriter::m_MetaToSpatialConverter
MetaSceneConverterType::Pointer m_MetaToSpatialConverter
Definition: itkSpatialObjectWriter.h:110
itk::SpatialObjectWriter::SpatialObjectPointer
typename SpatialObjectType::Pointer SpatialObjectPointer
Definition: itkSpatialObjectWriter.h:48
itkSpatialObject.h
itk::SmartPointer< Self >
itk::SpatialObjectWriter::SetInput
void SetInput(SpatialObjectType *input)
Definition: itkSpatialObjectWriter.h:74
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::SpatialObjectWriter::m_BinaryPoints
bool m_BinaryPoints
Definition: itkSpatialObjectWriter.h:101
itkMetaSceneConverter.h
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:57
itk::SpatialObjectWriter::m_SpatialObject
SpatialObjectPointer m_SpatialObject
Definition: itkSpatialObjectWriter.h:108
itk::MetaConverterBase< NDimensions >
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::SpatialObjectWriter::m_WriteImagesInSeparateFile
bool m_WriteImagesInSeparateFile
Definition: itkSpatialObjectWriter.h:102
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::SpatialObjectWriter
TODO.
Definition: itkSpatialObjectWriter.h:35
itk::MetaSceneConverter
Converts between MetaObject and SpaitalObject group.
Definition: itkMetaSceneConverter.h:48
itk::SpatialObjectWriter::m_FileName
std::string m_FileName
Definition: itkSpatialObjectWriter.h:100
itkMetaConverterBase.h