ITK  4.13.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 {
41 template< typename TInputMesh >
42 class ITK_TEMPLATE_EXPORT VTKPolyDataWriter:public Object
43 {
44 public:
47  typedef Object Superclass;
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(VTKPolyDataWriter, Object);
56 
59  void Update();
60 
61  void Write();
62 
65  typedef TInputMesh InputMeshType;
66  typedef typename InputMeshType::PixelType PixelType;
68  typedef typename InputMeshType::CellType CellType;
69  typedef typename InputMeshType::PointIdentifier PointIdentifier;
70 
72  typedef typename InputMeshType::ConstPointer InputMeshPointer;
73  typedef typename InputMeshType::CellTraits CellTraits;
74 
78 
79  typedef typename InputMeshType::PointsContainer PointsContainer;
80  typedef typename InputMeshType::CellsContainer CellsContainer;
81 
82  typedef typename PointsContainer::ConstIterator PointIterator;
83  typedef typename CellsContainer::ConstIterator CellIterator;
84 
85  typedef typename CellType::PointIdIterator PointIdIterator;
86 
88  void SetInput(const InputMeshType *input);
89 
91  itkSetStringMacro(FileName);
92  itkGetStringMacro(FileName);
94 
95 protected:
97  virtual ~VTKPolyDataWriter() ITK_OVERRIDE;
98 
99  virtual void GenerateData();
100 
101  std::string m_FileName;
102 
104 
105  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
106 
107 private:
108  ITK_DISALLOW_COPY_AND_ASSIGN(VTKPolyDataWriter);
109 };
110 } // namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkVTKPolyDataWriter.hxx"
114 #endif
115 
116 #endif
InputMeshType::CellTraits CellTraits
CellsContainer::ConstIterator CellIterator
Light weight base class for most itk classes.
InputMeshType::PixelType PixelType
InputMeshType::ConstPointer InputMeshPointer
InputMeshType::PointIdentifier PointIdentifier
SmartPointer< Self > Pointer
An abstract interface for cells.
InputMeshType::CellsContainer CellsContainer
InputMeshType::CellType CellType
CellType::PointIdIterator PointIdIterator
CellInterface< PixelType, CellTraits > CellInterfaceType
Writes an itkMesh to a file in VTK file format.
SmartPointer< const Self > ConstPointer
InputMeshType::PointType PointType
TriangleCell< CellInterfaceType > TriangleCellType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InputMeshType::PointsContainer PointsContainer
Base class for most ITK classes.
Definition: itkObject.h:59
PointsContainer::ConstIterator PointIterator