ITK  5.4.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 
23 namespace itk
24 {
30 template <typename TInput, typename TOutput, typename TCriterion>
32  : public EdgeDecimationQuadEdgeMeshFilter<TInput, TOutput, TCriterion>
33 {
34 public:
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 
73 protected:
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
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::DecimationQuadEdgeMeshFilter::MeasureType
typename CriterionType::MeasureType MeasureType
Definition: itkDecimationQuadEdgeMeshFilter.h:53
itk::EdgeDecimationQuadEdgeMeshFilter::OutputCellsContainerIterator
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:67
itk::EdgeDecimationQuadEdgeMeshFilter::OutputQEType
typename OutputMeshType::QEType OutputQEType
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:62
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::EdgeDecimationQuadEdgeMeshFilter::OutputEdgeCellType
typename OutputMeshType::EdgeCellType OutputEdgeCellType
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:63
itk::SmartPointer< Self >
itk::DecimationQuadEdgeMeshFilter::CriterionType
TCriterion CriterionType
Definition: itkDecimationQuadEdgeMeshFilter.h:51
itk::SquaredEdgeLengthDecimationQuadEdgeMeshFilter
Definition: itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h:31
itk::EdgeDecimationQuadEdgeMeshFilter::OutputPointIdentifier
typename OutputMeshType::PointIdentifier OutputPointIdentifier
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:59
itk::DecimationQuadEdgeMeshFilter::OutputMeshPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkDecimationQuadEdgeMeshFilter.h:49
itk::DecimationQuadEdgeMeshFilter::InputMeshType
TInput InputMeshType
Definition: itkDecimationQuadEdgeMeshFilter.h:45
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::DecimationQuadEdgeMeshFilter::InputMeshPointer
typename InputMeshType::Pointer InputMeshPointer
Definition: itkDecimationQuadEdgeMeshFilter.h:46
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::EdgeDecimationQuadEdgeMeshFilter
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:40
itk::SquaredEdgeLengthDecimationQuadEdgeMeshFilter::MeasureEdge
MeasureType MeasureEdge(OutputQEType *iEdge) override
Definition: itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.h:85
itkEdgeDecimationQuadEdgeMeshFilter.h
itk::EdgeDecimationQuadEdgeMeshFilter::OutputPointType
typename OutputMeshType::PointType OutputPointType
Definition: itkEdgeDecimationQuadEdgeMeshFilter.h:60
itk::DecimationQuadEdgeMeshFilter::OutputMeshType
TOutput OutputMeshType
Definition: itkDecimationQuadEdgeMeshFilter.h:48