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

vol.load_dicom() implementation #30

Merged
merged 8 commits into from
Apr 5, 2021

Commits on Mar 26, 2021

  1. Remove parentheses from Macro

    The parenthesis in the macro UPDATE and INTERPOLATE
    are causing problems when compiling on windows.
    See arcadelab#26
    for more details.
    Maximilian Rohleder authored and Maximilian Rohleder committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    8f45483 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. Started implementing from scratch

    The computation of lps_from_ijk turned out to be harder
    than anticipated. Reason for that is the immensely complex
    and horribly covered dicom standard. Trying to use nibabel
    next to outsource all the error handling to another lib.
    Maximilian Rohleder authored and Maximilian Rohleder committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    36a2025 View commit details
    Browse the repository at this point in the history
  2. Outsourcing lps_from_ijk

    Using nibabel.nicom.dicomwrappers.MultiframeWrapper to
    construct the affine transform from the available dicom
    tags.
    
    Evidently this is complex enough to _not_ maintain it
    in this project. See this post to get a feeling for the
    complexity: https://nipy.org/nibabel/dicom/dicom_orientation.html#defining-the-dicom-orientation.
    The used class warns, that the exposed functionality
    is not well tested. I will verify that it works with
    our datasets.
    Maximilian Rohleder authored and Maximilian Rohleder committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    2036aef View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. Reconsidered. Back to Manual

    Using nibabel.nicom.dicomwrappers.MultiframeWrapper seems
    not as well fitting as expected. The class was conceptualized
    for phillips dicoms and there seems to be a non-trivial
    difference.
    
    Decided to implement the affine transform computatio from scratch
    following these resources:
    
    https://nipy.org/nibabel/dicom/dicom_orientation.html#defining-the-dicom-orientation
    https://mrohleder.medium.com/coordinate-systems-in-medical-data-science-a-rant-90394f60b27
    https://github.com/nipy/nibabel/blob/master/nibabel/nicom/dicomwrappers.py
    Maximilian Rohleder authored and Maximilian Rohleder committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    e7f87e3 View commit details
    Browse the repository at this point in the history
  2. Add description and remove parameter

    Same number of parameters as from_nifti() now.
    Maximilian Rohleder authored and Maximilian Rohleder committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    814d6a6 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2021

  1. Change data layout in memory

    The difference in indexing between dicom and this
    framework were previously dealt with in the affine
    matrix by switching the columns of i and j.
    
    Now, we change the internal layout of the supplied
    volume prior after loading and leave the affine
    transform untouched.
    Maximilian Rohleder authored and Maximilian Rohleder committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    06d355e View commit details
    Browse the repository at this point in the history
  2. Removed unnecessary import and minor refactoring

    Grouped the dicom tags by per-frame and per-slice attributes for
    better readability.
    
    Removed not needed InvalidDicomError import.
    maxrohleder committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    63163ad View commit details
    Browse the repository at this point in the history
  3. Remove CUDA commit from this pull-request

    The parentheses in the CUDA kernel are a different topic and should
    be dealt with in a seperate thread. Removing that commit from the
    history of this branch.
    
    This reverts commit 8f45483.
    maxrohleder committed Apr 3, 2021
    Configuration menu
    Copy the full SHA
    8425b6e View commit details
    Browse the repository at this point in the history