Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi James
I was looking through DicomImage in image.py and I saw that
DicomImage.__init__
hadThis seems a bit redundant to me. The old adage "If it aint broke doan fix it" probably applies and I'm sure there are good reasons why it is this way, but if I remove the second file load giving:
I get quite a significant performance increase. I tested using:
I get for the original function
0.37560391426086426
0.3352365493774414
0.33795595169067383
0.3667294979095459
0.33728504180908203
and for the modified function
0.30944371223449707
0.26961445808410645
0.2696726322174072
0.29987263679504395
0.2696547508239746
for an 88 slice CBCT.
Unfortunately I was not able to run the unit tests due to issue #543 to double check this does not affect anything down stream, but my test sets loaded and analyzed correctly. I realise this is quite a fundamental change but I thought I would put it out there.
Regards
Alan