ITK  4.8.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 >
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;
67  typedef typename InputMeshType::PointType PointType;
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();
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  VTKPolyDataWriter(const Self &); //purposely not implemented
109  void operator=(const Self &); //purposely not implemented
110 };
111 } // namespace itk
112 
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "itkVTKPolyDataWriter.hxx"
115 #endif
116 
117 #endif
InputMeshType::CellTraits CellTraits
CellsContainer::ConstIterator CellIterator
Light weight base class for most itk classes.
InputMeshType::PixelType PixelType
InputMeshType::ConstPointer InputMeshPointer
virtual ~VTKPolyDataWriter()
InputMeshType::PointIdentifier PointIdentifier
void SetInput(const InputMeshType *input)
SmartPointer< Self > Pointer
void operator=(const Self &)
virtual void PrintSelf(std::ostream &os, Indent indent) const override
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
virtual void GenerateData()
TriangleCell< CellInterfaceType > TriangleCellType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
InputMeshType::PointsContainer PointsContainer
Base class for most ITK classes.
Definition: itkObject.h:57
PointsContainer::ConstIterator PointIterator