Skip to content

Commit

Permalink
Closes #202
Browse files Browse the repository at this point in the history
  • Loading branch information
jrkerns committed Sep 19, 2019
1 parent 7221b08 commit 6982542
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pylinac/planar_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,10 @@ def phantom_ski_region(self):
"""The skimage region of the phantom outline."""
regions = self._get_canny_regions()
blobs = []
phantom_bbox_size_mm2 = 28000 # this is the size of the bounding box when phantom is at 45 deg. Too hard to use filled area as broken pixels can cause non-filling
phantom_size_pix = phantom_bbox_size_mm2 * (self.image.dpmm ** 2)
for phantom_idx, region in enumerate(regions):
if region.area < 50:
if not np.isclose(region.bbox_area, phantom_size_pix, rtol=0.05):
continue
semi_round = 0.7 > region.eccentricity > 0.3
hollow = region.extent < 0.025
Expand Down Expand Up @@ -543,7 +545,7 @@ def phantom_angle(self):
angle : float
The angle in degrees.
"""
return -np.rad2deg(self.phantom_ski_region.orientation)
return 45

@property
def phantom_center(self):
Expand Down

0 comments on commit 6982542

Please sign in to comment.