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

BUG: Image should only have one band in metadata

parent 0df350d8
No related branches found
No related tags found
No related merge requests found
......@@ -111,11 +111,10 @@ void Image<TPixel, VImageDimension>::CopyInformation(const itk::DataObject* data
if (imc != nullptr)
{
const auto & imd = imc->GetImageMetadata();
if (imd.Bands.size() > 0 && imd.Bands.size() != this->GetNumberOfComponentsPerPixel())
if (imd.Bands.size() > 0 && imd.Bands.size() != 1)
{
SetImageMetadata(ImageMetadata(imd.GeometryKeys, imd.NumericKeys, imd.StringKeys, imd.LUT1DKeys,
imd.LUT2DKeys, imd.TimeKeys, imd.ExtraKeys, ImageMetadata::ImageMetadataBandsType(this->GetNumberOfComponentsPerPixel())));
imd.LUT2DKeys, imd.TimeKeys, imd.ExtraKeys, {}));
}
else
{
......
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