Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkQuadEdgeMeshSquaredEdgeLengthDecimation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuadEdgeMeshSquaredEdgeLengthDecimation.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-03 22:32:04 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkQuadEdgeMeshSquaredEdgeLengthDecimation_h
00019 #define __itkQuadEdgeMeshSquaredEdgeLengthDecimation_h
00020 
00021 #include "itkQuadEdgeMeshEdgeMergeDecimationFilter.h"
00022 
00023 namespace itk
00024 {
00029 template< class TInput, class TOutput, class TCriterion >
00030 class QuadEdgeMeshSquaredEdgeLengthDecimation :
00031   public QuadEdgeMeshEdgeMergeDecimationFilter< TInput, TOutput, TCriterion >
00032 {
00033 public:
00034   typedef QuadEdgeMeshSquaredEdgeLengthDecimation         Self;
00035   typedef SmartPointer< Self >                            Pointer;
00036   typedef SmartPointer< const Self >                      ConstPointer;
00037   typedef QuadEdgeMeshEdgeMergeDecimationFilter< 
00038     TInput, TOutput, TCriterion >                         Superclass;
00039 
00041   itkTypeMacro( QuadEdgeMeshSquaredEdgeLengthDecimation, QuadEdgeMeshEdgeMergeDecimationFilter );
00042 
00044   itkNewMacro( Self );
00045 
00046   typedef TInput                                            InputMeshType;
00047   typedef typename InputMeshType::Pointer                   InputMeshPointer;
00048 
00049   typedef TOutput                                           OutputMeshType;
00050   typedef typename OutputMeshType::Pointer                  OutputMeshPointer;
00051   typedef typename OutputMeshType::PointIdentifier          OutputPointIdentifier;
00052   typedef typename OutputMeshType::PointType                OutputPointType;
00053   typedef typename OutputMeshType::QEType                   OutputQEType;
00054   typedef typename OutputMeshType::EdgeCellType             OutputEdgeCellType;
00055   typedef typename OutputMeshType::CellsContainerIterator   OutputCellsContainerIterator;
00056 
00057   typedef TCriterion                                        CriterionType;
00058   typedef typename CriterionType::MeasureType               MeasureType;
00059 
00060   typedef typename Superclass::PriorityType                 PriorityType;
00061   typedef typename Superclass::PriorityQueueItemType        PriorityQueueItemType;
00062   typedef typename Superclass::PriorityQueueType            PriorityQueueType;
00063   typedef typename Superclass::PriorityQueuePointer         PriorityQueuePointer;
00064 
00065   typedef typename Superclass::QueueMapType                 QueueMapType;
00066   typedef typename Superclass::QueueMapIterator             QueueMapIterator;
00067 
00068   typedef typename Superclass::OperatorType                 OperatorType;
00069   typedef typename Superclass::OperatorPointer              OperatorPointer;
00070 
00071 protected:
00072 
00073   QuadEdgeMeshSquaredEdgeLengthDecimation();
00074   virtual ~QuadEdgeMeshSquaredEdgeLengthDecimation();
00075 
00081   inline MeasureType MeasureEdge( OutputQEType* iEdge )
00082     {
00083     OutputMeshPointer output = this->GetOutput();
00084 
00085     OutputPointIdentifier id_org = iEdge->GetOrigin();
00086     OutputPointIdentifier id_dest = iEdge->GetDestination();
00087 
00088     OutputPointType org = output->GetPoint( id_org );
00089     OutputPointType dest = output->GetPoint( id_dest );
00090 
00091     return static_cast< MeasureType >( org.SquaredEuclideanDistanceTo( dest ) );
00092     }
00093 
00099   OutputPointType Relocate( OutputQEType* iEdge );
00100 
00101 private:
00102   QuadEdgeMeshSquaredEdgeLengthDecimation( const Self& );
00103   void operator = ( const Self& );
00104 
00105 };
00106 
00107 }
00108 
00109 #include "itkQuadEdgeMeshSquaredEdgeLengthDecimation.txx"
00110 #endif
00111 

Generated at Sat Feb 28 13:21:41 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000