ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkDiscreteMinimumCurvatureQuadEdgeMeshFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkDiscreteMinimumCurvatureQuadEdgeMeshFilter_h
00019 #define __itkDiscreteMinimumCurvatureQuadEdgeMeshFilter_h
00020 
00021 #include "itkDiscretePrincipalCurvaturesQuadEdgeMeshFilter.h"
00022 
00023 namespace itk
00024 {
00032 template< class TInputMesh, class TOutputMesh=TInputMesh >
00033 class ITK_EXPORT DiscreteMinimumCurvatureQuadEdgeMeshFilter:
00034   public DiscretePrincipalCurvaturesQuadEdgeMeshFilter< TInputMesh, TOutputMesh >
00035 {
00036 public:
00037   typedef DiscreteMinimumCurvatureQuadEdgeMeshFilter  Self;
00038   typedef SmartPointer< Self >                        Pointer;
00039   typedef SmartPointer< const Self >                  ConstPointer;
00040   typedef DiscretePrincipalCurvaturesQuadEdgeMeshFilter<
00041     TInputMesh, TOutputMesh >                         Superclass;
00042 
00043   typedef typename Superclass::InputMeshType    InputMeshType;
00044   typedef typename Superclass::InputMeshPointer InputMeshPointer;
00045 
00046   typedef typename Superclass::OutputMeshType                OutputMeshType;
00047   typedef typename Superclass::OutputMeshPointer             OutputMeshPointer;
00048   typedef typename Superclass::OutputPointsContainerPointer  OutputPointsContainerPointer;
00049   typedef typename Superclass::OutputPointsContainerIterator OutputPointsContainerIterator;
00050   typedef typename Superclass::OutputPointType               OutputPointType;
00051   typedef typename Superclass::OutputVectorType              OutputVectorType;
00052   typedef typename Superclass::OutputCoordType               OutputCoordType;
00053   typedef typename Superclass::OutputPointIdentifier         OutputPointIdentifier;
00054   typedef typename Superclass::OutputCellIdentifier          OutputCellIdentifier;
00055   typedef typename Superclass::OutputQEType                  OutputQEType;
00056   typedef typename Superclass::OutputMeshTraits              OutputMeshTraits;
00057   typedef typename Superclass::OutputCurvatureType           OutputCurvatureType;
00058 
00059   typedef typename Superclass::TriangleType TriangleType;
00060 
00062   itkTypeMacro(DiscreteMinimumCurvatureQuadEdgeMeshFilter, DiscretePrincipalCurvaturesQuadEdgeMeshFilter);
00063 
00065   itkNewMacro(Self);
00066 
00067 #ifdef ITK_USE_CONCEPT_CHECKING
00068 
00069   itkConceptMacro( OutputIsFloatingPointCheck,
00070                    ( Concept::IsFloatingPoint< OutputCurvatureType > ) );
00071 
00073 #endif
00074 
00075 protected:
00076   DiscreteMinimumCurvatureQuadEdgeMeshFilter() {}
00077   ~DiscreteMinimumCurvatureQuadEdgeMeshFilter() {}
00078 
00079   virtual OutputCurvatureType EstimateCurvature(const OutputPointType & iP)
00080   {
00081     this->ComputeMeanAndGaussianCurvatures(iP);
00082     return this->m_Mean - vcl_sqrt( this->ComputeDelta() );
00083   }
00084 
00085 private:
00086   DiscreteMinimumCurvatureQuadEdgeMeshFilter(const Self &); // purposely not
00087                                                            // implemented
00088   void operator=(const Self &);                            // purposely not
00089                                                            // implemented
00090 };
00091 }
00092 
00093 #endif
00094