Git Product home page Git Product logo

Comments (7)

hemmer avatar hemmer commented on May 26, 2024 2

Updated notebook here:

https://gist.github.com/hemmer/a5e1aea1bccaa2aa89dba5df93ffd8ca

from deepdrr.

mathiasunberath avatar mathiasunberath commented on May 26, 2024

Based on what I see in your second set of examples, it's working as expected. If you look at it's edges parallel to the principle ray of the C-arm, you will see the divergent beam effect exactly as you describe it.
There do seem however to be other things going on also, because a SID of 100 is very different from a SID of 1600 - clearly, very differently sized objects will fit in there, however, your objects always fill around the same space in these simulations. Thus, there is something else going on at the same time.

from deepdrr.

hemmer avatar hemmer commented on May 26, 2024

Based on what I see in your second set of examples, it's working as expected. If you look at it's edges parallel to the principle ray of the C-arm, you will see the divergent beam effect exactly as you describe it.

Just to clarify in case you missed it the second set of examples is with a different library (diffdrr).

There do seem however to be other things going on also, because a SID of 100 is very different from a SID of 1600 - clearly, very differently sized objects will fit in there, however, your objects always fill around the same space in these simulations. Thus, there is something else going on at the same time.

I think in the DiffDRR library there is an implicit linear scaling of the detector real world size with SDR. If this is corrected/undone then you get the behaviour you'd expect I think:

image

from deepdrr.

benjamindkilleen avatar benjamindkilleen commented on May 26, 2024

Looking at your minimal example, my first instinct is that you are not positioning the C-arm correctly. There are two variables at play here: source_to_detector_distance and source_to_isocenter_distance, as well as the placement of the virtual C-arm isocenter. If you double the SDR, be sure to double the isocenter distance as well. Thus you might be getting secondary effects from the phantom being in different places than you expect it.

from deepdrr.

hemmer avatar hemmer commented on May 26, 2024

Thanks for your help, scaling source_to_isocenter_vertical_distance linearly with sdr achieves the effect I was expecting. I'll update this thread with an updated notebook, then close the issue.

from deepdrr.

fedeface98 avatar fedeface98 commented on May 26, 2024

Hello @hemmer,

Can I ask you why in the function Volume.from_parameters you put anatomical_coordinate_system=None and world_from_anatomical=None ?

Thanks for sharing your notebook!

from deepdrr.

benjamindkilleen avatar benjamindkilleen commented on May 26, 2024

I can comment on what this would do.

anatomical_coordinate_system only needs to be set when interacting with annotations. It is meant to avoid a situation where one volume was loaded from a NRRD file in LPS coordinates and another from a NIFTI file in RAS coordinates. It's usually set automatically when using the from_FORMAT loaders.

world_from_anatomical=None simply sets this to the identity transform, so the world frame is the same as the anatomical frame.

from deepdrr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.