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

OCP RTSTRUCT dicom files fail #81

Merged
merged 1 commit into from Dec 17, 2018
Merged
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
17 changes: 7 additions & 10 deletions dicompylercore/dicomparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,23 +542,20 @@ def GetStructureCoordinates(self, roi_number):
# Locate the contour sequence for each referenced ROI
for c in roi.ContourSequence:
# For each plane, initialize a new plane dict
plane = {}
plane = dict()

# Determine all the plane properties
plane['type'] = c.ContourGeometricType
plane['num_points'] = int(c.NumberOfContourPoints)
plane['data'] = \
self.GetContourPoints(c.ContourData)

# Each plane which coincides with an image slice
# will have a unique ID
if 'ContourImageSequence' in c:
# Add each plane to the planes dict
# of the current ROI
z = str(round(plane['data'][0][2], 2)) + '0'
if z not in planes:
planes[z] = []
planes[z].append(plane)
# Add each plane to the planes dict
# of the current ROI
z = str(round(plane['data'][0][2], 2)) + '0'
if z not in planes:
planes[z] = []
planes[z].append(plane)

return planes

Expand Down