Orfeo Toolbox  3.16
itkComplexToPhaseImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkComplexToPhaseImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2009-04-01 14:36:10 $
7  Version: $Revision: 1.9 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkComplexToPhaseImageFilter_h
18 #define __itkComplexToPhaseImageFilter_h
19 
21 #include "vnl/vnl_math.h"
22 
23 namespace itk
24 {
25 
31 namespace Function {
32 
33 template< class TInput, class TOutput>
35 {
36 public:
39  bool operator!=( const ComplexToPhase & ) const
40  {
41  return false;
42  }
43  bool operator==( const ComplexToPhase & other ) const
44  {
45  return !(*this != other);
46  }
47  inline TOutput operator()( const TInput & A ) const
48  {
49  return (TOutput)( vcl_atan2(A.imag(), A.real() ) );
50  }
51 };
52 }
53 
54 template <class TInputImage, class TOutputImage>
56  public
57 UnaryFunctorImageFilter<TInputImage,TOutputImage,
58  Function::ComplexToPhase<
59  typename TInputImage::PixelType,
60  typename TOutputImage::PixelType> >
61 {
62 public:
66  TInputImage,TOutputImage,
67  Function::ComplexToPhase< typename TInputImage::PixelType,
68  typename TOutputImage::PixelType> >
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(ComplexToPhaseImageFilter,
79 
80  typedef typename TInputImage::PixelType InputPixelType;
81  typedef typename TOutputImage::PixelType OutputPixelType;
82  typedef typename NumericTraits< InputPixelType >::ValueType InputPixelValueType;
83 
84 #ifdef ITK_USE_CONCEPT_CHECKING
85 
86  itkConceptMacro(InputConvertibleToOutputCheck,
89 #endif
90 
91 
92 protected:
95 
96 private:
97  ComplexToPhaseImageFilter(const Self&); //purposely not implemented
98  void operator=(const Self&); //purposely not implemented
99 
100 };
101 
102 } // end namespace itk
103 
104 
105 #endif

Generated at Sat Feb 2 2013 23:32:37 for Orfeo Toolbox with doxygen 1.8.1.1