Mercurial > hg > orthanc
changeset 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 | ad95331c526a |
children | 9e0f408db796 |
files | Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
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()) {