-
Notifications
You must be signed in to change notification settings - Fork 13
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
Some AnalyzeSkeleton detailed branch results are not calibrated #256
Comments
I hope the issue is in how we call AnalyzeSkeleton_, and not in what comes into AnalyseSkeletonWrapper. That is, debugging should start by checking that calibration is OK in the wrapper's ImagePlus Parameter |
It seems like 'branch length' is calibrated but the junction locations and Euclidean distance is not. This may be an inconsistency in the API that we could fix upstream, or else we forgot to apply the calibration downstream. |
We have a winner. This is the relevant section of the parent plugin: extra_rt.addValue(extra_head[3], e.getV1().getPoints().get(0).x * this.imRef.getCalibration().pixelWidth);
extra_rt.addValue(extra_head[4], e.getV1().getPoints().get(0).y * this.imRef.getCalibration().pixelHeight);
extra_rt.addValue(extra_head[5], e.getV1().getPoints().get(0).z * this.imRef.getCalibration().pixelDepth);
|
@rimadoma @alessandrofelder wondering why we wrap the skeleton plugins at all? Not sure there is a particular value in simply repeating the third-party plugin. Only advantage seems to be in cases where there is a single skeleton that the results can be aggregated in the BoneJ result table. Skeletonise is maybe needlessly duplicated? Shouldn't Maven and the updater take care of dependency issues? |
I guess backwards compatibility (scripts that people use that call the BoneJ version, and users that are used to clicking through to the BoneJ version) is another one. But I agree that neither seems like a particularly strong argument. Needs to be weighed up against the time we spend maintaining the plugin? |
I ask because deleting duplicated code is a good way to fix the bugs in it. |
We musn't be scared of breaking people's scripts when we've made such a big move from BoneJ1 to 2. Their scripts will end up being more robust. and not a big fix: switching correctly spelled Analyse to wrongly spelled Analyze is all. (Analyze with a z, I mean, what were they thinking??? One can argue the toss about Skeletonize vs Skeletonise, but Analyze is just wrong.) |
The implementation of ITA uses the unwrapped analyzeSkeleton, so no problems there. To be clean and consistent with our semantic versioning, we should move to BoneJ2 8.0.0 due to an API change? |
Some reasons in no particular order:
I'm not saying any of these are a reason not to remove the wrappers. Just things we need to consider if we decide to do so. |
If we get rid of the wrappers, we could offer our stricter image validation downstream to @iarganda |
Re Python scripting: I don't think it will be a large fix for script users. I think you can call Legacy and other ImageJ1.x stuff via import IJ
IJ.run("Some Command", ...) and Modern plugins (also?) via # @CommandService cs
wrapper = cs.run("org.bonej.wrapperPlugins.EllipsoidFactorWrapper",False,["inputImgPlus",source,"nVectors", vectors, ...])
wrapperInstance = wrapper.get()
outputs = wrapperInstance.getOutput("ellipsoidFactorOutputImages"); I guess if there are many people calling BoneJ's version the Modern way from a script, and the underlying skeletonisation API is Legacy, it's a slightly larger fix. As Michael says, we've changed the API a lot recently anyway, so probably not too bad? 🤷 |
* Calibrate detailed skeleton branch output. Fixes #256 * Remove check that has no effect
* Calibrate detailed skeleton branch output. Fixes #256 * Remove check that has no effect
Describe the bug
Detailed branch information reported by BoneJ's AnalyzeSkeleton and Skeleton option in Particle Analyser is uncalibrated
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Output from BoneJ's calls to AnalyzeSkeleton's methods should exactly match output from AnalyzeSkeleton
Additional context
Reported here:
https://forum.image.sc/t/skeleton-branch-length-producing-zero-values-for-most-of-the-soil-pores-in-bonej2/38505/6
The text was updated successfully, but these errors were encountered: