ITK  4.6.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 ScalarType>
38 {
39 public:
40 
45 
50 
52  itkNewMacro(Self);
53 
56 
58  itkSetStringMacro(FileName);
59 
61  itkGetStringMacro(FileName);
62 
64  void SetAppendOff();
65 
66  void SetAppendOn();
67 
68  void SetAppendMode(bool mode);
69 
70  bool GetAppendMode();
71 
73  void SetInput(const Object *transform);
74 
75  const TransformType * GetInput();
76 
78  void AddTransform(const Object *transform);
79 
81  void Update();
82 
83 protected:
84 
85  TransformFileWriterTemplate(const Self &); //purposely not implemented
86  void operator=(const Self &); //purposely not implemented
87  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
88 
91 
92 private:
93  void PushBackTransformList(const Object *transObj);
94  void OpenStream(std::ofstream & out, bool binary);
95 
96  std::string m_FileName;
99 };
100 
103 
104 } // namespace itk
105 
106 #ifdef ITK_IO_FACTORY_REGISTER_MANAGER
107 #include "itkTransformIOFactoryRegisterManager.h"
108 #endif
109 
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkTransformFileWriter.hxx"
112 #endif
113 
114 #endif // __itkTransformFileWriter_h
Light weight base class for most itk classes.
const TransformType * GetInput()
TransformIOBaseTemplate< ScalarType >::TransformPointer TransformPointer
void SetInput(const Object *transform)
void PushBackTransformList(const Object *transObj)
TransformFileWriterTemplate Self
Abstract superclass defining the Transform IO interface.
void AddTransform(const Object *transform)
TransformIOBaseTemplate< ScalarType >::ConstTransformListType ConstTransformListType
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
TransformBaseTemplate< ScalarType > TransformType
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
TransformIOBaseTemplate< ScalarType >::ConstTransformPointer ConstTransformPointer
void OpenStream(std::ofstream &out, bool binary)