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

Multi volume #47

Merged
merged 17 commits into from
Jun 17, 2021
Merged

Multi volume #47

merged 17 commits into from
Jun 17, 2021

Commits on Mar 13, 2021

  1. General idea of kernel

    Changed the function parameters and handled declaration of CUDA textures
    
    Next steps are:
    - modify Projector initialization to reflect changes to kernel
    - see if total_area_density[...] array is needed
    - macro-ify the places in the kernel that involve repeating a step for each of the volumes
    mmjudish committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    9ef1a26 View commit details
    Browse the repository at this point in the history
  2. Projector wrapper complete?

    Moved the SingleProjector functionality to Projector class
    mmjudish committed Mar 13, 2021
    Configuration menu
    Copy the full SHA
    57c7949 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2021

  1. Fixed CUDA compilation errors? Working on wrapper

    The CUDA at least compiles.  Currently, the self.minPointX_gpu, etc. is giving me errors about "pycuda._driver.LogicError: cuMemcpyHtoD failed: invalid argument"
    mmjudish committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    50a6d00 View commit details
    Browse the repository at this point in the history
  2. A new bug

    I don't get it.  Why didn't this cuda.memcpy_htod(...) bug show up earlier?  I've been using memcpy_htod(...) for a while.
    
    Traceback (most recent call last):
      File "example_projector.py", line 117, in <module>
        main()
      File "example_projector.py", line 92, in main
        images = projector.project_over_carm_range(
      File "C:\git\deepdrr\deepdrr\projector\projector.py", line 317, in project_over_carm_range
        return self.project(*camera_projections)
      File "C:\git\deepdrr\deepdrr\projector\projector.py", line 195, in project
        cuda.memcpy_dtoh(int(self.sourceX_gpu) + (4 * vol_id), np.array([source_ijk[0]]))
    Boost.Python.ArgumentError: Python argument types in
        pycuda._driver.memcpy_dtoh(int, numpy.ndarray)
    did not match C++ signature:
        memcpy_dtoh(class pycudaboost::python::api::object dest, unsigned __int64 src)
    mmjudish committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    132a568 View commit details
    Browse the repository at this point in the history
  3. Caught the typos

    Results:
    1. For single volume-case, results differed BARELY for [phi=90,theta=0] and [phi=90,theta=60] -- three and one miniscule pixel regions, respectively.
    2. For the three-volume case, this branch performed pretty badly.  The errors are probably from the wrapper code (?), since that's the main difference between the single-volume and three-volume case
    mmjudish committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    9ae0156 View commit details
    Browse the repository at this point in the history
  4. Bug update

    The output for the single-volume case looks like the desired output, but really zoomed in on the central cube.  I have determined that the {minAlpha, maxAlpha} are correct by comparing the values at pixel (600,400), a pixel that shows up in the central cube for the alpha branch.
    mmjudish committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    58dadf5 View commit details
    Browse the repository at this point in the history
  5. Testing update

    Confirmed that if we omit the portion of code in the "last segment" calculation, this code is equivalent to the alpha branch IN THE SINGLE VOLUME CASE.
    
    Have not tested the multi-volume case.
    mmjudish committed Mar 15, 2021
    Configuration menu
    Copy the full SHA
    cc4e7f3 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2021

  1. Configuration menu
    Copy the full SHA
    ceb9158 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2021

  1. More bugs

    When splicing volumes of the same material, the boundary between them it pretty obvious, even when it should be invisible.  For example, consider the following two-volume scenario:
      ____________
    /___/___/___/|
    |___|___ |___| |
    |___|___ |___| |
    |___|___ |___|/
    
    and we define the volumes:
    - volume0: all boxes, all soft tissue
    - volume1: the central box, all soft tissue
    
    The boundary between the volumes appears darker than the surrounding pixels, even though the materials are the same.  This happens regardless of whether the input is:
    - [(volume0, 0), (volume1, 0)], or
    - [(volume0, 1), (volume1, 0)]
    mmjudish committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    eb7ba5c View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Changed the UI

    Priorities "switch" is now separate from the volumes "switch".
    
    Also established that the boundary artefact effect has something to do with the interpolation at the boundary.
    mmjudish committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    13ba938 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2021

  1. Almost done

    Code works (multi-volume has that artefact), but some TODOs left.
    
    Consult with Benjamin about what to do with the Projector.volume function
    mmjudish committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    f1907d3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c39372 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. De-macro-ifying

    mmjudish committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    90ee3ce View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    88b3afa View commit details
    Browse the repository at this point in the history
  3. Fix stupid error

    mmjudish committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    335f02a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6cb2a95 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. Configuration menu
    Copy the full SHA
    a5103a7 View commit details
    Browse the repository at this point in the history