-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large slowdown of elastix_registration_method after reading a DICOM series #226
Comments
The only thing which comes to mind would be image lingering in memory, causing disk swapping during registration. But 400 slices probably can't do that due to small size. So I am out of ideas. |
Thanks @dzenanz Interesting hypothesis. I was actually thinking that the reading might keep threads from the thread pool "occupied", even after having finished reading. But I haven't been able to find enough evidence for that idea. |
Yes, we checked that but I think it is unlikely to be the problem. During registration, the memory never exceeds 20% while the CPU is 100%. The total RAM is 128GB btw. That's why we are considering the "threads" hypothesis as Niels mentioned. |
Please try reading the dicom series with itkwasm-dicom, then convert to |
Konstantinos (@ntatsisk) discovered that when a reasonably large DICOM series is read by
itk.imread
, it very much slows down a subsequentitk.elastix_registration_method
call, even when the DICOM series is not used!We did locally replace
itk.imread
by a "dummy"dummy_imread
, as below here, and the negative speed effect was still there. So apparently it's something about thereader.Update()
taking resources away.The registration was of the following form, so it did not use DICOM at all:
The slowdown can be really large. It seems to depend on the number of files of the DICOM series, but the duration of a registration can go up from 8 seconds to more than 40 seconds. The problem was encountered when reading a series of 408 T2 weighted *.dcm files from https://www.kaggle.com/competitions/rsna-miccai-brain-tumor-radiogenomic-classification/data Running on Windows.
Is this a known issue? Do you have any suggestion how to further narrow the reproducing example, and how to find the cause of the issue?
The text was updated successfully, but these errors were encountered: