ITK  6.0.0
Insight Toolkit
itkVTKPolyDataWriter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
25namespace itk
26{
45template <typename TInputMesh>
46class ITK_TEMPLATE_EXPORT VTKPolyDataWriter : public Object
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(VTKPolyDataWriter);
50
56
58 itkNewMacro(Self);
59
61 itkOverrideGetNameOfClassMacro(VTKPolyDataWriter);
62
65 void
67
68 void
70
73 using InputMeshType = TInputMesh;
74 using PixelType = typename InputMeshType::PixelType;
76 using CellType = typename InputMeshType::CellType;
77 using PointIdentifier = typename InputMeshType::PointIdentifier;
78
81 using CellTraits = typename InputMeshType::CellTraits;
82
86
87 using PointsContainer = typename InputMeshType::PointsContainer;
88 using CellsContainer = typename InputMeshType::CellsContainer;
89
90 using PointIterator = typename PointsContainer::ConstIterator;
91 using CellIterator = typename CellsContainer::ConstIterator;
92
93 using PointIdIterator = typename CellType::PointIdIterator;
94
96 void
97 SetInput(const InputMeshType * input);
98
100 itkSetStringMacro(FileName);
101 itkGetStringMacro(FileName);
104protected:
106 ~VTKPolyDataWriter() override = default;
107
108 virtual void
110
111 std::string m_FileName{};
112
114
115 void
116 PrintSelf(std::ostream & os, Indent indent) const override;
117};
118} // namespace itk
119
120#ifndef ITK_MANUAL_INSTANTIATION
121# include "itkVTKPolyDataWriter.hxx"
122#endif
123
124#endif
An abstract interface for cells.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Base class for most ITK classes.
Definition: itkObject.h:62
Writes an itkMesh to a file in VTK file format.
void SetInput(const InputMeshType *input)
typename InputMeshType::CellTraits CellTraits
typename PointsContainer::ConstIterator PointIterator
typename InputMeshType::CellsContainer CellsContainer
void PrintSelf(std::ostream &os, Indent indent) const override
typename CellType::PointIdIterator PointIdIterator
typename CellsContainer::ConstIterator CellIterator
typename InputMeshType::CellType CellType
typename InputMeshType::PixelType PixelType
virtual void GenerateData()
~VTKPolyDataWriter() override=default
typename InputMeshType::PointIdentifier PointIdentifier
typename InputMeshType::ConstPointer InputMeshPointer
typename InputMeshType::PointsContainer PointsContainer
typename InputMeshType::PointType PointType
SmartPointer< const Self > ConstPointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....