Skip to content

Commit

Permalink
Merge pull request #34 from Cryaaa/relabel_images-change-measurement-…
Browse files Browse the repository at this point in the history
…reforming

Relabel Image - change how the measurements list is reformed
  • Loading branch information
haesleinhuepf authored Jan 29, 2023
2 parents 25a0789 + 9ddbdbb commit 4040e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napari_skimage_regionprops/_parametric_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def relabel(image, measurements):

def relabel_cle(image, measurements):
import pyclesperanto_prototype as cle
return cle.pull(cle.replace_intensities(image, numpy.asarray([0] + measurements)))
return cle.pull(cle.replace_intensities(image, np.insert(np.array(measurements), 0, 0)))

def relabel_numpy(image, measurements):
return numpy.take(numpy.array([0] + measurements), image)
return numpy.take(np.insert(np.array(measurements), 0, 0), image)

0 comments on commit 4040e98

Please sign in to comment.