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

Spherical coordinates & 3-vectors: Fill value #72

Closed
Lestropie opened this issue Oct 7, 2022 · 2 comments
Closed

Spherical coordinates & 3-vectors: Fill value #72

Lestropie opened this issue Oct 7, 2022 · 2 comments

Comments

@Lestropie
Copy link
Collaborator

For these two representations, the number of volumes in the 4D image must be set based on the maximal number of fixels in any voxel. This means that many voxels may have less than this number of fixels. The specification needs to state what data should be present in the image in such cases.

For 3-vectors and spherical coordinates that include an amplitude term, zero-filling is moderately safe, but only if the measure being encoded in the amplitude can be reasonably interpreted as "0 == absent", which may not be the case in all circumstances. For spherical coordinates without amplitudes, no such capability exists.

I think I would advocate that any absent fixels should be NaN-filled, regardless of representation.

@Lestropie
Copy link
Collaborator Author

Lestropie commented Apr 8, 2024

Commenting here rather than in a code-linked comment thread in #90 for better separation of concepts & provenance.

Initially in #90 the demand of zero-filling was added in 5dd412c. However this demand was repeated in multiple instances, as there are multiple data representations that may necessitate the use of filling. b336fa6 changes the required fill value to be NaN. However the intent of my comment was perhaps a little broader:

  • Rather than repeating the required fill information for every data representation that may necessitate the use of filling, I would advocate for a singular statement in an appropriate location, stating that some representations may involve absent data, give a list of such representations, and that this must be filled appropriately.

  • Rather than an enforced fill value for absent data, I would consider the prospect of permitting the fill value to be specified in metadata. I've seen data using either 0.0 or NaN, for fixel data / image intensity data / non-linear transform data, so maybe permitting the specification of such in metadata rather than enforcing a particular value would inconvenience less people. NaN could still be the default if that metadata field is not specified, as it's least ambiguous.
    Would be worth cross-checking with the rest of the BIDS ecosystem to see if there's any relevant precedent.

@Lestropie
Copy link
Collaborator Author

Have added "OrientationEncoding"["FillValue"] metadata field in #92.

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

1 participant