Commit c24fe741 authored by Cédric Traizet's avatar Cédric Traizet

Revert "BUG: Image should only have one band in metadata"

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