Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

3D labeling #309

Open
indrajeettambe opened this issue May 3, 2023 · 5 comments
Open

3D labeling #309

indrajeettambe opened this issue May 3, 2023 · 5 comments

Comments

@indrajeettambe
Copy link

Hi,

Is it possible to do vorronoi segmentation of 3d image using points (basically center points for voronoi, I have these points will be provided externally not read from image). After getting 3d voronoi using the points, I want to lable that to a 3d image. Is it possible to impliment using this module?

@haesleinhuepf
Copy link
Member

Hi @indrajeettambe ,

this should be possible. You can take the list of points (in format x,y,z) and turn it into a label image using pointlist_to_labelled_spots() and then flood a binary image from these pixels using masked_voronoi_labeling.

Please let me know if this works for you or if you need further guidance.

Best,
Robert

@indrajeettambe
Copy link
Author

is it possible for you share your email address?

@indrajeettambe
Copy link
Author

Hi @haesleinhuepf,

I have tried using pointlist_to_labelled_spots(). Here is the jupyternotebook of the following-
labeling.pdf. I have also shared how my data looks like.

After this I am a bit confused to use masked_voronoi_labeling.

I am looking forward to grow these spots with different lable and segment my data.

Data:
Screenshot_83

Looking forward to segment like this:
Screenshot_82

@haesleinhuepf
Copy link
Member

Hi @indrajeettambe

try someting like

cle.masked_voronoi_labeling(spots_image > 0, tomo_compress)

Let me know if this works!

Best,
Robert

@indrajeettambe
Copy link
Author

Hi @haesleinhuepf,

I have tried using cle.masked_voronoi_labeling. Also used cle.gaussian_blur & cle.threshold_otsu to get a mask from my image. But seems like I have not used it properly as the voronoi is not using my spots. Please request you to have a look. As you can see in code (attached below) that there are 20 spots, so I am expecting to get more than 20 lables or voronoi regins. But I am only getting 2 lables (I have also attached output below). I also can see some region that is not labled. I am not sure where I am going wrong.

Code :
labeling.pdf

Output from Napari:
Screenshot_85
Screenshot_86

Regards,
Indrajeet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants