Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp @ 4827:4cfd96732076
Support decoding of black-and-white images (with 1 bit per pixel), notably DICOM SEG
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Nov 2021 15:52:54 +0100 |
parents | 5774fe497ff2 |
children | 7053502fbf97 |
comparison
equal
deleted
inserted
replaced
4825:381c2ca04860 | 4827:4cfd96732076 |
---|---|
540 **/ | 540 **/ |
541 | 541 |
542 bool fastVersionSuccess = false; | 542 bool fastVersionSuccess = false; |
543 PixelFormat sourceFormat; | 543 PixelFormat sourceFormat; |
544 if (!info.IsPlanar() && | 544 if (!info.IsPlanar() && |
545 info.GetBitsStored() != 1 && // Black-and-white image, notably DICOM SEG (new in Orthanc 1.9.8) | |
545 info.ExtractPixelFormat(sourceFormat, false)) | 546 info.ExtractPixelFormat(sourceFormat, false)) |
546 { | 547 { |
547 try | 548 try |
548 { | 549 { |
549 size_t frameSize = info.GetHeight() * info.GetWidth() * GetBytesPerPixel(sourceFormat); | 550 size_t frameSize = info.GetHeight() * info.GetWidth() * GetBytesPerPixel(sourceFormat); |