Skip to content

Commit

Permalink
enh: Simplify ROI lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 5, 2024
1 parent c91991c commit cc88653
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nireports/tests/test_interfaces_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,8 @@ def test_ROIsPlot(tmp_path):
)
)
)
lookup = np.zeros(5, dtype=int)
lookup[1] = 1
lookup[2] = 4
lookup[3] = 2
lookup[4] = 3
newdata = lookup[np.round(im.get_fdata()).astype(int)]
lookup = np.array([0, 1, 4, 2, 3], dtype=np.int16)
newdata = lookup[np.int16(im.dataobj)]
hdr = im.header.copy()
hdr.set_data_dtype("int16")
hdr["scl_slope"] = 1
Expand Down

0 comments on commit cc88653

Please sign in to comment.