NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMinimumCurvatureImageFilter.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkMinimumCurvatureImageFilter_h
16 #define itkMinimumCurvatureImageFilter_h
17 
18 #include <itkBinaryFunctorImageFilter.h>
19 #include <itkNumericTraits.h>
20 
21 namespace itk
22 {
23 
34 namespace Functor {
35 
36 template< class TInput1, class TInput2=TInput1, class TOutput=TInput1>
38 {
39 public:
40  typedef typename NumericTraits< TInput1 >::AccumulateType AccumulatorType;
43  bool operator!=( const MinimumCurvatureFunctor & ) const
44  {
45  return false;
46  }
47  bool operator==( const MinimumCurvatureFunctor & other ) const
48  {
49  return !(*this != other);
50  }
51  inline TOutput operator() ( const TInput1 & K, const TInput2 & H) const
52  {
53  const AccumulatorType minimumCurvature = H - sqrt(H*H - K);
54  return static_cast<TOutput>( minimumCurvature );
55  }
56 };
57 
58 }
59 template <class TInputImage1, class TInputImage2=TInputImage1, class TOutputImage=TInputImage1>
60 class ITK_EXPORT MinimumCurvatureImageFilter :
61  public
62 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
63  Functor::MinimumCurvatureFunctor<
64  typename TInputImage1::PixelType,
65  typename TInputImage2::PixelType,
66  typename TOutputImage::PixelType> >
67 
68 
69 {
70 public:
73  typedef BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
75  typename TInputImage1::PixelType,
76  typename TInputImage2::PixelType,
78 
79  typedef SmartPointer<Self> Pointer;
80  typedef SmartPointer<const Self> ConstPointer;
81 
83  itkNewMacro(Self);
84 
86  itkTypeMacro(MinimumCurvatureImageFilter,
87  BinaryFunctorImageFilter);
88 
89 protected:
92 
93 private:
94  MinimumCurvatureImageFilter(const Self&); //purposely not implemented
95  void operator=(const Self&); //purposely not implemented
96 
97 };
98 
99 } // end namespace itk
100 
101 
102 #endif
virtual ~MinimumCurvatureImageFilter()
Definition: itkMinimumCurvatureImageFilter.h:91
bool operator!=(const MinimumCurvatureFunctor &) const
Definition: itkMinimumCurvatureImageFilter.h:43
Definition: itkMinimumCurvatureImageFilter.h:37
Definition: niftkITKAffineResampleImage.cxx:74
bool operator==(const MinimumCurvatureFunctor &other) const
Definition: itkMinimumCurvatureImageFilter.h:47
MinimumCurvatureImageFilter()
Definition: itkMinimumCurvatureImageFilter.h:90
MinimumCurvatureImageFilter Self
Definition: itkMinimumCurvatureImageFilter.h:72
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
MinimumCurvatureFunctor()
Definition: itkMinimumCurvatureImageFilter.h:41
~MinimumCurvatureFunctor()
Definition: itkMinimumCurvatureImageFilter.h:42
Calculates minimum curvature, assuming that the two inputs represent Gaussian Curvature on input 0...
Definition: itkMinimumCurvatureImageFilter.h:60
NumericTraits< TInput1 >::AccumulateType AccumulatorType
Definition: itkMinimumCurvatureImageFilter.h:40
BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, Functor::MinimumCurvatureFunctor< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > > Superclass
Definition: itkMinimumCurvatureImageFilter.h:77
SmartPointer< const Self > ConstPointer
Definition: itkMinimumCurvatureImageFilter.h:80
TOutput operator()(const TInput1 &K, const TInput2 &H) const
Definition: itkMinimumCurvatureImageFilter.h:51
SmartPointer< Self > Pointer
Definition: itkMinimumCurvatureImageFilter.h:79