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

affines and dimensions #74

Closed
satra opened this issue Nov 4, 2021 · 3 comments
Closed

affines and dimensions #74

satra opened this issue Nov 4, 2021 · 3 comments

Comments

@satra
Copy link

satra commented Nov 4, 2021

if i may make one comment that we allow affines back as transformation. but optional and if included then translation and scale should not be used. for some of our use cases it would be really nice to be able to include the affine in the dataset itself rather than separately. we can wait till the next iteration of the spec, but if there are no objections that affines will also be axisIndices or dimension compliant, i don't see a reason why including it would be difficult.

let me first start with dimensions. at present it is time, channel, shape, shape, shape. while time can cover many aspects, we may want to include something like slice, channel, shape, shape, shape for 3d imaging, where we take a 3d tissue and slice it into thinner slices and then put them together as a single dataset.

this has a few additional requirements and this is where the affine part comes in. although a computed transform, it may be helpful to align these slices in 3D space. also we may have missing slices or uneven spacing. thus having affines be associated with each slice could be helpful.

in out practical use case, we have stains, not channels. so our dimensions would be:

slice, stain_index, shape, shape, shape, chunk

where chunks are partially overlapping acquisitions. chunks would be dropped if the images were prestitched.

in this use case, the affines could be associated with different slices and potentially chunks. for simplicity let's leave chunks aside.

then our transformations would be a list of affines for each slice [ aff1, aff2, ....] where the axisIndices would be [2,3,4] and the aff* would be [4x4] since axisIndices is of length 3.

thus there are a few requests here.

  1. that we allow arbitrary dimensions
  2. list of affines as transformations. since each slice could have been arbitrarily rotated and flipped (front to back) having a computed affine could really help place all the pieces together
  3. additional metadata to situation the coordinate system better w.r.t some physical property of the sample by defining a global origin.

this figure may help visualize the situation: https://scalablebrainatlas.incf.org/human/BIGB13

cc: @thewtex

@constantinpape
Copy link
Contributor

Thanks for bringing this up @satra. I will take a closer look at this once we have merged #57.
Please also note that there are some discussions about affines and the associated pitfalls in #63 already.

@thewtex
Copy link
Contributor

thewtex commented Nov 10, 2021

It seems that we are progressing towards addressing this use case.

@constantinpape
Copy link
Contributor

I will close this in favor of the transformation proposal that's taking shape in #94. Would be great to get your input there @satra. Feel free to reopen this one if you think something here is especially relevant.

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

No branches or pull requests

3 participants