in the storescp source code, i look into the storeSCPCallback function, it use cbdata->dcmff->saveFile(fileName.c_str(), xfer, EET_ExplicitLength, EGL_recalcGL, EPD_withoutPadding, OFstatic_cast(Uint32, 0), OFstatic_cast(Uint32, 0), false) to save the data into a file, so then how to save the data into a buffer?
i tried below
unsigned char *streambuffer = new Byte[streamsize];
DcmOutputBufferStream * outputStream = new DcmOutputBufferStream(streambuffer, streamsize);
cbdata->dcmff->write(*outputStream, xfer, EET_ExplicitLength, EGL_recalcGL, EPD_withoutPadding, OFstatic_cast(Uint32, 0), OFstatic_cast(Uint32, 0), OFstatic_cast(Uint32, 0));
but how to know the streamsize?
how to save dicom file to a buffer
Moderator: Moderator Team
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest