Skip to content

Commit

Permalink
Fix RECTANGLE docstring, CommonZCoordinateValue type
Browse files Browse the repository at this point in the history
  • Loading branch information
CPBridge committed Feb 27, 2024
1 parent a4572f4 commit dcdb5b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/highdicom/ann/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def __init__(
if coordinates.shape[1] == 3:
unique_z_values = np.unique(coordinates[:, 2])
if len(unique_z_values) == 1:
self.CommonZCoordinateValue = unique_z_values[0]
self.CommonZCoordinateValue = unique_z_values.item()
coordinates_data = coordinates[:, 0:2].flatten()
dimensionality = 2
else:
Expand Down
11 changes: 6 additions & 5 deletions src/highdicom/ann/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ class GraphicTypeValues(Enum):
"""

RECTANGLE = 'RECTANGLE'
"""Connected line segments defined by three or more ordered coordinates.
"""Connected line segments defined by four ordered coordinates.
The coordinates shall be coplanar and form a closed, rectangular polygon.
The first coordinate is the top left hand corner, the second coordinate is
the top right hand corner, the third coordinate is the bottom right hand
corner, and the forth coordinate is the bottom left hand corner.
The coordinates shall be coplanar and represent a closed, rectangular
polygon. The first coordinate is the top left hand corner, the second
coordinate is the top right hand corner, the third coordinate is the bottom
right hand corner, and the fourth coordinate is the bottom left hand
corner.
The edges of the rectangle need not be aligned with the axes of the
coordinate system.
Expand Down

0 comments on commit dcdb5b8

Please sign in to comment.