DcmFileFormat::saveBuffer(... ???

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
artemmikheev
Posts: 32
Joined: Mon, 2018-11-12, 20:01

DcmFileFormat::saveBuffer(... ???

#1 Post by artemmikheev »

I need a function that saves DcmFileFormat object to memory buffer. Presently I used DcmFileFormat::saveFile()
For my scenario it is more efficient to save (000s) DcmFileFormat objects,one at a time, into a single BYTE* memory
buffer, something like DcmFileFormat::saveBuffer( BYTE* Buf,....)

a) Looking into the code of ::saveFile() is it possible to replace DcmOutputFileStream
and use the DcmOutputStream and somehow attach my buffer to it.

b) I need to allocated enough memory for several such objects, so is there a quick call, to do
something like int DcmFileFormat::ExactDiskSize()

Sorry if this is already covered in some documentation and postings.

Thank you

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: DcmFileFormat::saveBuffer(... ???

#2 Post by Jan Schlamelcher »

I can answer this one:
artemmikheev wrote:a) Looking into the code of ::saveFile() is it possible to replace DcmOutputFileStream
and use the DcmOutputStream and somehow attach my buffer to it.
Have a look at the class DcmOutputBufferStream.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 1 guest