Skip to content
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

Add image refs to ups #49

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Add image refs to ups #49

merged 4 commits into from
Jun 13, 2024

Conversation

sjswerdloff
Copy link
Owner

addresses part of #48 (patient photo and setup photos, but not DRRs referenced in Beams, i.e. setup DRRs or portals).

… setup image sequence items to InputInformationSequence
…o and setup images

default GUI is to not include
default command line is to include
@sjswerdloff sjswerdloff added the enhancement New feature or request label Jun 9, 2024
@sjswerdloff sjswerdloff self-assigned this Jun 9, 2024
@sjswerdloff sjswerdloff linked an issue Jun 9, 2024 that may be closed by this pull request
)
patient_photo_reference_items.append(patient_photo_reference_item)

# This makes the assumption that the Study and Series Instance UIDs for the Setup images are the same as the plan
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with different modalities for the RT Plan and the RT Images, this can actually never be right.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent point, re Series Instance UID.
That makes for an interesting issue for referenced objects that only have instance level references... The scheduler needs to retrieve the object using a relational query so it can construct the navigational reference.
I'll back out the setup image part for now and address those and RT Image references in a separate PR.

Thank you for the useful feedback.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are welcome. But I am not aware that any archive has implemented relational queries. So, how is this supposed to work in general for UPSs when there is only the Instance Information?
For most of the composite IODs there is the Common Instance Reference Module that provides the hierarchical information for the plain instance references in an instance...

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to search in the Common Instance Reference Module (available in RT (Ion) Plan), and if the Study and Series UID for those referenced instances are not found, avoid encoding in the Input Information sequence.

… images) in the common instance reference module

do not make assumptions about study and series UIDs
if and only if the study and series uids for the referenced sop instance UID are present, encode in the InputInstanceSequence
@@ -74,7 +74,7 @@ def _bdidir_button_clicked(self):
dialog.setFileMode(QFileDialog.Directory)
dialog.setOption(QFileDialog.ShowDirsOnly, True)
dialog.setLabelText(QFileDialog.Accept, "Select")
if dialog.exec_() == QFileDialog.Accepted:
if dialog.exec() == QFileDialog.Accepted:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addresses a deprecation warning generated by PySide6

@sjswerdloff sjswerdloff marked this pull request as ready for review June 12, 2024 15:04
@sjswerdloff sjswerdloff merged commit 576331c into main Jun 13, 2024
3 checks passed
@sjswerdloff sjswerdloff deleted the add_image_refs_to_ups branch June 15, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Populate image references in UPS
2 participants