Question

While using the MC_Open_File API of MERGECOM,

MC_Open_File( applID, msgID, &cbInfo, MediaToFileObj );

The following error occurred. How to resolve this/ overcome this issue?

(5124) 03-09 15:01:10.39 MC3 E: Tags not in ascending order: (0010,0010) found after (696c,6e6f)
(5124) 03-09 15:01:10.39 MC3 W: Error with tag (0010,0010) at byte offset 704 when parsing file

The same file works fine with MC_Stream_To_Message_With_Offset and MC_Stream_To_Message. Since am not aware of the MC_ATT_TRANSFER_SYNTAX_UID am not able to use those two API's.

Kindly help me to overcome this.

Was it helpful?

Solution

MC_Open_File expects that the file you're reading is a DICOM file with a 128 byte preamble, 'DICM' prefix, then the group 0x0002 elements, followed by the dataset itself.

The error you are seeing looks suspiciously like a parsing error when reading the file. The tag number (696c,6e6f) is obvious ASCII characters that it looks like the parser attempted to parse as a DICOM tag.

So it looks like you might have either an invalidly formatted file, or you're trying to read in a file that is not in the DICOM File Format. Note that MergeCOM-3 APIs do not attempt to parse and determine the format of the file (whether the file is a DICOM file or stream), they just assume the format for the function being used. I'd suggest looking alittle deeper at the binary content of the file to determine the format and if you're using the right function to read the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top