ITK  4.4.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  >
39 {
40 public:
41 
45 
49 
54 
56  itkNewMacro(Self);
57 
59  typedef Object Superclass;
60  itkTypeMacro(SpatialObjectWriter, Object);
62 
64  void Update(void);
65 
67  itkSetStringMacro(FileName);
68 
70  itkGetStringMacro(FileName);
71 
73  void SetInput(SpatialObjectType *input){ m_SpatialObject = input; }
74 
75  void SetInput(SceneType *input){ m_Scene = input; }
76 
77  itkSetMacro(BinaryPoints, bool);
78  itkGetConstMacro(BinaryPoints, bool);
79 
80  void SetTransformPrecision(unsigned int precision);
81 
82  unsigned int GetTransformPrecision();
83 
85  itkSetMacro(WriteImagesInSeparateFile, bool);
86  itkGetConstMacro(WriteImagesInSeparateFile, bool);
88 
90  void RegisterMetaConverter(const char *metaTypeName,
91  const char *spatialObjectTypeName,
92  MetaConverterBaseType *converter);
93 
94 protected:
95  SpatialObjectWriter(const Self &); //purposely not implemented
96  void operator=(const Self &); //purposely not implemented
97 
98  std::string m_FileName;
101 
103  virtual ~SpatialObjectWriter();
104 
105 private:
106 
109 
112 };
113 } // namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkSpatialObjectWriter.hxx"
117 #endif
118 
119 #endif // __itkSpatialObjectWriter_h
120