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

Commit

Permalink
auto skip PTV assignment if < 2 available #136
Browse files Browse the repository at this point in the history
  • Loading branch information
cutright committed Jan 31, 2021
1 parent 14d7ef4 commit 2b97ed2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dvha/models/import_dicom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2577,6 +2577,15 @@ def update_data(self, increment=0):
else:
self.close()

# 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()

def update_ptv_data_tables(self):
ptvs = self.get_current_ptv_assignments()
for key in ["ignored", "included"]:
Expand Down

0 comments on commit 2b97ed2

Please sign in to comment.