This repository was archived by the owner on Feb 2, 2022. It is now read-only.
Open
Conversation
6 missing 'break' statements added. This repairs some strange features importing data. In my case it would never find the structured data (RTSS), while I knew it was there. These 6 bug fixes assume that there is always exactly one and one match.When this one match is found it applies a 'break' statement to the 'for' loop. However, I am not sure if there could be more than one match in the DICOM header data (more entries in a sequence?) So please check if this does not jeopardize how the code should work... for my particular data cases it is an improvement.
Owner
|
I will look into this shortly. I know there are some conditions that it doesn't work with, but are you able to provide some example (anonymized) data to test with? I eventually wanted to refactor the logic behind |
Author
|
hi Aditya,
thanks for your reply.
I can send you a dataset, anonymized using CTP. Please send me your
email-adress, so that I can give you permission to download.
It consists of 1 CT session of 246 images, 7 RTDOSE, 5 RTPLAN, 7
RTSTRUCT and 13 RTIMAGE (the latter are never used by dicompyler)
To find the data dependencies I wrote a simple python program that
solely uses DICOM UID references to find the data dependencies.
It starts by first finding the RTDOSE files, then finds the dependent
RTPLANs that in turn depend on RTSTRUCT which subsequently refer to a
image-series/CT-SESSION.
In this example it turns out that the 7 RTDOSE refer to 3 different
RTPLANs that each link to 1 RTSTRUCT.
The remaining (5-3=2) 2 RTPLAN refer each to an other RTSTRUCT
The final remainng (7-3-2=2) 2 RTSTRUCT are not used by any RTPLAN.
From the 7 RTSTRUCT, 6 refer to the CT session that is present in the
dataset. 1 RTSTRUCT refers to a CT session that is not available in the
dataset. However, this last RTSTRUCT does have a RTPLAN and a RTDOSE.
After loading the data in dicompyler, it should not show any red font
with the messages 'RT Plan Not Found', 'RT Structure Set Not found'.
However it shows many of these statements. It also show a few double
entries.
The changes I proposed in your code (adding the 'break' statements)
solves all these problems and shows all the dependencies correctly as
explained above.
Rationale for changes:
NOTE: Without the 'break' statements, you never break out of a for loop
when a variable (for instance 'foundstructure') has been set to 'True'.
The 6 break statement involving the 'for' loops break the for loop when
a foundstructure, foundseries, foundplan had been set to 'True'.
cheers,
Gert Sikkema
Aditya Panchal schreef op 01-05-2018 19:39:
… I will look into this shortly. I know there are some conditions that
it doesn't work with, but are you able to provide some example
(anonymized) data to test with?
I eventually wanted to refactor the logic behind dicomgui.py into a
new module inside dicompyler-core to isolate the study / series
linkages.
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or mute the
thread [2].
*
Links:
------
[1]
#111 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/ANUKG-3XufLIGxdOkFuVK-9ej3RQX6nTks5tuJ3UgaJpZM4TsbnI
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
6 missing 'break' statements added. This repairs some strange features importing data. In my case it would never find the structured data (RTSS), while I knew it was there.
These 6 bug fixes assume that there is always exactly one and one match.When this one match is found it applies a 'break' statement to the 'for' loop. However, I am not sure if there could be more than one match in the DICOM header data (more entries in a sequence?)
So please check if this does not jeopardize how the code should work... for my particular data cases it is an improvement.