Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[ENH] Add
res
andden
keywords to indicate resolution of resampled data #301[ENH] Add
res
andden
keywords to indicate resolution of resampled data #301Changes from 2 commits
dda7aca
e10f451
3a85c0a
5ec2bf6
a428a91
542ad99
9e4e384
c3213e6
9cdeea8
b071ebb
ea3183a
6f21533
68c9981
13b1d76
46d577c
c8dd017
7df0899
0bbef9d
501c889
c56fad6
785c8cd
d484416
8f834c7
591f0a5
4002ab4
0b99b7c
bb94c0b
f60de90
e7f6341
b874e08
d518933
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our usual way to disambiguate entities is something like:
res-1_bold.json
:res-2_bold.json
:The switch to a dictionary indexed by strings doesn't appear to be justified anywhere in the proposed text. And for resolution, if it's an index, should it not be an integer, rather than a string of digits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very happy to elaborate more on this:
Why an index: to allow developers to impose an explicit ordering. However, I would agree with alternatives such as
res-high
,res-low
,res-mid
... but that vocabulary would be very limited. I wouldn't allowres-2x2x2
for various reasons. First is that very often we will need decimals andres-07x07x07
seems like a recipe for disaster. Second, file formats generally address this issue, so it gives plenty of room for the discrepancy between this value and what you find in the file's header. To me, the index solution seemed easy.However, to allow human-readable descriptions in the JSON file, they need to be converted to string indexes for the dictionary (JSON does not allow integer keys, does it?).
I can add your metadata proposal (i.e., not using a dict because the relationship between JSON and object is univocal), but I would not eliminate the dictionary option because that allows you to place the metadata at a higher level of the hierarchy (ie., describe res-1 and res-2 in the same, unique file).
I like the idea of free-form descriptions of each index. The rationale is that - software should read the actual resolution (and units, which seem to be of concern) from the file format. Humans, however, might check quickly this description field without the need of opening the file (e.g.,
nib-ls
for niftis with nibabel). I would be very happy to change my mind if a better idea is proposed, or improving this PR with a better description of the current proposal - which seems necessary at this point.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MNI305 seems to be shoehorning the
Space
orCoordinateSystem
metadata flag in here. If I understood correctly, the point was to dissociate space from sampling.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - would limit the description to "1mm isotropic"
Aside: we have any example/suggestions for what to use for 0.9mm or 0.7mm (this is a pretty common one for anat data)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@effigies - I agree it is a bad example, not so sure it really shadows
Space
orCoordinateSystem
. Probably something like "Matches MNI305 1mm isotropic resolution" would be better. For the sake of clarity, I'll get MNI305 out of the way. Will fix soon.@edickie I'll add an example for that. BTW it is important to note that res/den are only to be present if necessary (because several resolutions or densities are generated).