ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.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 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_ASSIGN(SquaredEdgeLengthDecimationQuadEdgeMeshFilter);
36 
41  TInput, TOutput, TCriterion >;
42 
45 
47  itkNewMacro(Self);
48 
49  using InputMeshType = TInput;
50  using InputMeshPointer = typename InputMeshType::Pointer;
51 
52  using OutputMeshType = TOutput;
53  using OutputMeshPointer = typename OutputMeshType::Pointer;
54  using OutputPointIdentifier = typename OutputMeshType::PointIdentifier;
56  using OutputQEType = typename OutputMeshType::QEType;
57  using OutputEdgeCellType = typename OutputMeshType::EdgeCellType;
58  using OutputCellsContainerIterator = typename OutputMeshType::CellsContainerIterator;
59 
60  using CriterionType = TCriterion;
61  using MeasureType = typename CriterionType::MeasureType;
62 
63  using PriorityType = typename Superclass::PriorityType;
64  using PriorityQueueItemType = typename Superclass::PriorityQueueItemType;
65  using PriorityQueueType = typename Superclass::PriorityQueueType;
66  using PriorityQueuePointer = typename Superclass::PriorityQueuePointer;
67 
68  using QueueMapType = typename Superclass::QueueMapType;
69  using QueueMapIterator = typename Superclass::QueueMapIterator;
70 
71  using OperatorType = typename Superclass::OperatorType;
72  using OperatorPointer = typename Superclass::OperatorPointer;
73 
74 protected:
77 
78  // keep the start of this documentation text on very first comment line,
79  // it prevents a Doxygen bug
86  {
87  OutputPointIdentifier id_org = iEdge->GetOrigin();
88  OutputPointIdentifier id_dest = iEdge->GetDestination();
90 
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 Relocate(OutputQEType *iEdge) override;
105 };
106 }
107 
108 #include "itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx"
109 #endif
typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator
Light weight base class for most itk classes.
std::map< OutputQEType *, PriorityQueueItemType * > QueueMapType
Collapse a given edge by joining its dest and its org.
typename PriorityQueueType::Pointer PriorityQueuePointer
typename CriterionType::PriorityQueueWrapperType PriorityQueueItemType
typename CriterionType::MeasureType MeasureType
typename CriterionType::PriorityType PriorityType
typename OutputMeshType::Pointer OutputMeshPointer
typename OutputMeshType::PointIdentifier OutputPointIdentifier
typename InputMeshType::Pointer InputMeshPointer
typename OutputMeshType::EdgeCellType OutputEdgeCellType