Skip to content
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

Surface Area complains that axis calibrations are different when they are the same #260

Open
mdoube opened this issue Jun 11, 2020 · 3 comments
Assignees
Labels

Comments

@mdoube
Copy link
Member

mdoube commented Jun 11, 2020

Describe the bug
Surface Area always complains that axis calibration is different even when it is the same, then returns an uncalibrated surface area.

To Reproduce
Steps to reproduce the behavior:

  1. Open a 3D binary image with isotropic pixel spacing
  2. Run Plugins > BoneJ > Surface Area
  3. Note the warning message and uncalibrated result

Expected behavior
Surface Area runs without a warning and returns a calibrated result

Context
Seems to be in this method. All its tests pass, but there isn't a test for "axis calibrations are the same and no warning is shown"

static <T extends AnnotatedSpace<CalibratedAxis>> boolean

@mdoube mdoube added the bug label Jun 11, 2020
@rimadoma rimadoma removed their assignment Jun 11, 2020
@mdoube
Copy link
Member Author

mdoube commented Jun 12, 2020

There is a better way to do this which is to multiply the x, y, z coordinates of the surface mesh vertices by pixel width, height and depth just prior to calculating the cross product. The area produced will be calibrated and can handle any anisotropy.

It would still be helpful to know whether the units of each axis are different, (e.g. pixels in z but mm in xy), although that is not possible in ImagePlus Calibration, it might be in ImageJ2-land. If units are indeed different then that would be a user thing to fix - too hard to do all the possible conversions.

@mdoube
Copy link
Member Author

mdoube commented Jun 12, 2020

Hi @ctrueden, could you please point to where meshes are actually made in the Ops? I get stuck in Interfaces when F3-ing through method calls in Eclipse, and never seem to get to the meat of the code where the work is done. Ideally the mesh would be calibrated using the input image's calibration (so that the vertex positions are in real units), so that no further calibration is required.

@mdoube
Copy link
Member Author

mdoube commented Jun 15, 2020

This issue is closely related to and will largely be addressed by fixes to #234 , in which calibrated surface meshes will be produed by the Op.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants