ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkBorderQuadEdgeMeshFilter.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 itkBorderQuadEdgeMeshFilter_h
19 #define itkBorderQuadEdgeMeshFilter_h
20 
21 #include "itkAutoPointer.h"
22 #include "itkQuadEdgeMesh.h"
25 
26 namespace itk
27 {
50 template< typename TInputMesh, typename TOutputMesh=TInputMesh >
52  public QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
53 {
54 public:
55 
58  typedef QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh,
59  TOutputMesh >
63 
64  typedef TInputMesh InputMeshType;
65  typedef typename InputMeshType::ConstPointer InputMeshConstPointer;
66  typedef typename InputMeshType::CoordRepType InputCoordRepType;
67  typedef typename InputMeshType::PointType InputPointType;
68  typedef typename InputMeshType::Traits InputTraits;
69  typedef typename InputMeshType::PointIdentifier InputPointIdentifier;
70  typedef typename InputMeshType::QEType InputQEType;
71  typedef typename InputQEType::IteratorGeom InputIteratorGeom;
72  typedef typename InputMeshType::VectorType InputVectorType;
73  typedef typename InputMeshType::EdgeListType InputEdgeListType;
75  typedef typename InputEdgeListType::iterator InputEdgeListIterator;
76  typedef typename InputMeshType::EdgeCellType InputEdgeCellType;
77  typedef typename InputMeshType::PolygonCellType InputPolygonCellType;
78  typedef typename InputMeshType::PointIdList InputPointIdList;
79  typedef typename InputMeshType::PointsContainer InputPointsContainer;
80  typedef typename InputMeshType::PointsContainerConstIterator
82  typedef typename InputMeshType::CellsContainerConstIterator
84 
85  typedef TOutputMesh OutputMeshType;
86  typedef typename OutputMeshType::Pointer OutputMeshPointer;
87  typedef typename OutputMeshType::CoordRepType OutputCoordRepType;
88  typedef typename OutputMeshType::PointType OutputPointType;
89  typedef typename OutputMeshType::Traits OutputTraits;
90  typedef typename OutputMeshType::PointIdentifier OutputPointIdentifier;
91  typedef typename OutputMeshType::QEType OutputQEType;
92  typedef typename OutputMeshType::VectorType OutputVectorType;
93  typedef typename OutputMeshType::EdgeListType OutputEdgeListType;
94  typedef typename OutputMeshType::EdgeCellType OutputEdgeCellType;
95  typedef typename OutputMeshType::PolygonCellType OutputPolygonCellType;
96  typedef typename OutputMeshType::PointIdList OutputPointIdList;
97  typedef typename OutputMeshType::PointsContainer OutputPointsContainer;
98  typedef typename OutputMeshType::PointsContainerConstIterator
100  typedef typename OutputMeshType::CellsContainerConstIterator
102 
103  itkNewMacro(Self);
105  itkStaticConstMacro(PointDimension, unsigned int,
106  InputTraits::PointDimension);
107 
108  typedef std::vector< InputPointType > InputVectorPointType;
109  typedef std::map< InputPointIdentifier, OutputPointIdentifier > MapPointIdentifier;
110  typedef typename MapPointIdentifier::iterator MapPointIdentifierIterator;
111 
114 
118  };
119 
121  LONGEST = 0,
123  };
124 
125  itkSetMacro(TransformType, BorderTransformType);
126  itkGetConstMacro(TransformType, BorderTransformType);
127 
128  itkSetMacro( BorderPick, BorderPickType );
129  itkGetConstMacro( BorderPick, BorderPickType );
130 
131  itkSetMacro(Radius, InputCoordRepType);
132  itkGetConstMacro(Radius, InputCoordRepType);
133 
134  void ComputeTransform();
135 
137 
139 
140 protected:
142 
144 
145  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
146 
149 
151 
153 
155 
156  void GenerateData() ITK_OVERRIDE;
157 
158  void ComputeBoundary();
159 
161 
163 
164  void DiskTransform();
165 
167 
169 
171 
172 private:
173  BorderQuadEdgeMeshFilter(const Self &) ITK_DELETE_FUNCTION;
174  void operator=(const Self &); //purposely ont implemented
175 };
176 } // end namespace itk
177 
178 #ifndef ITK_MANUAL_INSTANTIATION
179 #include "itkBorderQuadEdgeMeshFilter.hxx"
180 #endif
181 
182 #endif
MapPointIdentifier::iterator MapPointIdentifierIterator
OutputMeshType::EdgeCellType OutputEdgeCellType
InputMeshType::EdgeCellType InputEdgeCellType
OutputMeshType::CellsContainerConstIterator OutputCellsContainerConstIterator
MapPointIdentifier GetBoundaryPtMap()
Light weight base class for most itk classes.
InputMeshType::ConstPointer InputMeshConstPointer
OutputMeshType::EdgeListType OutputEdgeListType
std::vector< InputPointType > InputVectorPointType
InputQEType::IteratorGeom InputIteratorGeom
InputCoordRepType RadiusMaxSquare()
OutputMeshType::PointsContainer OutputPointsContainer
InputMeshType::PointIdList InputPointIdList
InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
BoundaryRepresentativeEdgesType::Pointer BoundaryRepresentativeEdgesPointer
InputVectorPointType GetBorder()
AutoPointer< InputEdgeListType > InputEdgeListPointerType
InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
InputQEType * ComputeLongestBorder()
void PrintSelf(std::ostream &os, Indent indent) const override
OutputMeshType::PointsContainerConstIterator OutputPointsContainerConstIterator
InputMeshType::CoordRepType InputCoordRepType
Build a list of references to edges (as GeometricalQuadEdge::RawPointer) each one representing a diff...
QuadEdgeMeshBoundaryEdgesMeshFunction< InputMeshType > BoundaryRepresentativeEdgesType
static const unsigned int PointDimension
InputEdgeListType::iterator InputEdgeListIterator
OutputMeshType::CoordRepType OutputCoordRepType
std::map< InputPointIdentifier, OutputPointIdentifier > MapPointIdentifier
InputPointType GetMeshBarycentre()
OutputMeshType::PointType OutputPointType
InputMeshType::PolygonCellType InputPolygonCellType
OutputMeshType::VectorType OutputVectorType
InputMeshType::VectorType InputVectorType
QuadEdgeMeshToQuadEdgeMeshFilter< TInputMesh, TOutputMesh > Superclass
Implements an Automatic Pointer to an object.
Transform one border of a QuadEdgeMesh into either a circle (conformal) or a square (arclength-wise)...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
OutputMeshType::PointIdList OutputPointIdList
OutputMeshType::PointIdentifier OutputPointIdentifier
InputQEType * ComputeLargestBorder()
InputMeshType::PointIdentifier InputPointIdentifier
InputMeshType::EdgeListType InputEdgeListType
OutputMeshType::PolygonCellType OutputPolygonCellType
InputMeshType::PointsContainer InputPointsContainer
SmartPointer< const Self > ConstPointer