Comments (5)
Hi,
Yes, the library currently uses the connectivity withj dimension corresponding to that of the input image.
I am not a big fan of providing too much choices for "low-level" operators; the design strategy is rather to build workflows / encapsulate into macros or more general plugins. Maybe you can build such a macro?
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.
from morpholibj.
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!
from morpholibj.
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...
from morpholibj.
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.
from morpholibj.
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):
//makes a new image with same dimensions as the original
rename("stk");
getDimensions(width, height, channels, slices, frames);
newImage("new", "8-bit", width, height, slices);
//cleans up segmentation for each frame
for (i=1;i<slices+1;i++) {
selectWindow("stk");
setSlice(i);
run("Duplicate...", " ");
rename("curr");
run("Keep Largest Region");
run("Fill Holes", "");
run("Select All");
run("Copy");
selectWindow("new");
setSlice(i);
run("Paste");
run("Select None");
close("curr");
close("curr-largest");
}
from morpholibj.
Related Issues (20)
- MorphoLibJ as a dependency versions conflict HOT 21
- croplabel() , set pixel/voxel size and origin of the cropped image HOT 3
- MorphoLibJ is on bioconda HOT 1
- measurements should contain an additional column with image calibration unit
- Fill holes in labels HOT 4
- Erode labels HOT 4
- Suggestion for Intensity Measurements and Analyze Regions commands HOT 1
- orientation features in 2D have different ranges
- enhance analysis of timelapse images HOT 2
- closing close to image boundary HOT 2
- plugin “Draw Table Values” should be scriptable
- Issue with the ‘Label Edition’ plugin
- Label Morphological Filter: Erosion Operation for touching labels HOT 7
- Remove Border Labels does not work on Virtual stacks
- MorpholibJ Draw Table Value plugin error HOT 1
- Using Distance Transform Watershed without a GUI / UI HOT 6
- "Fill Label Holes" plugin results in full-white image when applied to binary image
- Typo in MorphologicalSegmentation.java HOT 1
- Error when applying opening/closing with an ellipsoid structuring element HOT 4
- add "skeleton geodesic diameter" to "Analyze Regions" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from morpholibj.