Skip to content
Snippets Groups Projects
Commit 12e13bea authored by Cédric Traizet's avatar Cédric Traizet
Browse files

Merge branch '2004-mosaic_rgb' into 'develop'

Resolve "Mosaic do not work anymore with rgb mode"

Closes #2004

See merge request orfeotoolbox/otb!649
parents 665c3afd 8344d59f
No related branches found
No related tags found
2 merge requests!758Release 7.2 integration into master,!649Resolve "Mosaic do not work anymore with rgb mode"
Pipeline #3384 passed
......@@ -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;
......
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