ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSpatialObjectWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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,
35  NDimensions,
36  NDimensions >
37  >
38 class ITK_TEMPLATE_EXPORT SpatialObjectWriter:public Object
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectWriter);
42 
46 
48  using Superclass = Object;
49 
53 
58 
61 
63  itkNewMacro(Self);
64 
65  itkTypeMacro(SpatialObjectWriter, Object);
66 
68  void Update();
69 
71  itkSetStringMacro(FileName);
72 
74  itkGetStringMacro(FileName);
75 
77  void SetInput(SpatialObjectType *input){ m_SpatialObject = input; }
78 
79  void SetInput(SceneType *input){ m_Scene = input; }
80 
81  itkSetMacro(BinaryPoints, bool);
82  itkGetConstMacro(BinaryPoints, bool);
83 
84  void SetTransformPrecision(unsigned int precision);
85 
86  unsigned int GetTransformPrecision();
87 
89  itkSetMacro(WriteImagesInSeparateFile, bool);
90  itkGetConstMacro(WriteImagesInSeparateFile, bool);
92 
94  void RegisterMetaConverter(const char *metaTypeName,
95  const char *spatialObjectTypeName,
96  MetaConverterBaseType *converter);
97 
98 protected:
99  std::string m_FileName;
102 
104  ~SpatialObjectWriter() override = default;
105 
106 private:
107 
110 
112 };
113 } // namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkSpatialObjectWriter.hxx"
117 #endif
118 
119 #endif // itkSpatialObjectWriter_h
Light weight base class for most itk classes.
typename SpatialObjectType::Pointer SpatialObjectPointer
void SetInput(SpatialObjectType *input)
MetaSceneConverterType::Pointer m_MetaToSpatialConverter
void SetInput(SceneType *input)
Implementation of the composite pattern.
Converts between MetaObject and SpaitalObject scenes.
Representation of a group based on the spatial object classes.
Base class for most ITK classes.
Definition: itkObject.h:60
SpatialObjectPointer m_SpatialObject