ITK  5.0.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:
45  ITK_DISALLOW_COPY_AND_ASSIGN(VTKPolyDataWriter);
46 
49  using Superclass = Object;
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(VTKPolyDataWriter, Object);
58 
61  void Update();
62 
63  void Write();
64 
67  using InputMeshType = TInputMesh;
68  using PixelType = typename InputMeshType::PixelType;
70  using CellType = typename InputMeshType::CellType;
71  using PointIdentifier = typename InputMeshType::PointIdentifier;
72 
74  using InputMeshPointer = typename InputMeshType::ConstPointer;
75  using CellTraits = typename InputMeshType::CellTraits;
76 
80 
81  using PointsContainer = typename InputMeshType::PointsContainer;
82  using CellsContainer = typename InputMeshType::CellsContainer;
83 
84  using PointIterator = typename PointsContainer::ConstIterator;
85  using CellIterator = typename CellsContainer::ConstIterator;
86 
87  using PointIdIterator = typename CellType::PointIdIterator;
88 
90  void SetInput(const InputMeshType *input);
91 
93  itkSetStringMacro(FileName);
94  itkGetStringMacro(FileName);
96 
97 protected:
99  ~VTKPolyDataWriter() override = default;
100 
101  virtual void GenerateData();
102 
103  std::string m_FileName;
104 
106 
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 };
109 } // namespace itk
110 
111 #ifndef ITK_MANUAL_INSTANTIATION
112 #include "itkVTKPolyDataWriter.hxx"
113 #endif
114 
115 #endif
Light weight base class for most itk classes.
typename InputMeshType::CellType CellType
typename InputMeshType::ConstPointer InputMeshPointer
An abstract interface for cells.
typename InputMeshType::PointsContainer PointsContainer
typename InputMeshType::CellTraits CellTraits
typename CellsContainer::ConstIterator CellIterator
typename InputMeshType::PointIdentifier PointIdentifier
Writes an itkMesh to a file in VTK file format.
typename CellType::PointIdIterator PointIdIterator
typename InputMeshType::CellsContainer CellsContainer
typename InputMeshType::PointType PointType
typename PointsContainer::ConstIterator PointIterator
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
typename InputMeshType::PixelType PixelType