DcmDicomdir from an input stream

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
paolom
Posts: 169
Joined: Tue, 2008-09-16, 15:02

DcmDicomdir from an input stream

#1 Post by paolom »

Hi,

I'm reading some dicom files from input stream whit this code:

Code: Select all

DcmInputBufferStream dataBuf;
dataBuf.setBuffer(buffer, buflen);
dataBuf.setEos();

DcmFileFormat fileFormat;
fileFormat.transferInit();
OFCondition cond = fileFormat.read(dataBuf);
fileFormat.transferEnd();

Now I need to parse DICOMDIR file in a similar way.

Is it possible to create a DcmDicomdir object from an input stream?!

J. Riesmeier
DCMTK Developer
Posts: 2497
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DcmDicomdir from an input stream

#2 Post by J. Riesmeier »

As far as I remember, the DcmDicomDir class only works on files (because of the internally used file/byte offsets). Of course, you can read an instance of the Basic Directory IOD into a DcmFileFormat or DcmDataset from a stream but then there would be no support for the Directory Record hierarchy (which is based on the before-mentioned byte offsets).

It should also be possible to enhance the DcmDicomDir class (and its underlying classes) in order to support reading from an input stream... the class apparently has not been designed having this in mind.

ali
Posts: 6
Joined: Mon, 2020-08-31, 07:05

Re: DcmDicomdir from an input stream

#3 Post by ali »

Has the DicomDir class been updated since this post to support reading from an input stream?

J. Riesmeier
DCMTK Developer
Posts: 2497
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: DcmDicomdir from an input stream

#4 Post by J. Riesmeier »

As far as I can see, the class DcmDicomDir has not been enhanced in this regard. The reason is that no one from our team apparently needed this feature for his own work and also no DCMTK user contributed it or sponsored development of it.

By the way, what is your use case?

ali
Posts: 6
Joined: Mon, 2020-08-31, 07:05

Re: DcmDicomdir from an input stream

#5 Post by ali »

Okay thank you J. I would be interested in working on it, but time at work does not allow.

And unfortunately I'm not at liberty to say.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest