0

I can't reconcile the length of the PixelStream containing the image, with the parameters for this particular image.

0028,0002 (SamplesPerPixel): 1
0028,0004 (PhotometricInterpretation): MONOCHROME2
0028,0010 (Rows): 432
0028,0011 (Columns): 432
0028,0100 (BitsAllocated): 16
0028,0101 (BitsStored): 12
0028,0102 (HighBit): 11

So it seems to me that this stream should be 432*432*2=365472 bytes long, however, EvilDicom reports a length of 155868, based on the debug in Visual Studio 2013. I cannot, however find any evidence of any compression though and the values of the array seem like standard integers in the range 0-255. LossyImageCompression is set to 0. The image originated from an MR machine and is part of a stack.

Could some help me explain some of this please?

James
  • 1,764
  • 5
  • 31
  • 49

1 Answers1

1

Transfer Syntax (0002:0010), a DICOM header element, will indicate the encoding/compression used within a file. Another indication of compressed stream is the location of pixel stream within the dataset. If stored inside the second ITEM element (FFFE:E000) under Pixel Data Element (7FE0:0010), you are dealing with compressed stream.

LEADTOOLS Support
  • 2,755
  • 1
  • 12
  • 12
  • (0002,0010) : TransferSyntaxUID (UniqueIdentifier) -> 1.2.840.10008.1.2.4.70 – James May 20 '16 at 13:06
  • Which corresponds to the compressed format: **JPEG Lossless, Nonhierarchical, First- Order Prediction (Processes 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression** – Anders Gustafsson May 20 '16 at 13:54
  • Ok, I've naively dumped the array to a file, but can't then load that file as a jpeg. Tried loading it into jpeg objects in code, but nothing. I'm wondering if I have to pad every two bytes up to 16bits, due to the bits allocated/bits stored. – James May 20 '16 at 14:35
  • If you are trying to verify the compression/encoding of the image. You can download our fully functional evaluation from our web site (wwwlleadtools.com) and try it yourself. We have support for most compression used in DICOM space. Your typical JPEG decoder will not have support for lossless JPEG and even fewer decoder will have support for extended grayscale (16-bit grayscale). – LEADTOOLS Support May 24 '16 at 21:13