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

Refactor and improve affine handling in the viewer. #7

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Commits on Oct 6, 2021

  1. Handle affine, reorienting as close to RAS+ as possible

    reorder data axes to RAS before passing onto Napari. This avoids
    potential issues in affine handling:
    napari/napari#3410
    
    We also now drop the non-diagonal (rotation, shear) components from the
    affine, since napari does not currently handle these.
    
    oi
    grlee77 committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    396c10a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7e4ee63 View commit details
    Browse the repository at this point in the history
  3. use SPL ordering so initial view is axial with the brain upright

    patient left will be to the right side of the screen
    (radiological orientation)
    
    verified that for each dimensions, moving the slider to the right moves
    to S, P or L as expected, depending on the visible dimensions
    grlee77 committed Oct 6, 2021
    Configuration menu
    Copy the full SHA
    20a35cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26f9b4f View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2021

  1. Remove erroneous RAS->SPL transform

    update reorder_axes to take a specified target orientation instead of assuming RAS
    Use LPS rather than SPL for now so that affine_plumb[:3, :3] will be diagonal.
    Once appropriate fixes for perfmuted axes have been made to napari, we can switch to SPL
    
    Co-authored-by: Christopher Nauroth-Kreß <56394171+ch-n@users.noreply.github.com>
    grlee77 and Chris-N-K committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    72d6dbb View commit details
    Browse the repository at this point in the history
  2. simplify the reorientation code

    use as_reoriented method as it is more concise and will also update the affine we pass on in the metadata
    
    Co-authored-by: Christopher Nauroth-Kreß <56394171+ch-n@users.noreply.github.com>
    grlee77 and Chris-N-K committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    f26dd62 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    acb5186 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a3fee0f View commit details
    Browse the repository at this point in the history