Mercurial > hg > orthanc
diff Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp @ 1978:0c9c4e36c2b9
support of YBR_RCT photometric interpretation for JPEG2000 lossless
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 Apr 2016 21:42:10 +0200 |
parents | b1291df2f780 |
children | a3a65de1840f |
line wrap: on
line diff
--- 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()) {