Skip to content

(dcmtk): limit memory usage of fwDicomIOFilterTest & fwDcmtkIOTest

What does this MR do?

This replaces the usage of deepCopy in two Dcmtk filters. We used to copy the whole DicomSeries and then remove the internal buffer. This is both inefficient and memory expensive. We propose here to use shallowCopy() instead, which does not copy the buffer. The container is still cleared out, but only the pointers, so the source buffer is not destroyed.

How to test it?

First test:

  • Launch fwDicomIOFilterTest & fwDcmtkIOTest. Observe memory consumption.
  • Checkout the MR
  • Launch fwDicomIOFilterTest & fwDcmtkIOTest and check that memory consumption dropped down.

Second test

  • Launch VRRender and test the DICOM filtering activity. You can check for instance with DICOM series from the UTest, for instance sight/Patient/Dicom/DicomDB/08-CT-PACS/. Check that filtering still works as before this fix.

Associated Issues/Merge Requests

Edited by Marc SCHWEITZER

Merge request reports