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

COMP:update ReadImageInfo application with new GroundSpacingEstimation design

parent 3cd7d519
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,8 @@ private: ...@@ -248,7 +248,8 @@ private:
GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New(); GroundSpacingImageType::Pointer groundSpacing = GroundSpacingImageType::New();
groundSpacing->SetInputImage(inImage); groundSpacing->SetInputImage(inImage);
FloatType approxGroundSpacing = std::make_pair(itk::NumericTraits<ValueType>::Zero, itk::NumericTraits<ValueType>::min()); FloatType approxGroundSpacing;
approxGroundSpacing.Fill(itk::NumericTraits<ValueType>::Zero);
FloatVectorImageType::IndexType index; FloatVectorImageType::IndexType index;
vnl_random rand(12345); vnl_random rand(12345);
...@@ -259,8 +260,8 @@ private: ...@@ -259,8 +260,8 @@ private:
approxGroundSpacing = groundSpacing->EvaluateAtIndex(index); approxGroundSpacing = groundSpacing->EvaluateAtIndex(index);
//Get image estimated ground spacing (in m) //Get image estimated ground spacing (in m)
SetParameterFloat("estimatedgroundspacingx", approxGroundSpacing.first); SetParameterFloat("estimatedgroundspacingx", approxGroundSpacing[0]);
SetParameterFloat("estimatedgroundspacingy", approxGroundSpacing.second); SetParameterFloat("estimatedgroundspacingy", approxGroundSpacing[1]);
ossOutput << "\tEstimated ground spacing (in meters): [" << GetParameterFloat("estimatedgroundspacingx") << "," << GetParameterFloat("estimatedgroundspacingy") << "]" << std::endl; ossOutput << "\tEstimated ground spacing (in meters): [" << GetParameterFloat("estimatedgroundspacingx") << "," << GetParameterFloat("estimatedgroundspacingy") << "]" << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment