Closed elevans closed 1 year ago
Patch coverage: 90.62
% and project coverage change: +0.42
:tada:
Comparison is base (
179f482
) 76.93% compared to head (de50af9
) 77.36%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I split this PR from my metadata PR (https://github.com/imagej/pyimagej/pull/247). This PR aims to simply how we assign calibrated linear axes to datasets. Currently we check if
net.imagej.axis.EnumeratedAxis
is available and use that as our first choice. Ifnet.imagej.axis.EnumeratedAxis
is not available, then we fall back tonet.imagej.axis.DefaultLinearAxis
. This is fine for most things, but unfortunately this logic has some unintended consequences. @gselzer informed me that the BoneJ plugin actually checks fornet.imagej.axis.DefaultLinearAxis
and is unable to use thenet.imagej.axis.EnumeratedAxis
. The changes this PR brings are the following:net.imagej.axis.EnumeratedAxis
from the axes assignment logic. While I would like to keep the option to use both, I don't realistically see how a user would indicate they wantEnumeratedAxis
or not. Also if they actually care about that, then it seems likely that they may have enough knowledge to change theCalibratedAxis
type. Are there instances where ImageJ2 will produce anet.imagej.Dataset
withnet.imagej.axis.EnumeratedAxis
? If not, then I think that is another point for dropping this behavior.main
already but I realize it has been passed around from one stale PR to another. Here it is! This change resolves a bug where getting the scale of a singleton dimension fails. This is because we calculate the slope from the dimensions coordinate array. The first two values are used for this math, which of course fails for singleton dimensions because their coordinate array is size1
. Thus all singleton dimensions should have their scale set to1
.update 1
Thanks @gselzer for adding in a good way to have both
EnumeratedAxis
andDefaultLinearAxis
as options based on coordinate array linearity.Things for me to do:
TODO:
update 2
I've added the following changes:
Finally
block and slightly reworked the logic.Finally
was always triggered and replaced theEnumeratedAxis
withDefaultLinearAxis
.DefaultLinearAxis
EnumeratedAxis
DefaultLinearAxis