Skip to content
Snippets Groups Projects
Commit 910a9a43 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

BUG:remove useless m_Transform attribute from GroundSpacingImageFunction

parent 6ad6ebea
Branches
Tags
No related merge requests found
......@@ -86,6 +86,7 @@ public:
this->ConvertPointToNearestIndex(point, index);
return this->EvaluateAtIndex(index);
}
virtual FloatType EvaluateAtContinuousIndex(
const ContinuousIndexType& cindex) const
{
......@@ -94,11 +95,8 @@ public:
return this->EvaluateAtIndex(index);
}
/** Get/Set the transformation definition of the input image **/
itkSetObjectMacro(Transform, TransformType);
itkGetObjectMacro(Transform, TransformType);
PointType GetPixelLocation(const IndexType& index) const;
protected:
GroundSpacingImageFunction();
virtual ~GroundSpacingImageFunction(){}
......@@ -108,7 +106,6 @@ private:
GroundSpacingImageFunction(const Self &); //purposely not implemented
void operator =(const Self&); //purposely not implemented
TransformType::Pointer m_Transform;
ValueType m_R;
ValueType m_deg2radCoef;
};
......
......@@ -39,7 +39,6 @@ GroundSpacingImageFunction<TInputImage, TCoordRep>
{
m_R = 6371000;
m_deg2radCoef = CONST_PI / 180;
m_Transform = TransformType::New();
}
/**
......@@ -120,6 +119,7 @@ GroundSpacingImageFunction<TInputImage, TCoordRep>
PointType inputPoint;
inputPoint[0] = index[0];
inputPoint[1] = index[1];
if (!this->GetInputImage())
{
itkExceptionMacro(<< "No input image!");
......
......@@ -284,7 +284,7 @@ ImageLayer<TImage, TOutputImage>
{
if (m_Transform->GetTransformAccuracy() != Projection::UNKNOWN)
{
PointType point = m_GroundSpacing->GetPixelLocation (index);
PointType point = this->GetPixelLocation (index);
oss << setiosflags(std::ios::fixed) << std::setprecision(2) << "Ground spacing(in m): " << m_ApproxGroundSpacing.first << " " << m_ApproxGroundSpacing.second <<
std::endl;
......@@ -343,8 +343,6 @@ ImageLayer<TImage, TOutputImage>
//Set parameters of the ground spacing image calculators
m_GroundSpacing->SetInputImage(m_Image);
m_GroundSpacing->SetTransform(m_Transform);
}
template <class TImage, class TOutputImage>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment