DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Sun, 2018-10-21, 07:33

All times are UTC + 1 hour




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon, 2009-05-18, 03:19 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
For example, with regard to a MessageBox showing "Missing Attribute" message, how can I get the exact Attribute value through some method in dcmtk?


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2009-05-18, 16:21 
Offline
DCMTK Developer

Joined: Fri, 2004-11-05, 13:47
Posts: 1693
Location: Oldenburg, Germany
Hi!

Are you talking about network communication? Which tool / functions are you using?

Regards,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-05-19, 02:06 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
Michael Onken wrote:
Hi!

Are you talking about network communication? Which tool / functions are you using?

Regards,
Michael


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.

BTW, there were other messages, such as "Invalid dicom document". I have not known what can cause an "invalid" dicom file yet.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-05-19, 08:20 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Tue, 2004-11-02, 17:22
Posts: 1217
Location: Oldenburg, Germany
Quote:
I have not known what can cause an "invalid" dicom file yet.
Anything that would cause DCMTK's image processing library to reject a DICOM image:
  • 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
Probably there is more, but this is what comes to mind.


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-05-19, 09:13 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Usually, the error log shows where the problem is, so you should redirect the ofConsole to a string stream or file.

Btw, what does dcm2pnm report on these sample images in verbose/debug mode?


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 2009-05-20, 01:22 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed, 2009-05-20, 09:07 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Quote:
ERROR: cannot change to unencapsulated representation for pixel data !

That means that the pixel data is compressed (probably JPEG). Try again with dcmj2pnm.

Quote:
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.

In this case you probably forgot to specify the output filename, so the rendered image is written to stdout (see syntax usage).


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2009-05-21, 02:43 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu, 2009-05-21, 12:16 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Quote:
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.

I guess that your system has too few memory to store the uncompressed movie in memory and starts swapping ...

Quote:
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.

You probably forgot to register the RLE and JPEG decoders.


Top
 Profile  
 
 Post subject:
PostPosted: Fri, 2009-05-22, 01:29 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
Quote:
You probably forgot to register the RLE and JPEG decoders


I have checked the codes referring to decoder register and added the codes to accomplish the decoding process. For other samples, it did the trick, while the " Invalid Data Value" message obtained for the above two samples.


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2009-05-25, 09:42 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
Did you also register support for color images by including "diregist.h" to your application (and linking the dcmimage library)?


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2009-05-25, 11:17 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
Jörg Riesmeier wrote:
Did you also register support for color images by including "diregist.h" to your application (and linking the dcmimage library)?


Absolutely I did. I' ve checked the including files and library files again.


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 2009-05-25, 11:41 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
And what is the output of dcmj2pnm on these particular images (in verbose/debug mode)? I hope we are not going round in circles ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-05-26, 02:10 
Offline

Joined: Thu, 2009-03-19, 04:19
Posts: 83
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".


Top
 Profile  
 
 Post subject:
PostPosted: Tue, 2009-05-26, 09:34 
Offline
ICSMED DICOM Services
ICSMED DICOM Services

Joined: Fri, 2004-10-29, 21:38
Posts: 2217
Location: Oldenburg, Germany
For "US-PAL-8-10x-echo" you apparently also have to register the RLE decoder. For "IM_0044" I already wrote "I guess that your system has too few memory to store the uncompressed movie in memory and starts swapping ..."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group