Commit a27ae592 authored by Victor Poughon's avatar Victor Poughon

BUG: fix no contructor in class with private member variables

parent 56025ed9
...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double> ...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double>
class BlackmanWindowFunction class BlackmanWindowFunction
{ {
public: public:
BlackmanWindowFunction(): m_Radius(1), m_Factor1(CONST_PI), m_Factor2(2.0 * CONST_PI) {} // default radius is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -95,8 +96,7 @@ template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCond ...@@ -95,8 +96,7 @@ template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCond
double, class TInputInterpolator = double, class TOutputInterpolator = double> double, class TInputInterpolator = double, class TOutputInterpolator = double>
class ITK_EXPORT WindowedSincInterpolateImageBlackmanFunction : class ITK_EXPORT WindowedSincInterpolateImageBlackmanFunction :
public WindowedSincInterpolateImageFunctionBase<TInputImage, public WindowedSincInterpolateImageFunctionBase<TInputImage,
typename Function::BlackmanWindowFunction<TInputInterpolator, typename Function::BlackmanWindowFunction<TInputInterpolator, TOutputInterpolator>,
TOutputInterpolator>,
TBoundaryCondition, TBoundaryCondition,
TCoordRep> TCoordRep>
{ {
......
...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double> ...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double>
class CosineWindowFunction class CosineWindowFunction
{ {
public: public:
CosineWindowFunction(): m_Radius(1), m_Factor(CONST_PI / 2.0) {} // default radius is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -63,9 +64,9 @@ public: ...@@ -63,9 +64,9 @@ public:
return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px); return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px);
} }
private: private:
unsigned int m_Radius;
// Equal to \f$ \frac{\pi}{2 m} \f$ // Equal to \f$ \frac{\pi}{2 m} \f$
double m_Factor; double m_Factor;
unsigned int m_Radius;
}; };
} //namespace Function } //namespace Function
......
...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double> ...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double>
class GaussianWindowFunction class GaussianWindowFunction
{ {
public: public:
GaussianWindowFunction(): m_Radius(1), m_Factor(-2.0 / CONST_PI) {} // default radius is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -63,8 +64,8 @@ public: ...@@ -63,8 +64,8 @@ public:
return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px); return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px);
} }
private: private:
double m_Factor;
unsigned int m_Radius; unsigned int m_Radius;
double m_Factor;
}; };
} //namespace Function } //namespace Function
......
...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double> ...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double>
class HammingWindowFunction class HammingWindowFunction
{ {
public: public:
HammingWindowFunction(): m_Radius(1), m_Factor(CONST_PI) {} // default radius is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -63,9 +64,9 @@ public: ...@@ -63,9 +64,9 @@ public:
return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px); return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px);
} }
private: private:
unsigned int m_Radius;
// Equal to \f$ \frac{\pi}{m} \f$ // Equal to \f$ \frac{\pi}{m} \f$
double m_Factor; double m_Factor;
unsigned int m_Radius;
}; };
} //namespace Function } //namespace Function
......
...@@ -43,6 +43,7 @@ template<class TInput = double, class TOutput = double> ...@@ -43,6 +43,7 @@ template<class TInput = double, class TOutput = double>
class LanczosWindowFunction class LanczosWindowFunction
{ {
public: public:
LanczosWindowFunction(): m_Radius(1), m_Factor(CONST_PI) {} // default factor is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -74,9 +75,9 @@ public: ...@@ -74,9 +75,9 @@ public:
return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px); return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px);
} }
private: private:
unsigned int m_Radius;
// Equal to \f$ \frac{\pi}{m} \f$ // Equal to \f$ \frac{\pi}{m} \f$
double m_Factor; double m_Factor;
unsigned int m_Radius;
}; };
} //namespace Function } //namespace Function
......
...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double> ...@@ -41,6 +41,7 @@ template<class TInput = double, class TOutput = double>
class WelchWindowFunction class WelchWindowFunction
{ {
public: public:
WelchWindowFunction() : m_Radius(1), m_Factor(1) {} // default radius is 1 at construction
void SetRadius(unsigned int radius) void SetRadius(unsigned int radius)
{ {
m_Radius = radius; m_Radius = radius;
...@@ -63,9 +64,9 @@ public: ...@@ -63,9 +64,9 @@ public:
return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px); return (x == 0.0) ? static_cast<TOutput>(temp) : static_cast<TOutput>(temp * std::sin(px) / px);
} }
private: private:
unsigned int m_Radius;
// Equal to \f$ \frac{1}{m^2} \f$ // Equal to \f$ \frac{1}{m^2} \f$
double m_Factor; double m_Factor;
unsigned int m_Radius;
}; };
} //namespace Function } //namespace Function
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment