Skip to content

Commit

Permalink
dicomparser: Remove the test for existence of ContourImageSequence in…
Browse files Browse the repository at this point in the history
… GetStructureCoordinates

Since this tag isn't required (Type 3) in DICOM RT Structure Set. Closes #80.
  • Loading branch information
gacou54 authored and bastula committed Dec 17, 2018
1 parent 58ac4f5 commit 54bb053
Showing 1 changed file with 7 additions and 10 deletions.
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

0 comments on commit 54bb053

Please sign in to comment.