ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkQuadEdgeMeshScalarDataVTKPolyDataWriter.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 itkQuadEdgeMeshScalarDataVTKPolyDataWriter_h
19 #define itkQuadEdgeMeshScalarDataVTKPolyDataWriter_h
20 
21 #include "itkVTKPolyDataWriter.h"
22 #include <fstream>
23 
24 namespace itk
25 {
36 template< typename TMesh >
37 class ITK_TEMPLATE_EXPORT QuadEdgeMeshScalarDataVTKPolyDataWriter:public VTKPolyDataWriter< TMesh >
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_ASSIGN(QuadEdgeMeshScalarDataVTKPolyDataWriter);
41 
46 
49 
51  itkNewMacro(Self);
52 
53  using MeshType = TMesh;
54  using MeshPointer = typename MeshType::Pointer;
55  using CellType = typename MeshType::CellType;
56 
57  using PointsContainerPointer = typename MeshType::PointsContainerPointer;
58  using PointsContainerIterator = typename MeshType::PointsContainerIterator;
59 
60  using PointDataContainerPointer = typename MeshType::PointDataContainerPointer;
61  using PointDataContainerConstPointer = typename MeshType::PointDataContainerConstPointer;
62  using PointDataContainerIterator = typename MeshType::PointDataContainerIterator;
63 
64  using CellsContainer = typename MeshType::CellsContainer;
65  using CellsContainerPointer = typename CellsContainer::Pointer;
66  using CellsContainerConstPointer = typename CellsContainer::ConstPointer;
67  using CellsContainerIterator = typename CellsContainer::Iterator;
68  using CellsContainerConstIterator = typename CellsContainer::ConstIterator;
69 
70  using CellDataContainer = typename MeshType::CellDataContainer;
71  using CellDataContainerIterator = typename CellDataContainer::Iterator;
72  using CellDataContainerConstIterator = typename CellDataContainer::ConstIterator;
73  using CellDataContainerPointer = typename CellDataContainer::Pointer;
74  using CellDataContainerConstPointer = typename CellDataContainer::ConstPointer;
75 
77  itkSetStringMacro(CellDataName);
78  itkGetStringMacro(CellDataName);
80 
82  itkSetStringMacro(PointDataName);
83  itkGetStringMacro(PointDataName);
85 
86 protected:
88  ~QuadEdgeMeshScalarDataVTKPolyDataWriter() override = default;
89 
90  std::string m_CellDataName;
91  std::string m_PointDataName;
92 
93  void GenerateData() override;
94 
95  void WriteCellData();
96 
97  void WritePointData();
98 };
99 }
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx"
103 #endif
104 
105 #endif
Light weight base class for most itk classes.
typename MeshType::PointDataContainerConstPointer PointDataContainerConstPointer
typename CellDataContainer::ConstIterator CellDataContainerConstIterator
Writes an itkMesh to a file in VTK file format.
typename MeshType::PointsContainerIterator PointsContainerIterator
typename MeshType::PointDataContainerIterator PointDataContainerIterator
typename CellDataContainer::ConstPointer CellDataContainerConstPointer
typename MeshType::PointDataContainerPointer PointDataContainerPointer