-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature Request: Keep/Remove Largest Region in 2D for stacks #53
Comments
Hi, Yes, the library currently uses the connectivity withj dimension corresponding to that of the input image. Anyway, a trick could be to allow 2D connectivities for 3D arrays. Regions in consecutive slices/frames would therefore have distinct labels. We can think about it. |
Sure. I understand. I already have already written macros that do this for my work flows. I was just thinking about this while putting together a new work flow since there doesn't seem to be an easy way to do this for a time series aside from using a macro. I thought the output from a timeseries may be somewhat confusing for someone who is not so familiar with connected component analysis. Maybe it could at least be included in the documentation that the image dimensionality is used for determining the connectivity. Otherwise, as you mention, an option to use 2D connectivity for 3D arrays would be a nice solution. Or, if the stack is a time series, it could use 2D connectivity, while if it is a z-series it could use 3D. I think that might make sense in terms of what people want out of this function considering their input data. Although, as one sometimes loses track of whether their slices are considered time or z-slices, it could also be confusing. I guess there is probably not an ideal solution for all users. Anyway, thanks! I use this package a lot! |
I actually wrote some scripts to do that and I also wonder if it would be worth it for some plugins to include the "Apply to stack" option in 2D as in regular 2D filters in ImageJ... |
Hmm, yes, for 2D processing, we could envision adding such an option! We can also add the option only in the case of a 3D input image. |
Having such a standard "Apply to Stack" option would also make the scripting much easier because you can just iterate through the stack and run it on each slice instead of having to pull out slices one by one and make a new output stack. For anyone who stumbles on this thread and needs a way to do this in the macro, here is a small example to make this work for a stack where you only want 2D connectivity for each slice (e.g. time series):
|
I often deal with stacks of time series data, where I am segmenting and cleaning segmentations for each frame sequentially. If I would like to keep or remove a largest region for each slice, MorphoLibJ automatically does the labeling in 3D. It would be nice if one could choose to do this in 2D slice-by-slice for a timeseries. That would save a lot of work having to go through the stack and pull out individual frames to do this. Thanks!
The text was updated successfully, but these errors were encountered: