haesleinhuepf / napari-manual-split-and-merge-labels

BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

2D merging/splitting labels in 3D environments #2

Open Pablo1990 opened 3 years ago

Pablo1990 commented 3 years ago

Hi Robert,

I have been playing with your plugin I find really useful to proofread my 3D images. However, when I tried to split/merge labels in 3D but only in a 2D slice, it turns out to do the split/merge in all the 3D array. Is it possible to change this behaviour dynamically? If not, do you foresee it would be difficult to add that feature into your plugin? It would be great to have that functionality and I can try to implement it if you feel it is right.

Many thanks again for developing this, Pablo

haesleinhuepf commented 3 years ago

Hi Pablo @Pablo1990 ,

I'm not sure if I understand the adaptation you would like to do to the plugin. Are you doing cell tracking by chance in 2D+t and load the dataset as a 3D stack? If not, feel free to provide an example dataset or visualization. Also pull-requests with suggested changes to this repository are very welcome btw.

Best, Robert

Pablo1990 commented 3 years ago

Hi Robert @haesleinhuepf,

Thanks for answering! I am doing 3D segmentation proofreading and trying to improve them both in 3D and slice by slice. So sometime the segmentation confuse 2 cells and it puts only 1 (in a single 2D slice). Thus, I want to split them into two (but only in that particular slice, 1RealCell 1RealCell_twoSegmentedCells ). However, when I tried the plugin, It does split the cells, but in 3D (all the way through the cell - this one is another Z for you to see that split the cells in different Zs SpilttedCell , not only in that particular slice that I selected), whereas I would only wanted to be in that particular Z.

So I was wondering, if that makes sense to you, adding a tick box to do it the merging/splitting in 2D/3D (i.e., single plane or 3D)?

Many thanks, Pablo

haesleinhuepf commented 3 years ago

Ok, that make a lot of sense actually! I would be afraid that if you split label 5 in one slice in labels 5 and 6, it might be split in the next slice in labels 5 and 7... Let me think about how to deal with this. I'm afraid it's not trivial. And if you have a good idea for this, let me know!