Skip to content

Commit

Permalink
Fix scikit import.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanoesterle committed Apr 24, 2024
1 parent c8fb37b commit 45a2a9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion djimaging/utils/mask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import numpy as np
from matplotlib import pyplot as plt
from skimage.measure import label

from djimaging.utils import scanm_utils
from djimaging.utils.alias_utils import check_shared_alias_str
Expand Down Expand Up @@ -162,6 +161,8 @@ def get_mask_by_bg(seed_ix, seed_iy, data, ref_value=None, thresh=0.2, max_pixel


def relabel_mask(mask, connectivity, return_num=False):
from skimage.measure import label

if return_num:
new_mask, num = label(mask.T, connectivity=connectivity, return_num=True)
return new_mask.T, num
Expand Down

0 comments on commit 45a2a9d

Please sign in to comment.