# HG changeset patch # User Sebastien Jodogne # Date 1460749330 -7200 # Node ID 0c9c4e36c2b9a18be6a32fc7930d3db6b886f00d # Parent ad95331c526a2ca68d279748f399e8dc77bb1d44 support of YBR_RCT photometric interpretation for JPEG2000 lossless diff -r ad95331c526a -r 0c9c4e36c2b9 Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp --- a/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp Fri Apr 15 10:47:53 2016 +0200 +++ b/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp Fri Apr 15 21:42:10 2016 +0200 @@ -112,7 +112,9 @@ else { if (image.GetPixelFormat().GetSamplesPerPixel() == 3 && - image.GetPhotometricInterpretation() != gdcm::PhotometricInterpretation::RGB) + image.GetPhotometricInterpretation() != gdcm::PhotometricInterpretation::RGB && + (image.GetTransferSyntax() != gdcm::TransferSyntax::JPEG2000Lossless || + image.GetPhotometricInterpretation() != gdcm::PhotometricInterpretation::YBR_RCT)) { photometric_.reset(new gdcm::ImageChangePhotometricInterpretation()); photometric_->SetInput(image); @@ -188,7 +190,8 @@ } } else if (image.GetPixelFormat().GetSamplesPerPixel() == 3 && - image.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::RGB) + (image.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::RGB || + image.GetPhotometricInterpretation() == gdcm::PhotometricInterpretation::YBR_RCT)) { switch (image.GetPixelFormat()) {