Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Adding Skip-Button to PTV Assignment Window #136

Open
Kiragroh opened this issue Jan 23, 2021 · 5 comments
Open

Adding Skip-Button to PTV Assignment Window #136

Kiragroh opened this issue Jan 23, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@Kiragroh
Copy link

Kiragroh commented Jan 23, 2021

Hi Dan,

in one cohort of mine, I have 270 plans for the same StudyInstanceUID and StructureSet. There is only one PTV per Plan and no PTV-assignment necessary (at other times much appreciated).

Because I do not like to click 270 times to come to the Finish-Button I added a 'Skip to the end'-Button. The important new button-function is here:

def on_skip(self, *evt):
    self.update_data(len(self.uids)-self.current_index)

Maybe interesting to add to the next release but maybe is can do more harm for standard imports than help in more special cases.
screenshot_5564

@cutright
Copy link
Owner

I should probably automatically exclude any patients in that list that have no PTVs to assign, and then don't show the window at all if the list is empty.

Honestly, I've never used this feature clinically. So feedback is very welcome.

@Kiragroh
Copy link
Author

This would be nice and solve most cases.

Additional thought: Maybe you can auto-assign a ptv to included-list where only one PTV would be listed in the ignored-panel

@cutright
Copy link
Owner

cutright commented Jan 31, 2021

Does this commit above work? I don't have a set of data to easily test this. I added the following lines every time update_data is called:

# Auto skip if < 2 PTVs
ptv_count = len(self.ptvs[self.study_uid])
if ptv_count == 0:
self.on_next()
elif ptv_count == 1:
self.ptvs[self.plan_uid] = [self.ptvs[self.study_uid]]
self.update_data()
self.on_next()

Might need a dialog window to explain what's happening though? I'm also unsure if the self.update_data() is necessary.

@cutright cutright added the enhancement New feature or request label Jan 31, 2021
cutright added a commit that referenced this issue Jan 31, 2021
@cutright
Copy link
Owner

Correction, had a type issue:

# Auto skip if < 2 PTVs
ptv_count = len(self.ptvs[self.study_uid])
if ptv_count < 2:
if ptv_count == 1:
ptvs = self.ptvs[self.study_uid]
self.ptvs[self.plan_uid] = self.ptvs[self.plan_uid].union(ptvs)
self.update_data()
self.on_next()

@cutright
Copy link
Owner

cutright commented Feb 1, 2021

I think I've got it, came across a few unrelated issues along the way.

If all of your plans can auto assign PTVs, you'll see the window blip in and out before you can do anything. I'd prefer that it didn't show at all, but I think that'll require a lot more thought (although maybe not much code?). If any of the plans have multiple PTVs to pick from, the window should still let you assign and go back and forth through only the plans with multiple PTVs available.

I also came across periodic issues ignoring uncategorized ROIs... not sure why yet.
RuntimeError: dictionary changed size during iteration

cutright added a commit that referenced this issue Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants