question on DCM_MaxReadLength

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Geert Vandenbussche
Posts: 13
Joined: Tue, 2018-11-13, 09:05

question on DCM_MaxReadLength

#1 Post by Geert Vandenbussche »

Hi,

Does a dataset, sent by the following piece of code include elements > DCM_MaxReadLength when sent over the wire?
Or do I need to use fileformat.loadAllDataIntoMemory()?

Code: Select all

fileformat.loadFile(vector_image_object[i].slocation, EXS_Unknown, EGL_recalcGL, DCM_MaxReadLength, ERM_fileOnly);
fileformat.getDataset()->putAndInsertString(DCM_StudyInstanceUID, studyUID);
DcmDataset* ds = fileformat.getDataset();
result = scu.sendSTORERequest(0, NULL, ds, rspStatusCode);
(I wasn't able to (yet) identify an object with a large enough dataset.)
Tried to mimic with (without loadAllDataIntoMemory):

Code: Select all

fileformat.loadFile(vector_image_object[i].slocation, EXS_Unknown, EGL_recalcGL, 4, ERM_fileOnly);
result is OK, just want to prevent I'm overlooking something.

Thanks.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: question on DCM_MaxReadLength

#2 Post by Marco Eichelberg »

Don't worry. DCM_MaxReadLength only specifies the threshold used by the parser to decide which element values should be read from a DICOM file immediately, and which ones should be only read on demand when really needed. When you send a dataset, this will be taken into account and the transmitted dataset will be complete. If I remember correctly, we have even implemented code in the parser that makes sure that sending a dataset does not require the whole dataset to be loaded into memory, which may be a problem with very large files.

Geert Vandenbussche
Posts: 13
Joined: Tue, 2018-11-13, 09:05

Re: question on DCM_MaxReadLength

#3 Post by Geert Vandenbussche »

Marco,

Thank you for your comforting reply.
Indeed fileformat has a method called 'loadAllDataIntoMemory'. Made this configurable.

fyi:
Some results (635MB Breast Tomography object):
loadAllDataIntoMemory = true - 28s
loadAllDataIntoMemory = false - 19s

Best regards,

Geert

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest