1 #ifndef __CPM__ALGORITHMS__QUADEDGE__SQUAREDEDGELENGTHDECIMATIONFILTER__HXX__
2 #define __CPM__ALGORITHMS__QUADEDGE__SQUAREDEDGELENGTHDECIMATIONFILTER__HXX__
4 // -------------------------------------------------------------------------
5 template< typename I, typename O, typename C >
6 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
7 SquaredEdgeLengthDecimationFilter( )
13 // -------------------------------------------------------------------------
14 template< typename I, typename O, typename C >
15 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
16 ~SquaredEdgeLengthDecimationFilter( )
20 // -------------------------------------------------------------------------
21 template< typename I, typename O, typename C >
23 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
25 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
26 MeasureEdge(TOutPrimalEdge *iEdge)
28 typename O::PointIdentifier id_org = iEdge->GetOrigin();
29 typename O::PointIdentifier id_dest = iEdge->GetDestination();
31 typename O::PointType org = this->GetOutput( )->GetPoint(id_org);
32 typename O::PointType dest = this->GetOutput( )->GetPoint(id_dest);
34 return(static_cast< TScalar >( org.SquaredEuclideanDistanceTo(dest) ));
37 // -------------------------------------------------------------------------
38 template< typename I, typename O, typename C >
40 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
42 cpm::Algorithms::QuadEdge::SquaredEdgeLengthDecimationFilter< I, O, C >::
43 Relocate(TOutPrimalEdge *iEdge)
45 typename O::Pointer output = this->GetOutput();
46 typename O::PointIdentifier id_org = iEdge->GetOrigin();
47 typename O::PointIdentifier id_dest = iEdge->GetDestination();
49 typename O::PointType oPt;
51 oPt.SetToMidPoint( output->GetPoint(id_org),
52 output->GetPoint(id_dest) );
57 #endif // __CPM__ALGORITHMS__QUADEDGE__SQUAREDEDGELENGTHDECIMATIONFILTER__HXX__