Commit 12e13bea authored by Cédric Traizet's avatar Cédric Traizet

Merge branch '2004-mosaic_rgb' into 'develop'

Resolve "Mosaic do not work anymore with rgb mode"

Closes #2004

See merge request !649
parents 665c3afd 8344d59f
Pipeline #3384 passed with stage
in 9 minutes and 48 seconds
......@@ -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