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

fix anatomical orientation of CCF #48

Closed
dyf opened this issue Nov 30, 2018 · 2 comments
Closed

fix anatomical orientation of CCF #48

dyf opened this issue Nov 30, 2018 · 2 comments
Labels
qa: biccn Issue (resolved) -> Kitware (QA done), biccn (QA in progress) Type: Bug Something isn't working

Comments

@dyf
Copy link
Contributor

dyf commented Nov 30, 2018

Currently the brain is not oriented correctly. The orientation header in the .nrrd files used for the CCF are incorrect. Please use ASL (x=A-to-P, y=S-to-I, z=L-to-R).

image

@jcfr
Copy link
Collaborator

jcfr commented Dec 1, 2018

In fact, it is PIR (and not ASL)

Currently, data displayed in Slicer are shown in RAS

Showing the data in in expected coordinate frame can be done applying the following rotation matrix (the value were obtained by manually setting the matrix in the transform module with volume rendering enabled):

0 0 1 -1 
1 0 0 0 
0 1 0 0 
0 0 0 1 

Note that the values above can directly be copy-paste in the matrix widget of the transform module in Slicer.

Here is the transformed volume:

image

For reference, here is the original un-transformed volume:

image

Remaining issue is that the direction are inversed, to address this we should look into defining new slice orientation presets. See https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slice_Orientation_Presets

@jcfr
Copy link
Collaborator

jcfr commented Dec 1, 2018

In addition of applying the transform described above, the Coronal preset should be updated from

-1  0  0
 0  0  1
 0  1  0

to

-1  0  0
 0  0 -1
 0  1  0

Updating the existing preset can be done using:

s = getNode("vtkMRMLSliceNodeGreen")
s.DisableModifiedEventOn()
orientationMatrix = vtk.vtkMatrix3x3()
orientationMatrix.SetElement(0, 0, -1.0)
orientationMatrix.SetElement(1, 0,  0.0)
orientationMatrix.SetElement(2, 0,  0.0)
orientationMatrix.SetElement(0, 1,  0.0)
orientationMatrix.SetElement(1, 1,  0.0)
orientationMatrix.SetElement(2, 1,  1.0)
orientationMatrix.SetElement(0, 2,  0.0)
orientationMatrix.SetElement(1, 2,  -1.0)
orientationMatrix.SetElement(2, 2,  0.0)
s.RemoveSliceOrientationPreset("Coronal")
s.AddSliceOrientationPreset("Coronal", orientationMatrix)
s.DisableModifiedEventOff()

jcfr added a commit to jcfr/cell-locator that referenced this issue Dec 1, 2018
@jcfr jcfr added the qa: kitware Issue (resolved) -> Kitware (QA in progress) label Dec 1, 2018
jcfr added a commit that referenced this issue Dec 1, 2018
BUG: Fix anatomical orientation. See #48
@jcfr jcfr added qa: biccn Issue (resolved) -> Kitware (QA done), biccn (QA in progress) and removed qa: kitware Issue (resolved) -> Kitware (QA in progress) labels Dec 1, 2018
@jcfr jcfr closed this as completed Jan 24, 2019
@jcfr jcfr added the Type: Bug Something isn't working label May 30, 2019
jcfr added a commit that referenced this issue Apr 23, 2020
The approach implemented in 49425f9 (BUG: Fix anatomical orientation.
See #48) to ensure that `+x` is `+P` updated the coronal preset.

This commit updates the preset to ensure the left side of the brain
is on the left of the viewers when using the "coronal" reference view.

This commit also  flip the axis label  P and A to match the
PIR convention.

See #101 (comment)
jcfr added a commit that referenced this issue Apr 30, 2020
The approach implemented in 49425f9 (BUG: Fix anatomical orientation.
See #48) to ensure that `+x` is `+P` updated the coronal preset.

This commit updates the preset to ensure the left side of the brain
is on the left of the viewers when using the "coronal" reference view.

This commit also flips the axis label  P and A to match the
PIR convention.

See #101 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa: biccn Issue (resolved) -> Kitware (QA done), biccn (QA in progress) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants