Skip to content

Commit

Permalink
Merge pull request #230 from enfascination/patch-1
Browse files Browse the repository at this point in the history
update example to fix broken call to threshold()

Former-commit-id: a7f046d
  • Loading branch information
ljchang authored May 9, 2018
2 parents d2a3833 + 0d658eb commit 0c338e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/01_DataOperations/plot_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@
import numpy as np

high = data[np.where(data.X['PainLevel']==3)[0]]
high.mean().threshold(threshold='95%').plot()
high.mean().threshold(lower='2.5%', upper='97.5%').plot()

#########################################################################
# We might be interested in creating a binary mask from this threshold.

mask = high.mean().threshold(threshold='95%',binarize=True)
mask.plot()
mask_b = high.mean().threshold(lower='2.5%', upper='97.5%',binarize=True)
mask_b.plot()

#########################################################################
# We might also want to create separate images from each contiguous ROI.

region = high.mean().threshold(threshold='95%').regions()
region = high.mean().threshold(lower='2.5%', upper='97.5%').regions()
region.plot()

0 comments on commit 0c338e5

Please sign in to comment.