Menu

#325 Gcdm extracts some jpeg2000 pictures incorrectly

2.4.3
closed
None
9
2014-06-16
2014-06-03
Yaroslav
No

We have problem with attached dicom image.
Dicom image has the following tags: bits allocated 16, bits stored 16, high bit 15.
Dicom image contains jpeg2000 picture with attribute "bits allocated 8"

Gcdm extracts picture incorrectly, see attached screenshot

I found that problem can be resolved in Bitmap::TryJPEG2000Codec.

Function has unused code

if 0

  if( codec.GetPixelFormat() != GetPixelFormat() )
    {
    // Because J2K support the full spectrum I do not see any issue
    // with the following:
    gdcm::Bitmap *i = (gdcm::Bitmap*)this;
    i->SetPixelFormat( codec.GetPixelFormat() );
    }

else

This source code can resolve bug with problematic dicom image (after removing "#if 0").

2 Attachments

Discussion

  • Mathieu Malaterre

    • assigned_to: Mathieu Malaterre
    • Priority: 5 --> 9
     
  • Mathieu Malaterre

    [master d270de2] Add new dataset
    2 files changed, 0 insertions(+), 0 deletions(-)
    create mode 100644 SC16BitsAllocated_8BitsStoredJ2K.dcm
    create mode 100644 SC16BitsAllocated_8BitsStoredJPEG.dcm

     
  • Mathieu Malaterre

     
  • Mathieu Malaterre

    [release af2b041] Gcdm extracts some jpeg2000 pictures incorrectly
    1 file changed, 7 insertions(+)

     
  • Mathieu Malaterre

    • status: open --> closed
     
  • Mathieu Malaterre

    fixed. closing

     

Log in to post a comment.