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

Rethink some of the header's default attribute values #41

Closed
Enet4 opened this issue Jan 29, 2019 · 3 comments
Closed

Rethink some of the header's default attribute values #41

Enet4 opened this issue Jan 29, 2019 · 3 comments

Comments

@Enet4
Copy link
Owner

Enet4 commented Jan 29, 2019

This was discussed in #40, but I'm filing an issue so that this concern is not forgotten.

  • pixdim should be [1.0; 8] by default.
  • srow_x and other should have an "identity" default.
  • sform_code should be 1 by default IF it's really the normal way to encode the transformation. Maybe qform_code is the way, I don't know,

I believe we're still undecided on what should be the defaults for sform_code and qform_code.

@nilgoyette
Copy link
Collaborator

My colleague @jchoude tells me that we should do:

  • reading
    • Normal case: if either sform_code or qform_code is present (not 0), apply the requested one.
    • Special case: both are present. Standard says nothing about this case but most tools use sform
  • writing: calculate and write the 2 transformations with sform_code = 1 and qform_code = 0. We will have to wait for Affine transformation #22 to do it properly though.

This doesn't directly answer the question, but as I understand it, the default Header should be

  • "identity" in both transformations
  • sform_code = 1
  • qform_code = 0

@jchoude
Copy link

jchoude commented Jan 31, 2019

Just a minor correction, @nilgoyette , the qform_code should also be 1. 0 means that it's not recorded.

@Enet4
Copy link
Owner Author

Enet4 commented Jul 26, 2019

I believe this has been resolved in #56. As usual, this can be brought up again if something is worth rethinking.

@Enet4 Enet4 closed this as completed Jul 26, 2019
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