ITK  6.0.0
Insight Toolkit
itkBorderQuadEdgeMeshFilter.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 itkBorderQuadEdgeMeshFilter_h
19#define itkBorderQuadEdgeMeshFilter_h
20
21#include "itkAutoPointer.h"
22#include "itkQuadEdgeMesh.h"
25#include "ITKQuadEdgeMeshFilteringExport.h"
26
27namespace itk
28{
34{
35public:
39 enum class BorderTransform : uint8_t
40 {
41 SQUARE_BORDER_TRANSFORM = 0,
42 DISK_BORDER_TRANSFORM
43 };
44
48 enum class BorderPick : uint8_t
49 {
50 LONGEST = 0,
51 LARGEST
52 };
53};
54// Define how to print enumeration
55extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream &
56 operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderTransform value);
57extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream &
58 operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderPick value);
81template <typename TInputMesh, typename TOutputMesh = TInputMesh>
82class ITK_TEMPLATE_EXPORT BorderQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMeshFilter<TInputMesh, TOutputMesh>
83{
84public:
85 ITK_DISALLOW_COPY_AND_MOVE(BorderQuadEdgeMeshFilter);
93
94 using InputMeshType = TInputMesh;
96 using InputCoordRepType = typename InputMeshType::CoordRepType;
98 using InputTraits = typename InputMeshType::Traits;
99 using InputPointIdentifier = typename InputMeshType::PointIdentifier;
100 using InputQEType = typename InputMeshType::QEType;
101 using InputIteratorGeom = typename InputQEType::IteratorGeom;
103 using InputEdgeListType = typename InputMeshType::EdgeListType;
105 using InputEdgeListIterator = typename InputEdgeListType::iterator;
106 using InputEdgeCellType = typename InputMeshType::EdgeCellType;
107 using InputPolygonCellType = typename InputMeshType::PolygonCellType;
108 using InputPointIdList = typename InputMeshType::PointIdList;
109 using InputPointsContainer = typename InputMeshType::PointsContainer;
110 using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
111 using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
112
113 using OutputMeshType = TOutputMesh;
115 using OutputCoordRepType = typename OutputMeshType::CoordRepType;
117 using OutputTraits = typename OutputMeshType::Traits;
118 using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
119 using OutputQEType = typename OutputMeshType::QEType;
121 using OutputEdgeListType = typename OutputMeshType::EdgeListType;
122 using OutputEdgeCellType = typename OutputMeshType::EdgeCellType;
123 using OutputPolygonCellType = typename OutputMeshType::PolygonCellType;
124 using OutputPointIdList = typename OutputMeshType::PointIdList;
125 using OutputPointsContainer = typename OutputMeshType::PointsContainer;
126 using OutputPointsContainerConstIterator = typename OutputMeshType::PointsContainerConstIterator;
127 using OutputCellsContainerConstIterator = typename OutputMeshType::CellsContainerConstIterator;
128
129 itkNewMacro(Self);
130 itkOverrideGetNameOfClassMacro(BorderQuadEdgeMeshFilter);
131 static constexpr unsigned int PointDimension = InputTraits::PointDimension;
132
133 using InputVectorPointType = std::vector<InputPointType>;
134 using MapPointIdentifier = std::map<InputPointIdentifier, OutputPointIdentifier>;
135 using MapPointIdentifierIterator = typename MapPointIdentifier::iterator;
136
139
142#if !defined(ITK_LEGACY_REMOVE)
144 static constexpr BorderTransformEnum SQUARE_BORDER_TRANSFORM = BorderTransformEnum::SQUARE_BORDER_TRANSFORM;
145 static constexpr BorderTransformEnum DISK_BORDER_TRANSFORM = BorderTransformEnum::DISK_BORDER_TRANSFORM;
146
147 static constexpr BorderPickEnum LONGEST = BorderPickEnum::LONGEST;
148 static constexpr BorderPickEnum LARGEST = BorderPickEnum::LARGEST;
149#endif
150
151 itkSetEnumMacro(TransformType, BorderTransformEnum);
152 itkGetConstMacro(TransformType, BorderTransformEnum);
153
154 itkSetEnumMacro(BorderPick, BorderPickEnum);
155 itkGetConstMacro(BorderPick, BorderPickEnum);
156
157 itkSetMacro(Radius, InputCoordRepType);
158 itkGetConstMacro(Radius, InputCoordRepType);
159
160 void
162
165
168
169protected:
171
172 ~BorderQuadEdgeMeshFilter() override = default;
173
174 void
175 PrintSelf(std::ostream & os, Indent indent) const override;
176
177 BorderTransformEnum m_TransformType{};
178 BorderPickEnum m_BorderPick{};
179
181
183
184 MapPointIdentifier m_BoundaryPtMap{};
185
186 void
187 GenerateData() override;
188
189 void
191
194
197
198 void
200
203
206
207 void
209};
210} // end namespace itk
211
212#ifndef ITK_MANUAL_INSTANTIATION
213# include "itkBorderQuadEdgeMeshFilter.hxx"
214#endif
215
216#endif
Implements an Automatic Pointer to an object.
Contains all enum classes used by.
Transform one border of a QuadEdgeMesh into either a circle (conformal) or a square (arclength-wise).
InputVectorPointType GetBorder()
typename OutputMeshType::QEType OutputQEType
~BorderQuadEdgeMeshFilter() override=default
typename OutputMeshType::CellsContainerConstIterator OutputCellsContainerConstIterator
std::map< InputPointIdentifier, OutputPointIdentifier > MapPointIdentifier
typename MapPointIdentifier::iterator MapPointIdentifierIterator
typename InputQEType::IteratorGeom InputIteratorGeom
typename InputMeshType::QEType InputQEType
typename OutputMeshType::EdgeListType OutputEdgeListType
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::PolygonCellType OutputPolygonCellType
typename InputMeshType::CoordRepType InputCoordRepType
InputPointType GetMeshBarycentre()
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
typename InputMeshType::EdgeListType InputEdgeListType
typename InputMeshType::EdgeCellType InputEdgeCellType
typename BoundaryRepresentativeEdgesType::Pointer BoundaryRepresentativeEdgesPointer
typename OutputMeshType::Pointer OutputMeshPointer
InputCoordRepType RadiusMaxSquare()
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputMeshType::EdgeCellType OutputEdgeCellType
MapPointIdentifier GetBoundaryPtMap()
typename InputMeshType::VectorType InputVectorType
typename InputMeshType::PointIdentifier InputPointIdentifier
typename InputMeshType::PointIdList InputPointIdList
std::vector< InputPointType > InputVectorPointType
typename OutputMeshType::PointsContainerConstIterator OutputPointsContainerConstIterator
typename OutputMeshType::PointsContainer OutputPointsContainer
InputQEType * ComputeLargestBorder()
typename InputMeshType::Traits InputTraits
typename OutputMeshType::CoordRepType OutputCoordRepType
typename OutputMeshType::VectorType OutputVectorType
typename OutputMeshType::Traits OutputTraits
InputQEType * ComputeLongestBorder()
typename InputEdgeListType::iterator InputEdgeListIterator
typename InputMeshType::PointType InputPointType
typename InputMeshType::CellsContainerConstIterator InputCellsContainerConstIterator
typename InputMeshType::PolygonCellType InputPolygonCellType
typename InputMeshType::PointsContainer InputPointsContainer
typename OutputMeshType::PointType OutputPointType
typename InputMeshType::ConstPointer InputMeshConstPointer
typename OutputMeshType::PointIdList OutputPointIdList
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Build a list of references to edges (as GeometricalQuadEdge::RawPointer) each one representing a diff...
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)