DICOM @ OFFIS

Discussion Forum for OFFIS DICOM Tools - For registration, send email with desired user name to the OFFIS DICOM team
It is currently Tue, 2018-08-14, 09:54

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Wed, 2015-10-21, 09:34 
Offline

Joined: Fri, 2015-09-25, 08:32
Posts: 1
Hi,
I would like to stream files to dcm2xml and dcmj2pnm, by streaming the dicom file to the stdin instead of using a file linker. I don't think it is possible out of the box (correct me if I am wrong).
Is this possible to achieve by editing the source code ? I looked at the source code, but I feel a little bit stuck, can you help me by pointing me the right direction ?
Many Thanks.


Top
 Profile  
 
PostPosted: Mon, 2016-01-25, 18:27 
Offline
OFFIS DICOM Team
OFFIS DICOM Team

Joined: Tue, 2004-11-02, 17:22
Posts: 1215
Location: Oldenburg, Germany
I don't think this will be possible without major changes in the dcmdata module. The DcmFileFormat::loadFile() routine, which loads the DICOM file in most DCMTK command line tools, is based on the DcmInputFileStream class, which opens the file with fopen() and expects a file that has a known size and can be seek()ed. For reading a DICOM file from stdin one would have to rather use (or adapt) DcmInputBufferStream, write a routine that implements loadFile() based on such a stream class, and then implement code perhaps in DcmFileFormat::loadFile() that selects the stream-based loading code based on a special filename (the classical Un*x convention would be to use "-" to indicate stdin). Possible, but not trivial.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users 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:  
Powered by phpBB® Forum Software © phpBB Group