Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

local_max_peak_finder throws error when is_volume=False #1836

Open
mattcai opened this issue Mar 24, 2020 · 0 comments
Open

local_max_peak_finder throws error when is_volume=False #1836

mattcai opened this issue Mar 24, 2020 · 0 comments
Labels
bug An issue with an existing feature
Milestone

Comments

@mattcai
Copy link
Contributor

mattcai commented Mar 24, 2020

Description

When using LocalMaxPeakFinder to find spots on a 2D image or 2D slices of 3D volume, indices in masked_image doesn't match size. In addition, when finding spots on 3D image volume, the wrong label region of masked_image is set to False.

Code to Reproduce 2D image issue

gist

Expected Results

No error is thrown. lmp_spots contains hundreds of spots.

Actual Results

Error message when finding spots on 2D slices of 3D volume (is_volume=False)

~/starfish-CI/starfish/starfish/core/spots/FindSpots/local_max_peak_finder.py in image_to_spots(self, data_image, **kwargs)
    244         for spot_prop in spot_props:
    245             if spot_prop.area < self.min_obj_area or spot_prop.area > self.max_obj_area:
--> 246                 masked_image[0, spot_prop.coords[:, 0], spot_prop.coords[:, 1]] = 0
    247 
    248         # store re-calculated regionprops and labels based on the area-masked image

IndexError: too many indices for array
@mattcai mattcai added the bug An issue with an existing feature label Mar 24, 2020
@neuromusic neuromusic added this to the 0.3.0 milestone Apr 27, 2020
@neuromusic neuromusic modified the milestones: 0.2.1, 0.2.x Aug 7, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug An issue with an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants