ITK  6.0.0
Insight Toolkit
itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.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 itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter_h
19#define itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter_h
20
22
23namespace itk
24{
30template <typename TInput, typename TOutput, typename TCriterion>
32 : public EdgeDecimationQuadEdgeMeshFilter<TInput, TOutput, TCriterion>
33{
34public:
35 ITK_DISALLOW_COPY_AND_MOVE(SquaredEdgeLengthDecimationQuadEdgeMeshFilter);
36
41
43 itkOverrideGetNameOfClassMacro(SquaredEdgeLengthDecimationQuadEdgeMeshFilter);
44
46 itkNewMacro(Self);
47
48 using InputMeshType = TInput;
50
51 using OutputMeshType = TOutput;
53 using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
55 using OutputQEType = typename OutputMeshType::QEType;
56 using OutputEdgeCellType = typename OutputMeshType::EdgeCellType;
57 using OutputCellsContainerIterator = typename OutputMeshType::CellsContainerIterator;
58
59 using CriterionType = TCriterion;
60 using MeasureType = typename CriterionType::MeasureType;
61
62 using typename Superclass::PriorityType;
63 using typename Superclass::PriorityQueueItemType;
64 using typename Superclass::PriorityQueueType;
65 using typename Superclass::PriorityQueuePointer;
66
67 using typename Superclass::QueueMapType;
68 using typename Superclass::QueueMapIterator;
69
70 using typename Superclass::OperatorType;
71 using typename Superclass::OperatorPointer;
72
73protected:
76
77 // keep the start of this documentation text on very first comment line,
78 // it prevents a Doxygen bug
85 MeasureEdge(OutputQEType * iEdge) override
86 {
87 OutputPointIdentifier id_org = iEdge->GetOrigin();
88 OutputPointIdentifier id_dest = iEdge->GetDestination();
91 OutputPointType org = this->m_OutputMesh->GetPoint(id_org);
92 OutputPointType dest = this->m_OutputMesh->GetPoint(id_dest);
93
94 return static_cast<MeasureType>(org.SquaredEuclideanDistanceTo(dest));
95 }
96
97 // keep the start of this documentation text on very first comment line,
98 // it prevents a Doxygen bug
104 OutputPointType
105 Relocate(OutputQEType * iEdge) override;
106};
107} // namespace itk
108
109#include "itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx"
110#endif
typename InputMeshType::Pointer InputMeshPointer
typename CriterionType::MeasureType MeasureType
typename OutputMeshType::Pointer OutputMeshPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename OutputMeshType::EdgeCellType OutputEdgeCellType
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Light weight base class for most itk classes.
OutputPointType Relocate(OutputQEType *iEdge) override
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....