DVH-Analytics icon indicating copy to clipboard operation
DVH-Analytics copied to clipboard

Adding Skip-Button to PTV Assignment Window

Open Kiragroh opened this issue 3 years ago • 5 comments

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

Kiragroh avatar Jan 23 '21 17:01 Kiragroh

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.

cutright avatar Jan 30 '21 15:01 cutright

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

Kiragroh avatar Jan 31 '21 06:01 Kiragroh

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: https://github.com/cutright/DVH-Analytics/blob/2b97ed27274e9028794d88d068a2c97472c4f0df/dvha/models/import_dicom.py#L2580-L2587

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

cutright avatar Jan 31 '21 20:01 cutright

Correction, had a type issue: https://github.com/cutright/DVH-Analytics/blob/59b6bf40c77ac8d91d01eb9e780512c923a49340/dvha/models/import_dicom.py#L2580-L2587

cutright avatar Jan 31 '21 20:01 cutright

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 avatar Feb 01 '21 01:02 cutright