DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Mon, 2018-10-22, 04:42

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri, 2013-02-08, 14:18 
Offline

Joined: Fri, 2013-02-08, 09:56
Posts: 2
Hello,
I'm new in dcmtk world, please excuse my misunderstandings and approximations.

For some reasons I'm dealing with a server system on which DICOM files are sent before transmission to PACS system. I try to develop a robust solution to manage all documents in different situations. One of these situation involves corrupted files. Since the PACS service doesn't accept these particular files I try to detect them. For now I'm working on Unix script solution and detect them with the command dcmdump dicom_file. According to readings (on forum etc.) it seems to be the most accurate way to do that (and dcmftest passes).

This correctly sends me information about the problem:
Code:
$ dcmdump dicom_file
E: DcmElement: PixelData (7fe0,0010) larger (17039360) than remaining bytes in file
E: dcmdump: I/O suspension or premature end of stream: reading file: dicom_file


Unfortunately I have some troubles with this command in that particular case. Indeed I'm not able to redirect the outputs of the error into a file nor to a grep command (or similar).
Code:
$ dcmdump dicom_file > .log
$ dcmdump dicom_file | grep 'E:'

The file is empty (or grep doesn't catch ouputs) and the error explanations are still plot into the terminal. What is the most curious is that I'm able to redirect the outputs when the DICOM file is not corrupted.

My questions are: why is it not possible to perform the redictions of the outputs in such situation? Is dcmdump really the most appropriate solution ? (If not, what is the solution according to you).

Thanks a lot.


Top
 Profile  
 
PostPosted: Fri, 2013-02-08, 15:35 
Offline
DCMTK Developer

Joined: Tue, 2011-05-03, 14:38
Posts: 1978
Location: Oldenburg, Germany
Depending on the shell you're using, the redirection of stderr (this is where the log output is usally written) differs. What about using a log file (without redirection of stderr)? See this HOWTO.


Top
 Profile  
 
PostPosted: Fri, 2013-02-08, 16:01 
Offline

Joined: Fri, 2013-02-08, 09:56
Posts: 2
Damn ... I did not think twice before writing ! Of course you're right and stderr may be easily useded with 2> (in my current terminal).
I already had a look on the logger and it will require a lot of changes in my current solution but I keep it in mind.
Thanks a lot for the prompt answer !


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [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