How to get the error information
Moderator: Moderator Team
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
How to get the error information
For example, with regard to a MessageBox showing "Missing Attribute" message, how can I get the exact Attribute value through some method in dcmtk?
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
Sorry for the unclearly introduction on my task. I have been attempting to display dicom pictures in an application which was designed by myself. But for some pictures, before it could be displayed, the messagesbox appearred as mentioned above.Michael Onken wrote:Hi!
Are you talking about network communication? Which tool / functions are you using?
Regards,
Michael
BTW, there were other messages, such as "Invalid dicom document". I have not known what can cause an "invalid" dicom file yet.
Thanks.
-
- OFFIS DICOM Team
- Posts: 1524
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Anything that would cause DCMTK's image processing library to reject a DICOM image:I have not known what can cause an "invalid" dicom file yet.
- Missing attributes such as Rows, Columns, BitsAllocated etc.
- Compressed pixel data but decompression codec not registered or not available
- Damaged file (e.g. too short)
- Unsupported color model, bit depth, resolution etc. (actually rather unlikely)
- Not enough memory available
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
The report is:
reading DICOM file: IM_0044
preparing pixel data.
ERROR: cannot change to unencapsulated representation for pixel data !
$dcmtk: dcm2pnm v3.5.4 2005-12-20 $
dcm2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
error: Invalid data value
As for another sample, there were just messy codes appearing in the commond line. Then with the process going on, only click sounds coming seemingly from the CPU could be heard.
reading DICOM file: IM_0044
preparing pixel data.
ERROR: cannot change to unencapsulated representation for pixel data !
$dcmtk: dcm2pnm v3.5.4 2005-12-20 $
dcm2pnm: Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
error: Invalid data value
As for another sample, there were just messy codes appearing in the commond line. Then with the process going on, only click sounds coming seemingly from the CPU could be heard.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
That means that the pixel data is compressed (probably JPEG). Try again with dcmj2pnm.ERROR: cannot change to unencapsulated representation for pixel data !
In this case you probably forgot to specify the output filename, so the rendered image is written to stdout (see syntax usage).As for another sample, there were just messy codes appearing in the commond line. Then with the process going on, only click sounds coming seemingly from the CPU could be heard.
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
One report is:
reading DICOM file: US-PAL-8-10x-echo
preparing pixel data.
writing frame 1 to US-PAL-8-10x-echo.0.ppm
writing frame 2 to US-PAL-8-10x-echo.1.ppm
writing frame 3 to US-PAL-8-10x-echo.2.ppm
writing frame 4 to US-PAL-8-10x-echo.3.ppm
writing frame 5 to US-PAL-8-10x-echo.4.ppm
writing frame 6 to US-PAL-8-10x-echo.5.ppm
writing frame 7 to US-PAL-8-10x-echo.6.ppm
writing frame 8 to US-PAL-8-10x-echo.7.ppm
writing frame 9 to US-PAL-8-10x-echo.8.ppm
writing frame 10 to US-PAL-8-10x-echo.9.ppm
cleaning up memory.
But as for another sample named "IM_44", the machine kept hanging on for such a long time that I couldn' t wait for the end of the process.
Here are the informations of the two samples:
US-PAL-8-10x-echo:
Datatype: OB
Transfer Syntax: 1.2.840.10008.1.2.5(RLE Lossless)
PhotometricInterpretation: PALETTE COLOR
Bit Allocated: 8
Bit Stored: 8
Num of Frames: 10
IM_44:
Datatype: OB
Transfer Syntax: 1.2.840.10008.1.2.4.50(JPEG Baseline)
PhotometricInterpretation: YBR_FULL_422
Bit Allocated: 8
Bit Stored: 8
Num of Frames: 749
However, when I attemptted to read the pixeldatas(from both the samples above) in order to show them in my application, the messagebox with the "Invalid dicom document" message launched.
reading DICOM file: US-PAL-8-10x-echo
preparing pixel data.
writing frame 1 to US-PAL-8-10x-echo.0.ppm
writing frame 2 to US-PAL-8-10x-echo.1.ppm
writing frame 3 to US-PAL-8-10x-echo.2.ppm
writing frame 4 to US-PAL-8-10x-echo.3.ppm
writing frame 5 to US-PAL-8-10x-echo.4.ppm
writing frame 6 to US-PAL-8-10x-echo.5.ppm
writing frame 7 to US-PAL-8-10x-echo.6.ppm
writing frame 8 to US-PAL-8-10x-echo.7.ppm
writing frame 9 to US-PAL-8-10x-echo.8.ppm
writing frame 10 to US-PAL-8-10x-echo.9.ppm
cleaning up memory.
But as for another sample named "IM_44", the machine kept hanging on for such a long time that I couldn' t wait for the end of the process.
Here are the informations of the two samples:
US-PAL-8-10x-echo:
Datatype: OB
Transfer Syntax: 1.2.840.10008.1.2.5(RLE Lossless)
PhotometricInterpretation: PALETTE COLOR
Bit Allocated: 8
Bit Stored: 8
Num of Frames: 10
IM_44:
Datatype: OB
Transfer Syntax: 1.2.840.10008.1.2.4.50(JPEG Baseline)
PhotometricInterpretation: YBR_FULL_422
Bit Allocated: 8
Bit Stored: 8
Num of Frames: 749
However, when I attemptted to read the pixeldatas(from both the samples above) in order to show them in my application, the messagebox with the "Invalid dicom document" message launched.
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
I guess that your system has too few memory to store the uncompressed movie in memory and starts swapping ...But as for another sample named "IM_44", the machine kept hanging on for such a long time that I couldn' t wait for the end of the process.
You probably forgot to register the RLE and JPEG decoders.However, when I attemptted to read the pixeldatas(from both the samples above) in order to show them in my application, the messagebox with the "Invalid dicom document" message launched.
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 83
- Joined: Thu, 2009-03-19, 04:19
reading DICOM file: US-PAL-8-10x-echo
preparing pixel data.
writing frame 1 to US-PAL-8-10x-echo.0.ppm
writing frame 2 to US-PAL-8-10x-echo.1.ppm
writing frame 3 to US-PAL-8-10x-echo.2.ppm
writing frame 4 to US-PAL-8-10x-echo.3.ppm
writing frame 5 to US-PAL-8-10x-echo.4.ppm
writing frame 6 to US-PAL-8-10x-echo.5.ppm
writing frame 7 to US-PAL-8-10x-echo.6.ppm
writing frame 8 to US-PAL-8-10x-echo.7.ppm
writing frame 9 to US-PAL-8-10x-echo.8.ppm
writing frame 10 to US-PAL-8-10x-echo.9.ppm
cleaning up memory.
As for IM_0044, the machine kept hanging on.
Sorry for my neglection. The message was no longer "Invalid DICOM Document, but "Invalid Data Value".
preparing pixel data.
writing frame 1 to US-PAL-8-10x-echo.0.ppm
writing frame 2 to US-PAL-8-10x-echo.1.ppm
writing frame 3 to US-PAL-8-10x-echo.2.ppm
writing frame 4 to US-PAL-8-10x-echo.3.ppm
writing frame 5 to US-PAL-8-10x-echo.4.ppm
writing frame 6 to US-PAL-8-10x-echo.5.ppm
writing frame 7 to US-PAL-8-10x-echo.6.ppm
writing frame 8 to US-PAL-8-10x-echo.7.ppm
writing frame 9 to US-PAL-8-10x-echo.8.ppm
writing frame 10 to US-PAL-8-10x-echo.9.ppm
cleaning up memory.
As for IM_0044, the machine kept hanging on.
Sorry for my neglection. The message was no longer "Invalid DICOM Document, but "Invalid Data Value".
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 1 guest