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 &
56operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderTransform value);
57extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream &
58operator<<(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 InputCoordinateType = typename InputMeshType::CoordinateType;
97#ifndef ITK_FUTURE_LEGACY_REMOVE
98 using InputCoordRepType ITK_FUTURE_DEPRECATED(
99 "ITK 6 discourages using `InputCoordRepType`. Please use `InputCoordinateType` instead!") = InputCoordinateType;
100#endif
102 using InputTraits = typename InputMeshType::Traits;
103 using InputPointIdentifier = typename InputMeshType::PointIdentifier;
104 using InputQEType = typename InputMeshType::QEType;
105 using InputIteratorGeom = typename InputQEType::IteratorGeom;
107 using InputEdgeListType = typename InputMeshType::EdgeListType;
109 using InputEdgeListIterator = typename InputEdgeListType::iterator;
110 using InputEdgeCellType = typename InputMeshType::EdgeCellType;
111 using InputPolygonCellType = typename InputMeshType::PolygonCellType;
112 using InputPointIdList = typename InputMeshType::PointIdList;
113 using InputPointsContainer = typename InputMeshType::PointsContainer;
114 using InputPointsContainerConstIterator = typename InputMeshType::PointsContainerConstIterator;
115 using InputCellsContainerConstIterator = typename InputMeshType::CellsContainerConstIterator;
116
117 using OutputMeshType = TOutputMesh;
119 using OutputCoordinateType = typename OutputMeshType::CoordinateType;
120#ifndef ITK_FUTURE_LEGACY_REMOVE
121 using OutputCoordRepType ITK_FUTURE_DEPRECATED(
122 "ITK 6 discourages using `OutputCoordRepType`. Please use `OutputCoordinateType` instead!") = OutputCoordinateType;
123#endif
125 using OutputTraits = typename OutputMeshType::Traits;
126 using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
127 using OutputQEType = typename OutputMeshType::QEType;
129 using OutputEdgeListType = typename OutputMeshType::EdgeListType;
130 using OutputEdgeCellType = typename OutputMeshType::EdgeCellType;
131 using OutputPolygonCellType = typename OutputMeshType::PolygonCellType;
132 using OutputPointIdList = typename OutputMeshType::PointIdList;
133 using OutputPointsContainer = typename OutputMeshType::PointsContainer;
134 using OutputPointsContainerConstIterator = typename OutputMeshType::PointsContainerConstIterator;
135 using OutputCellsContainerConstIterator = typename OutputMeshType::CellsContainerConstIterator;
136
137 itkNewMacro(Self);
138 itkOverrideGetNameOfClassMacro(BorderQuadEdgeMeshFilter);
139 static constexpr unsigned int PointDimension = InputTraits::PointDimension;
140
141 using InputVectorPointType = std::vector<InputPointType>;
142 using MapPointIdentifier = std::map<InputPointIdentifier, OutputPointIdentifier>;
143 using MapPointIdentifierIterator = typename MapPointIdentifier::iterator;
144
147
150#if !defined(ITK_LEGACY_REMOVE)
152 static constexpr BorderTransformEnum SQUARE_BORDER_TRANSFORM = BorderTransformEnum::SQUARE_BORDER_TRANSFORM;
153 static constexpr BorderTransformEnum DISK_BORDER_TRANSFORM = BorderTransformEnum::DISK_BORDER_TRANSFORM;
154
155 static constexpr BorderPickEnum LONGEST = BorderPickEnum::LONGEST;
156 static constexpr BorderPickEnum LARGEST = BorderPickEnum::LARGEST;
157#endif
158
159 itkSetEnumMacro(TransformType, BorderTransformEnum);
160 itkGetConstMacro(TransformType, BorderTransformEnum);
161
162 itkSetEnumMacro(BorderPick, BorderPickEnum);
163 itkGetConstMacro(BorderPick, BorderPickEnum);
164
165 itkSetMacro(Radius, InputCoordinateType);
166 itkGetConstMacro(Radius, InputCoordinateType);
167
168 void
170
173
176
177protected:
179
180 ~BorderQuadEdgeMeshFilter() override = default;
181
182 void
183 PrintSelf(std::ostream & os, Indent indent) const override;
184
185 BorderTransformEnum m_TransformType{};
186 BorderPickEnum m_BorderPick{};
187
189
191
192 MapPointIdentifier m_BoundaryPtMap{};
193
194 void
195 GenerateData() override;
196
197 void
199
202
205
206 void
208
211
214
215 void
217};
218} // end namespace itk
219
220#ifndef ITK_MANUAL_INSTANTIATION
221# include "itkBorderQuadEdgeMeshFilter.hxx"
222#endif
223
224#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
InputCoordinateType RadiusMaxSquare()
typename MapPointIdentifier::iterator MapPointIdentifierIterator
typename InputQEType::IteratorGeom InputIteratorGeom
typename InputMeshType::QEType InputQEType
typename OutputMeshType::EdgeListType OutputEdgeListType
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::PolygonCellType OutputPolygonCellType
InputPointType GetMeshBarycentre()
typename InputMeshType::PointsContainerConstIterator InputPointsContainerConstIterator
typename InputMeshType::EdgeListType InputEdgeListType
typename InputMeshType::EdgeCellType InputEdgeCellType
typename BoundaryRepresentativeEdgesType::Pointer BoundaryRepresentativeEdgesPointer
typename OutputMeshType::Pointer OutputMeshPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputMeshType::CoordinateType InputCoordinateType
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::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::CoordinateType OutputCoordinateType
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)