QIICR / dcmqi

dcmqi (DICOM for Quantitative Imaging) is a free, open source C++ library for conversion between imaging research formats and the standard DICOM representation for image analysis results
https://qiicr.gitbook.io/dcmqi-guide/
BSD 3-Clause "New" or "Revised" License
242 stars 61 forks source link

Test and update DCMTK version to benefit from performance enhancements #383

Open fedorov opened 5 years ago

fedorov commented 5 years ago

Following on email from @michaelonken:

I recently looked into the performance issue with writing segmentations (and other objects based on functional groups).

As I thought, the main speed issue is the checking of the functional group structure. It's possible to speed this up (I think) by changing the way functional groups are organized and accessed in memory and I put it on my list to enhance this in the future.

For now, I did two things:

  • For some objects the checking has been performed twice, including segmentations, i.e. updating to new code will speed up writing by factor ~2.

  • Also, if you use the same code over and over again to produce the segmentation objects, you probably do not require to check the correctness of the functional groups at all. In such cases it only makes sense to use the checking when you develop your own code and test with some instances.

As an impliciation I think it is useful to just optionally disable the checks. That's now possible too and makes writing even large segmentation objects very fast.

You could test this with the latest DCMTK, e.g. commit 9461c7851c3465ca0f14b964ed7c6d0dd4d88834 (latest online right now).

The actual commit with the check option is this one: 591a1bc2f0ad0edec4fbb093ceb07b5fcaf127c9 .

You can disable checks by setting setCheckFGOnWrite(OFTrue) on your DcmSegmentation object.

fedorov commented 5 years ago

@michaelonken can you give us some unofficial idea if a minor release is coming up sometime soon?

michaelonken commented 5 years ago

It's planned for late summer...this year :-).

fedorov commented 4 years ago

Resolved by #391

fedorov commented 4 years ago

TODO: need to test with checks disabled ...