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

itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-02-07 15:07:58 $
00007   Version:   $Revision: 1.4 $
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 #ifndef __itkQuadEdgeMeshEulerOperatorSplitEdgeFunction_h
00018 #define __itkQuadEdgeMeshEulerOperatorSplitEdgeFunction_h
00019 
00020 #include "itkQuadEdgeMeshFunctionBase.h"
00021 #include "itkQuadEdgeMeshEulerOperatorSplitVertexFunction.h"
00022 
00023 namespace itk
00024 {
00032 template < class TMesh, class TQEType >
00033 class ITK_EXPORT QuadEdgeMeshEulerOperatorSplitEdgeFunction :
00034    public QuadEdgeMeshFunctionBase< TMesh, TQEType* >
00035 {
00036 public:
00037 
00039   typedef QuadEdgeMeshEulerOperatorSplitEdgeFunction      Self;
00040   typedef QuadEdgeMeshFunctionBase< TMesh, TQEType* >     Superclass;
00041   typedef SmartPointer< Self >                            Pointer;
00042   typedef SmartPointer< const Self >                      ConstPointer;
00043 
00044   itkNewMacro( Self );
00046   itkTypeMacro( QuadEdgeMeshEulerOperatorSplitEdgeFunction, QuadEdgeMeshFunctionBase );
00047 
00049   typedef TQEType QEType;
00050 
00051   typedef typename Superclass::MeshType      MeshType;
00052   typedef typename Superclass::OutputType    OutputType;
00053   typedef typename MeshType::PointIdentifier PointIdentifier;
00054 
00055   typedef QuadEdgeMeshEulerOperatorSplitVertexFunction< MeshType, QEType> SplitVertex;
00056 
00058   virtual OutputType Evaluate( QEType* e )
00059     {
00060 
00061     if( !e )
00062       {
00063       itkDebugMacro( "Input is not an edge." );
00064       return( (QEType*) 0 );
00065       }
00066 
00067     if( !this->m_Mesh )
00068       {
00069       itkDebugMacro( "No mesh present." );
00070       return( (QEType*) 0 );
00071       }
00072 
00073     m_SplitVertex->SetInput( this->m_Mesh );
00074     return( m_SplitVertex->Evaluate( e->GetLprev( ), e->GetSym( ) ) );
00075     }
00076  
00077   const PointIdentifier GetNewPointID( )
00078     {
00079     return( m_SplitVertex->GetNewPointID( ) );
00080     }
00081 
00082 protected:
00083   QuadEdgeMeshEulerOperatorSplitEdgeFunction()
00084     {
00085     m_SplitVertex = SplitVertex::New( );
00086     }
00087   ~QuadEdgeMeshEulerOperatorSplitEdgeFunction(){ };
00088 
00089 private:
00090   QuadEdgeMeshEulerOperatorSplitEdgeFunction(const Self& ); //purposely not implemented
00091   void operator=(const Self& );        //purposely not implemented
00092   
00093   typename SplitVertex::Pointer m_SplitVertex; 
00094 
00095 };
00096 
00097 } // namespace itk
00098 
00099 #endif
00100 
00101 // eof - $RCSfile: itkQuadEdgeMeshEulerOperatorSplitEdgeFunction.h,v $
00102 

Generated at Mon Jul 12 2010 19:31:38 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000