ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkDOMWriter.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 
19 #ifndef __itkDOMWriter_h
20 #define __itkDOMWriter_h
21 
22 #include "itkDOMNodeXMLWriter.h"
23 #include "itkObject.h"
24 #include "itkLogger.h"
25 
26 namespace itk
27 {
28 
65 template< class TInput >
66 class DOMWriter : public Object
67 {
68 public:
69 
71  typedef DOMWriter Self;
72 
73  itkTypeMacro(DOMWriter, Object);
74 
75  typedef TInput InputType;
76 
79 
80  typedef Logger LoggerType;
82 
84  itkSetStringMacro(FileName);
85 
87  itkGetStringMacro(FileName);
88 
90  virtual void SetInput( const InputType* input );
91 
93  const InputType* GetInput() const;
94 
99  itkGetConstMacro( Logger, LoggerType* );
100 
106  void Update( DOMNodeType* outputdom, const void* userdata = 0 );
107 
111  virtual void Update();
112 
113 protected:
114  DOMWriter();
115 
123  virtual void GenerateData( DOMNodeType* outputdom, const void* userdata ) const = 0;
124 
125 private:
126  DOMWriter(const Self &); //purposely not implemented
127  void operator=(const Self &); //purposely not implemented
128 
130  itkSetObjectMacro( IntermediateDOM, DOMNodeType );
131 
133  itkGetObjectMacro( IntermediateDOM, DOMNodeType );
134 
136  std::string m_FileName;
137 
140 
143 
146 
149 };
150 
151 } // namespace itk
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkDOMWriter.hxx"
155 #endif
156 
157 #endif // __itkDOMWriter_h
158