ITK  4.13.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:
39  TInput, TOutput, TCriterion > Superclass;
40 
43 
45  itkNewMacro(Self);
46 
47  typedef TInput InputMeshType;
48  typedef typename InputMeshType::Pointer InputMeshPointer;
49 
50  typedef TOutput OutputMeshType;
51  typedef typename OutputMeshType::Pointer OutputMeshPointer;
52  typedef typename OutputMeshType::PointIdentifier OutputPointIdentifier;
54  typedef typename OutputMeshType::QEType OutputQEType;
55  typedef typename OutputMeshType::EdgeCellType OutputEdgeCellType;
56  typedef typename OutputMeshType::CellsContainerIterator OutputCellsContainerIterator;
57 
58  typedef TCriterion CriterionType;
59  typedef typename CriterionType::MeasureType MeasureType;
60 
61  typedef typename Superclass::PriorityType PriorityType;
62  typedef typename Superclass::PriorityQueueItemType PriorityQueueItemType;
63  typedef typename Superclass::PriorityQueueType PriorityQueueType;
64  typedef typename Superclass::PriorityQueuePointer PriorityQueuePointer;
65 
66  typedef typename Superclass::QueueMapType QueueMapType;
67  typedef typename Superclass::QueueMapIterator QueueMapIterator;
68 
69  typedef typename Superclass::OperatorType OperatorType;
70  typedef typename Superclass::OperatorPointer OperatorPointer;
71 
72 protected:
74  virtual ~SquaredEdgeLengthDecimationQuadEdgeMeshFilter() ITK_OVERRIDE;
75 
76  // keep the start of this documentation text on very first comment line,
77  // it prevents a Doxygen bug
83  MeasureType MeasureEdge(OutputQEType *iEdge) ITK_OVERRIDE
84  {
85  OutputPointIdentifier id_org = iEdge->GetOrigin();
86  OutputPointIdentifier id_dest = iEdge->GetDestination();
88 
89  OutputPointType org = this->m_OutputMesh->GetPoint(id_org);
90  OutputPointType dest = this->m_OutputMesh->GetPoint(id_dest);
91 
92  return static_cast< MeasureType >( org.SquaredEuclideanDistanceTo(dest) );
93  }
94 
95  // keep the start of this documentation text on very first comment line,
96  // it prevents a Doxygen bug
102  OutputPointType Relocate(OutputQEType *iEdge) ITK_OVERRIDE;
103 
104 private:
105  ITK_DISALLOW_COPY_AND_ASSIGN(SquaredEdgeLengthDecimationQuadEdgeMeshFilter);
106 
107 };
108 }
109 
110 #include "itkSquaredEdgeLengthDecimationQuadEdgeMeshFilter.hxx"
111 #endif
Light weight base class for most itk classes.
EdgeDecimationQuadEdgeMeshFilter< TInput, TOutput, TCriterion > Superclass