Commit 8344d59f authored by Rémi Cresson's avatar Rémi Cresson Committed by Cédric Traizet

Revert "FIX: replace otb::FunctorImageFilter with itk::UnaryFunctorImageFilter to fix #2004"

This reverts commit 77299c78e88855d2f14de5426af1396aee2e61f6.
parent 665c3afd
......@@ -737,7 +737,6 @@ private:
void PrepareMosaicFilter(typename TMosaicFilterType::Pointer& filter)
{
SetInterpolator<TMosaicFilterType>(filter);
SetCorrectionModel<TMosaicFilterType>(filter);
SetSpacing<TMosaicFilterType>(filter);
SetNoDataValue<TMosaicFilterType>(filter);
SetCorrectionModel<TMosaicFilterType>(filter);
......
......@@ -49,7 +49,7 @@ int SetInputRequestedRegion(const T* img, const itk::ImageRegion<2>& region, con
// The ugly cast in all ITK filters
T* nonConstImg = const_cast<T*>(img);
if (currentRegion.Crop(img->GetLargestPossibleRegion()))
if (currentRegion.GetNumberOfPixels()==0 || currentRegion.Crop(img->GetLargestPossibleRegion()))
{
nonConstImg->SetRequestedRegion(currentRegion);
return 0;
......
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