Skip to content
Snippets Groups Projects
Commit f39d57d3 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH : force user to set spacing in the method used to set automatically the output parameters

parent 4d19c587
Branches
Tags
No related merge requests found
......@@ -219,7 +219,7 @@ public:
void SetOutputParametersFromImage(const ImageBaseType * image);
/** Useful to set the output parameters from an existing image*/
void SetOutputParametersFromMap(const std::string map);
void SetOutputParametersFromMap(const std::string map, const SpacingType& spacing);
/** Set/Get the grid size for rpc estimator*/
void SetInputRpcGridSize(const SizeType& gridSize)
......
......@@ -241,7 +241,7 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
template <class TInputImage, class TOutputImage>
void
GenericRSResampleImageFilter<TInputImage, TOutputImage>
::SetOutputParametersFromMap(const std::string map)
::SetOutputParametersFromMap(const std::string map, const SpacingType& spacing)
{
// Get the input Image
const InputImageType* input = this->GetInput();
......@@ -291,6 +291,7 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage>
// Update the transform
this->SetOutputProjectionRef(utmRef);
this->SetOutputSpacing(spacing);
this->UpdateTransform();
// Get the inverse transform again : used later
......
......@@ -186,8 +186,7 @@ int otbGenericRSResampleImageFilterFromMap(int argc, char* argv[])
// Set the Resampler Parameters
resampler->SetInput(extractor->GetOutput());
resampler->SetDeformationFieldSpacing(gridSpacing);
resampler->SetOutputSpacing(spacing);
resampler->SetOutputParametersFromMap("UTM");
resampler->SetOutputParametersFromMap("UTM",spacing);
if (useInRpc)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment