Closed Lestropie closed 6 months ago
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:
[x] 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.
[x] 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.
Have added "OrientationEncoding"["FillValue"]
metadata field in #92.
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.