Judd wrote:
> > you could decide that for each ROI definition the first voxel
> index corresponds to the center voxel.
>
> What if the "intended center" has been pruned?
Indeed, that's one problem, while situation (3) and possibly (2) as described in my post are not covered either. That's why I said it was "not very elegant" and suggested to store sparse ROI masks separate from the functional data these masks refer to.
> > Well, these sparse masks are binary, and therefore in the
> current proposal we don't store the data associated with the
> voxels (why store only ones). Of course you could extend the
> idea to allow for storing data as well, but I'm afraid that
> will complicate things further.
>
> My thought was that the data that describes the mask (i.e. the
> list of sparse coordinates) can be thought of as "data attached
> to the voxel". What I meant was that a program with a different
> purpose could use the format and store data that isn't a mask.
Right, that seems to solve a different problem, namely sparse representation of volume data. This is not so much about storing the mapping from voxels to ROI (you could store that separately), but attaching additional info to each voxel in the ROIs. You could see this as a generalization of the present idea of storing sparse masks, where instead of zero values per voxel (namely, the mere presence of the voxel means it is in the mask) one could have multiple values per voxel. That is definitely possible but would also complicate the file format.
> > Yes it would be, however why add this extra step if we can
> simply store this number at the beginning of the file?
>
> The idea was to generalize the storage of any inhomogeneous
> data that is attached to voxel in a manner that is more general
> than the specific application of storing masks. Programs could
> easily reformat/extract spatial regions etc without
> understanding anything about what's actually represented in the
> data attached to each voxel. For example, it could also allow
> masked fMRI time-series data to be stored more efficiently
> without compression with each voxel's entire time series
> contiguously located in memory/disk.
That would be useful if storing data in a few masks. If I understand you correctly, then for my problem it would yield a large amount of duplication of data (as each voxel may be contained in hundreds of ROIs). For a few ROIs with little overlap it may indeed be more efficient though to use a sparse representation.
best,
Nick