Replies: 20 comments 9 replies
-
Hey @lazigu! |
Beta Was this translation helpful? Give feedback.
-
@Cryaaa good, Tuesday fits! I sent you the data. |
Beta Was this translation helpful? Give feedback.
-
@lazigu just a small update. The problem seems to lie somewhere deep (not just with the generation of the cluster image). What happens is that the label column is displayed properly in the table but the connection to the labels in the image is wrong. For example the cell in the image with label = 1 gets given label 2 from the table and this shift is throughout the whole table. I'll see if I can track down where this issue is caused or we'll brainstorm tomorrow if I can't find anything today.. |
Beta Was this translation helpful? Give feedback.
-
and furthermore this issue also exists for non-timelapse images on the main branch which is worrying so it should have quite a high priority for solving.. |
Beta Was this translation helpful? Give feedback.
-
@Cryaaa I merged PR from Robert today #59, if you mean by the connection of reg props and the image when looking what is displayed in napari status bar, it should have been fixed. Just this branch should be also updated now from main. Is this what you meant? |
Beta Was this translation helpful? Give feedback.
-
Forgot to mention, for the fix to work napari skimage regionprops newest version should be installed in the environment. |
Beta Was this translation helpful? Give feedback.
-
@lazigu that might be it then! I'll give it a try where the Roberts fix is and that might be it already. I'm also very sure that exactly that bug Robert fixed is causing the issues at the start of this discussion.. |
Beta Was this translation helpful? Give feedback.
-
@Cryaaa I don’t think so that it is related to this issue :/ It fixes what is displayed in napari status bar, but actually nowhere else we are using the index column. |
Beta Was this translation helpful? Give feedback.
-
@lazigu I think you're right there. I found that if there is a background label 0 with properties of the background that the problem we are having might be solved. The thing is then we always have the background in the table (even multiple backgrounds for timelapse images). But maybe Robert @haesleinhuepf knows a way to remove or ignore the background labels in the napari skimage regionprops table? I think we should discuss the rest in person tomorrow though, it will make explanations much easier. |
Beta Was this translation helpful? Give feedback.
-
@lazigu, nevermind, I found the problem and it lied within the plotter widget. The next commit to this branch should fix it! |
Beta Was this translation helpful? Give feedback.
-
@Cryaaa feel free to add points to this mini-list! |
Beta Was this translation helpful? Give feedback.
-
I moved this thread to the "Discussions" section, I think it is more relevant here. |
Beta Was this translation helpful? Give feedback.
-
@lazigu, I did some restructuring of the functions in ._measure in the latest commit to the branch. I have left the old function so you can see what I did differently. The main difference is: always working with pandas Dataframes when dealing with regionprops. I did not like that regionprops were sometimes a dict and sometimes a dataframe so I made it that they are always dataframes. I'm open todiscussing the changes I'm suggesting but we'll do that once you are back from Paris :) |
Beta Was this translation helpful? Give feedback.
-
Hey this is another big point to add to the list of problems when working with timelapse data. The visualisation using the colormaps will not always work unfortunately since in some cases the points selected in the plotter widget will not be found in every time frame, which is why we might need to go back to generating a cluster image with the clesperanto functions. Since I still have the function for that functionality from my master thesis I will try and implement it in the next few days and see how it affects performance. |
Beta Was this translation helpful? Give feedback.
-
The spot size now dynamically changes with number of points between some arbitrarily set boundaries. We may need to modiy the behaviour if we find use cases where it could be improved but for now its really cool to be able to visualise these really large UMAPs! |
Beta Was this translation helpful? Give feedback.
-
@lazigu |
Beta Was this translation helpful? Give feedback.
-
@Cryaaa |
Beta Was this translation helpful? Give feedback.
-
Hi Laura and Ryan @lazigu and @Cryaaa , just to let you know, I recently updated napari-skimage-regionprops and napari-simpleitk-image-processing to make them support timelapse-data when doing quantiative measurements. We could use the same strategy in the clusters plotter, if we decide to refactor the measurement code. Precondition would be that we drop the custom widget and use a plain function and magicgui instead. We could then do this:
This might mean that we have to make the "upload CSV" a different, indepent function. And we could move it to napari-skimage-regionprops. That's all just an idea. I'd be happy to actively contribute this. Let me know what you think and maybe we discuss in a meeting. I just wanted to avoid that we duplicate work in this context. ;-) |
Beta Was this translation helpful? Give feedback.
-
@lazigu |
Beta Was this translation helpful? Give feedback.
-
@lazigu, |
Beta Was this translation helpful? Give feedback.
-
Hi @Cryaaa, I need your help with one thing, maybe you can pinpoint the issue faster. The issue might have something to do with the code for the visualization of the cluster image, but it also might be somewhere deeper.
After seeing that video yesterday I was playing around with timelapses on this branch, and so far what works:
It works well for 2-6 labels, but not 1st and 7th. This is what it displays if the 1st label is selected with a picker tool:
I was hoping we could discuss this next week in one of the meetings when we are both there, so I am just putting this here so if you wanted you could already take a look. Tell me if you want to send me this segmented dataset, it's 4D but I am using just 16 timepoints, so it's great to try out stuff because it's not computationally demanding.
Beta Was this translation helpful? Give feedback.
All reactions