diff --git a/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx b/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx index deef99c59fcc47a55a3b964cf3817273fcfdebdf..1c97f52367621a40351a334da91f7aff2affb7d4 100644 --- a/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx +++ b/Code/ApplicationEngine/otbWrapperOutputImageParameter.cxx @@ -16,8 +16,8 @@ =========================================================================*/ #include "otbWrapperOutputImageParameter.h" -//#include "itkCastImageFilter.h" #include "otbVectorRescaleIntensityImageFilter.h" +#include "itkCastImageFilter.h" namespace otb { @@ -116,7 +116,12 @@ OutputImageParameter::Write( ) } case ImagePixelType_double: { - otbRescaleAndWriteMacro(DoubleVectorImageType, m_DoubleWriter); + typedef itk::CastImageFilter<FloatVectorImageType, DoubleVectorImageType> CastFilterType; + CastFilterType::Pointer cast = CastFilterType::New(); + cast->SetInput( this->GetImage() ); + m_DoubleWriter->SetFileName( this->GetFileName() ); + m_DoubleWriter->SetInput(cast->GetOutput()); + m_DoubleWriter->Update(); break; } }