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

Added axes serialization to json for export #126

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

tischi
Copy link
Contributor

@tischi tischi commented Mar 21, 2024

No description provided.

Copy link
Contributor

@btbest btbest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh boy we've had this neat feature sitting around for ages 🤦

I think it looks good - though I didn't bother to actually compile and try it now 😶

ilastik's own hdf5 image export includes two more keys in the axistags json: `

"axes": [
    {
      "key": "y",
      "typeFlags": 2,
      "resolution": 0,
      "description": ""
    },
    //...
]

These are 0 and "" for all axes in the example I exported, so I would assume they are optional.

src/main/java/org/ilastik/ilastik4ij/util/ImgUtils.java Outdated Show resolved Hide resolved
@k-dominik
Copy link
Contributor

k-dominik commented Jun 6, 2024

Thank you for having a look @btbest

regarding your question on missing resolution and description - these are optional (default parameters for AxisInfo construction are in place).

test script
import vigra

atjson = """
{
   "axes":
   [
      {
         "key": "y",
         "typeFlags": 2
      }
   ]
}
"""
print(vigra.AxisTags.fromJSON(atjson)["y"].resolution)

So yes, the current code only adds the axis info required for ilastik to interpret it correctly.

@k-dominik k-dominik merged commit 93a62c2 into ilastik:main Jun 6, 2024
1 check passed
@k-dominik
Copy link
Contributor

thx @tischi!!!

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

Successfully merging this pull request may close these issues.

3 participants