Skip to content

Commit

Permalink
ENH: remove repetitive monochorme1 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp authored and N-Dekker committed Nov 1, 2024
1 parent 033a711 commit d29cca5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Modules/IO/GDCM/src/itkGDCMImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -348,17 +348,15 @@ GDCMImageIO::Read(void * pointer)
}
else if (pi == gdcm::PhotometricInterpretation::MONOCHROME1)
{
// ITK does not carry color space associated with an image. It is pretty
// much assumed that scalar image is expressed in MONOCHROME2 (aka min-is-black)
// ITK does not carry color space associated with an image. It is
// assumed that scalar image is expressed in MONOCHROME2 (aka min-is-black)
gdcm::ImageChangePhotometricInterpretation icpi;
icpi.SetInput(image);
icpi.SetPhotometricInterpretation(gdcm::PhotometricInterpretation::MONOCHROME2);
if (!icpi.Change())
{
itkExceptionMacro("Failed to change to Photometric Interpretation");
}
itkWarningMacro("Converting from MONOCHROME1 to MONOCHROME2 may impact the meaning of DICOM attributes related "
"to pixel values.");
image = icpi.GetOutput();
}

Expand Down

0 comments on commit d29cca5

Please sign in to comment.