ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkVTKPolyDataWriter.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 __itkVTKPolyDataWriter_h
19 #define __itkVTKPolyDataWriter_h
20 
21 #include "itkIntTypes.h"
22 #include "itkMesh.h"
23 #include "itkTriangleCell.h"
24 
25 namespace itk
26 {
35 template< class TInputMesh >
37 {
38 public:
41  typedef Object Superclass;
44 
46  itkNewMacro(Self);
47 
49  itkTypeMacro(VTKPolyDataWriter, Object);
50 
53  void Update(void);
54 
55  void Write(void);
56 
59  typedef TInputMesh InputMeshType;
60  typedef typename InputMeshType::PixelType PixelType;
61  typedef typename InputMeshType::PointType PointType;
62  typedef typename InputMeshType::CellType CellType;
63  typedef typename InputMeshType::PointIdentifier PointIdentifier;
64 
66  typedef typename InputMeshType::ConstPointer InputMeshPointer;
67  typedef typename InputMeshType::CellTraits CellTraits;
68 
72 
73  typedef typename InputMeshType::PointsContainer PointsContainer;
74  typedef typename InputMeshType::CellsContainer CellsContainer;
75 
76  typedef typename PointsContainer::ConstIterator PointIterator;
77  typedef typename CellsContainer::ConstIterator CellIterator;
78 
79  typedef typename CellType::PointIdIterator PointIdIterator;
80 
82  void SetInput(const InputMeshType *input);
83 
85  itkSetStringMacro(FileName);
86  itkGetStringMacro(FileName);
88 
89 protected:
91  virtual ~VTKPolyDataWriter();
92 
93  virtual void GenerateData();
94 
95  std::string m_FileName;
96 
98 
99  void PrintSelf(std::ostream & os, Indent indent) const;
100 
101 private:
102  VTKPolyDataWriter(const Self &); //purposely not implemented
103  void operator=(const Self &); //purposely not implemented
104 };
105 } // namespace itk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkVTKPolyDataWriter.hxx"
109 #endif
110 
111 #endif
112