ITK  4.6.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 >
38 {
39 public:
44 
47 
49  itkNewMacro(Self);
50 
51  typedef TMesh MeshType;
52  typedef typename MeshType::Pointer MeshPointer;
53  typedef typename MeshType::CellType CellType;
54 
55  typedef typename MeshType::PointsContainerPointer PointsContainerPointer;
56  typedef typename MeshType::PointsContainerIterator PointsContainerIterator;
57 
58  typedef typename MeshType::PointDataContainerPointer PointDataContainerPointer;
59  typedef typename MeshType::PointDataContainerConstPointer PointDataContainerConstPointer;
60  typedef typename MeshType::PointDataContainerIterator PointDataContainerIterator;
61 
62  typedef typename MeshType::CellsContainer CellsContainer;
63  typedef typename CellsContainer::Pointer CellsContainerPointer;
64  typedef typename CellsContainer::ConstPointer CellsContainerConstPointer;
65  typedef typename CellsContainer::Iterator CellsContainerIterator;
66  typedef typename CellsContainer::ConstIterator CellsContainerConstIterator;
67 
68  typedef typename MeshType::CellDataContainer CellDataContainer;
69  typedef typename CellDataContainer::Iterator CellDataContainerIterator;
70  typedef typename CellDataContainer::ConstIterator CellDataContainerConstIterator;
71  typedef typename CellDataContainer::Pointer CellDataContainerPointer;
72  typedef typename CellDataContainer::ConstPointer CellDataContainerConstPointer;
73 
75  itkSetStringMacro(CellDataName);
76  itkGetStringMacro(CellDataName);
78 
80  itkSetStringMacro(PointDataName);
81  itkGetStringMacro(PointDataName);
83 
84 protected:
87 
88  std::string m_CellDataName;
89  std::string m_PointDataName;
90 
91  void GenerateData();
92 
93  void WriteCellData();
94 
95  void WritePointData();
96 
97 private:
99  void operator=(const Self &);
100 };
101 }
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
104 #include "itkQuadEdgeMeshScalarDataVTKPolyDataWriter.hxx"
105 #endif
106 
107 #endif
Light weight base class for most itk classes.
Writes an itkMesh to a file in VTK file format.
MeshType::PointDataContainerConstPointer PointDataContainerConstPointer