19 #ifndef __MuellerToPolarisationDegreeAndPowerImageFilter_h
20 #define __MuellerToPolarisationDegreeAndPowerImageFilter_h
23 #include "itkNumericTraits.h"
74 template<
class TInput,
class TOutput>
82 inline TOutput
operator()(
const TInput & Mueller )
const
91 double l_PowerMin(itk::NumericTraits<double>::max());
92 double l_PowerMax(itk::NumericTraits<double>::min());
93 double l_PolarisationDegreeMin(itk::NumericTraits<double>::max());
94 double l_PolarisationDegreeMax(itk::NumericTraits<double>::min());
100 muellerMatrix[0][0] = Mueller[0];
101 muellerMatrix[0][1] = Mueller[1];
102 muellerMatrix[0][2] = Mueller[2];
103 muellerMatrix[0][3] = Mueller[3];
104 muellerMatrix[1][0] = Mueller[4];
105 muellerMatrix[1][1] = Mueller[5];
106 muellerMatrix[1][2] = Mueller[6];
107 muellerMatrix[1][3] = Mueller[7];
108 muellerMatrix[2][0] = Mueller[8];
109 muellerMatrix[2][1] = Mueller[9];
110 muellerMatrix[2][2] = Mueller[10];
111 muellerMatrix[2][3] = Mueller[11];
112 muellerMatrix[3][0] = Mueller[12];
113 muellerMatrix[3][1] = Mueller[13];
114 muellerMatrix[3][2] = Mueller[14];
115 muellerMatrix[3][3] = Mueller[15];
125 Si[1] = cos(psi *
m_PI_90) * cos(tau * m_PI_90);
126 Si[2] = sin(psi * m_PI_90) * cos(tau * m_PI_90);
127 Si[3] = sin(tau * m_PI_90);
130 Sr = muellerMatrix * Si;
141 deg_pol = vcl_sqrt(Sr[1] * Sr[1] + Sr[2] * Sr[2] + Sr[3] * Sr[3]) / Sr[0];
153 if (deg_pol > l_PolarisationDegreeMax)
155 l_PolarisationDegreeMax = deg_pol;
159 l_PolarisationDegreeMin = deg_pol;
166 result[0] = l_PowerMin;
167 result[1] = l_PowerMax;
168 result[2] = l_PolarisationDegreeMin;
169 result[3] = l_PolarisationDegreeMax;
203 template <
class TInputImage,
class TOutputImage>
206 typename TInputImage::PixelType, typename TOutputImage::PixelType> >
212 typename TInputImage::PixelType,
typename TOutputImage::PixelType>
FunctionType;
230 void operator=(
const Self&);