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

Update dicomgui.py #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions dicompyler/dicomgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ def AddPatientDataTree(self, patients):
if (seriesid == structure['series']):
structure['treeid'] = self.tcPatients.AppendItem(series['treeid'], name, 4)
foundseries = True
break
# If no series were found, add the rtss to the study
if not foundseries:
structure['treeid'] = self.tcPatients.AppendItem(study['treeid'], name, 4)
Expand All @@ -481,6 +482,7 @@ def AddPatientDataTree(self, patients):
if (structureid == plan['rtss']):
plan['treeid'] = self.tcPatients.AppendItem(structure['treeid'], name, 5)
foundstructure = True
break
# If no structures were found, add the plan to the study/series instead
if not foundstructure:
# If there is an image series, add a fake rtss to it
Expand All @@ -491,6 +493,7 @@ def AddPatientDataTree(self, patients):
badstructure = self.tcPatients.AppendItem(
series['treeid'], "RT Structure Set not found", 7)
foundseries = True
break
# If no series were found, add the rtss to the study
if not foundseries:
badstructure = self.tcPatients.AppendItem(
Expand Down Expand Up @@ -533,6 +536,7 @@ def AddPatientDataTree(self, patients):
dose['treeid'] = self.tcPatients.AppendItem(plan['treeid'], name, 6)
filearray = [dose['filename']]
self.EnableItemSelection(patient, dose, filearray, rxdose)
break
# If no plans were found, add the dose to the structure/study instead
if not foundplan:
if dose['hasgrid']:
Expand Down Expand Up @@ -561,6 +565,7 @@ def AddPatientDataTree(self, patients):
self.tcPatients.SetItemTextColour(badplan, wx.RED)
filearray = [dose['filename']]
self.EnableItemSelection(patient, dose, filearray)
break
if not foundstructure:
# If there is an image series, add a fake rtss to it
foundseries = False
Expand All @@ -570,6 +575,7 @@ def AddPatientDataTree(self, patients):
badstructure = self.tcPatients.AppendItem(
series['treeid'], "RT Structure Set not found", 7)
foundseries = True
break
# If no series were found, add the rtss to the study
if not foundseries:
badstructure = self.tcPatients.AppendItem(
Expand Down