ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkTransformFileWriter.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 itkTransformFileWriter_h
19 #define itkTransformFileWriter_h
20 
21 #include "itkTransformIOBase.h"
22 #include <iostream>
23 #include <fstream>
24 
25 namespace itk
26 {
36 template<typename TParametersValueType>
38 {
39 public:
40 
46 
47  typedef TParametersValueType ParametersValueType;
54 
56  itkNewMacro(Self);
57 
60 
62  itkSetStringMacro(FileName);
63 
65  itkGetStringMacro(FileName);
66 
68  void SetAppendOff();
69 
70  void SetAppendOn();
71 
72  void SetAppendMode(bool mode);
73 
74  bool GetAppendMode();
75 
77  void SetInput(const Object *transform);
78 
79  const TransformType * GetInput();
80 
82  void AddTransform(const Object *transform);
83 
85  void Update();
86 
88  itkSetObjectMacro( TransformIO, TransformIOType );
89  itkGetConstObjectMacro( TransformIO, TransformIOType );
91 
92 protected:
95 
96  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
97 
98 private:
99  void PushBackTransformList(const Object *transObj);
100  void OpenStream(std::ofstream & out, bool binary);
101 
102  std::string m_FileName;
106 
107  TransformFileWriterTemplate(const Self &); //purposely not implemented
108  void operator=(const Self &); //purposely not implemented
109 };
110 
113 
114 } // namespace itk
115 
116 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
117 #include "itkTransformIOFactoryRegisterManager.h"
118 #endif
119 
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkTransformFileWriter.hxx"
122 #endif
123 
124 #endif // itkTransformFileWriter_h
Light weight base class for most itk classes.
void SetInput(const Object *transform)
SmartPointer< const Self > ConstPointer
TransformIOType::Pointer m_TransformIO
TransformIOType::TransformPointer TransformPointer
TransformIOType::ConstTransformListType ConstTransformListType
void AddTransform(const Object *transform)
TransformIOBaseTemplate< ParametersValueType > TransformIOType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
void OpenStream(std::ofstream &out, bool binary)
TransformFileWriterTemplate Self
std::list< ConstTransformPointer > ConstTransformListType
TransformBaseTemplate< ParametersValueType > TransformType
TransformIOType::ConstTransformPointer ConstTransformPointer
const TransformType * GetInput()
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:57
itk::TransformFileWriterTemplate< double > TransformFileWriter
void PushBackTransformList(const Object *transObj)