[Dcmlib] j2k_decode error

Jonathan Oakley jonathan.oakley at gmail.com
Wed Oct 17 23:04:17 CEST 2012


Dear list,

I recently received some DICOM data that I cannot read as the jpeg
2000 decoding reports an error.  I think that I will need to alter the
format of the input data, but I'm trying to understand how.

The error is in:
j2k_decode:

int id = cio_read(cio, 2);
    if (id >> 8 != 0xff) {
      opj_image_destroy(image);
      opj_event_msg(cinfo, EVT_ERROR, "%.8x: expected a marker instead
of %x\n", cio_tell(cio) - 2, id);
      return 0;
    }

The actual error message is: "Error in gdcmopenjpeg.8x: expected a
marker instead of 0"

The general format of the data is read correctly (number of slices,
dimensions per slice and so on), but the compressed image data is
probably wrong.  Could anyone help me understand what a "marker" is
and what value it should take?  Or, is there a good way to inspect the
input data to see if it is incorrect and where it is incorrect?

I apologize in advance if a similar question was already asked.  I
tried searching the mailing list, but without success.

Thank you,

Jonathan.


More information about the Dcmlib mailing list