NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkMaximumCurvatureImageFilter.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 itkMaximumCurvatureImageFilter_h
16 #define itkMaximumCurvatureImageFilter_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 MaximumCurvatureFunctor & ) const
44  {
45  return false;
46  }
47  bool operator==( const MaximumCurvatureFunctor & other ) const
48  {
49  return !(*this != other);
50  }
51  inline TOutput operator() ( const TInput1 & K, const TInput2 & H) const
52  {
53  const AccumulatorType maximumCurvature = H + sqrt(H*H - K);
54  return static_cast<TOutput>( maximumCurvature );
55  }
56 };
57 
58 }
59 template <class TInputImage1, class TInputImage2=TInputImage1, class TOutputImage=TInputImage1>
60 class ITK_EXPORT MaximumCurvatureImageFilter :
61  public
62 BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
63  Functor::MaximumCurvatureFunctor<
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(MaximumCurvatureImageFilter,
87  BinaryFunctorImageFilter);
88 
89 protected:
92 
93 private:
94  MaximumCurvatureImageFilter(const Self&); //purposely not implemented
95  void operator=(const Self&); //purposely not implemented
96 
97 };
98 
99 } // end namespace itk
100 
101 
102 #endif
NumericTraits< TInput1 >::AccumulateType AccumulatorType
Definition: itkMaximumCurvatureImageFilter.h:40
BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, Functor::MaximumCurvatureFunctor< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > > Superclass
Definition: itkMaximumCurvatureImageFilter.h:77
bool operator!=(const MaximumCurvatureFunctor &) const
Definition: itkMaximumCurvatureImageFilter.h:43
MaximumCurvatureFunctor()
Definition: itkMaximumCurvatureImageFilter.h:41
virtual ~MaximumCurvatureImageFilter()
Definition: itkMaximumCurvatureImageFilter.h:91
Definition: niftkITKAffineResampleImage.cxx:74
Definition: itkMaximumCurvatureImageFilter.h:37
SmartPointer< const Self > ConstPointer
Definition: itkMaximumCurvatureImageFilter.h:80
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
SmartPointer< Self > Pointer
Definition: itkMaximumCurvatureImageFilter.h:79
Calculates maximum curvature, assuming that the two inputs represent Gaussian Curvature on input 0...
Definition: itkMaximumCurvatureImageFilter.h:60
TOutput operator()(const TInput1 &K, const TInput2 &H) const
Definition: itkMaximumCurvatureImageFilter.h:51
MaximumCurvatureImageFilter Self
Definition: itkMaximumCurvatureImageFilter.h:72
~MaximumCurvatureFunctor()
Definition: itkMaximumCurvatureImageFilter.h:42
MaximumCurvatureImageFilter()
Definition: itkMaximumCurvatureImageFilter.h:90
bool operator==(const MaximumCurvatureFunctor &other) const
Definition: itkMaximumCurvatureImageFilter.h:47