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

SNC Advanced Electron Density analysis #496

Open
SafirZouzout opened this issue May 31, 2024 · 0 comments
Open

SNC Advanced Electron Density analysis #496

SafirZouzout opened this issue May 31, 2024 · 0 comments

Comments

@SafirZouzout
Copy link
Contributor

Describe the bug

The SNC Advanced Electron Density phantom analysis doesn't seem to work. I saw that you needed data to improve the Cheese module so I sent the dicoms here
I believe that the issue might be because this is not the right phantom. When clicking on the link on the pylinac doc this leads to this page but I suspect that the class is designed for this phantom

To Reproduce

I used the following code:

from pylinac import CIRS062M
cheese_folder = r"my_path"
cheese = CIRS062M(cheese_folder)
cheese.analyze()
cheese.plot_analyzed_image()

and got the following message

Detected shift of 8.554868624420408 was >5 degrees; automatic roll compensation aborted. Setting roll to 0.

Expected behavior

Correct placement of the ROIs

Screenshots

CIRS_marche_pas

Additional context

I wrote this that gives some results, feel free to use it in pylinac if it can be of any help. I know this might not be the place to write some code but I don't feel very confident sending merge requests as I'm not very good at coding.

from pylinac.cheese import CheeseModule
from pylinac.cheese import CheesePhantomBase

class GammexModule(CheeseModule):
    common_name = 'Gammex'
    roi_settings = {
        "1": {
            "angle": 0,
            "distance": 0,
            "radius": 14.3,
        },
        "2": {
            "angle": 0,
            "distance": 37.5,
            "radius": 14.3,
        },
        "3": {
            "angle": 0,
            "distance": 75,
            "radius": 14.3,
        },
        "4": {
            "angle": 45,
            "distance": 75,
            "radius": 14.3,
        },
        "5": {
            "angle": 90,
            "distance": 75,
            "radius": 14.3,
        },
        "6": {
            "angle": 135,
            "distance": 75,
            "radius": 14.3,
        },
        "7": {
            "angle": 180,
            "distance": 75,
            "radius": 14.3,
        },
        "8": {
            "angle": 225,
            "distance": 75,
            "radius": 14.3,
        },
        "9": {
            "angle": 270,
            "distance": 75,
            "radius": 14.3,
        },
        "10": {
            "angle": 315,
            "distance": 75,
            "radius": 14.3,
        },
        "11": {
            "angle": 0,
            "distance": 140,
            "radius": 14.3,
        },
        "12": {
            "angle": 45,
            "distance": 140,
            "radius": 14.3,
        },
        "13": {
            "angle": 135,
            "distance": 140,
            "radius": 14.3,
        },
        "14": {
            "angle": 180,
            "distance": 140,
            "radius": 14.3,
        },
        "15": {
            "angle": 225,
            "distance": 140,
            "radius": 14.3,
        },
        "16": {
            "angle": 315,
            "distance": 140,
            "radius": 14.3,
        },
    }

class GammexPhantom(CheesePhantomBase):
    model = "Advanced Electron Density Phantom"
    air_bubble_radius_mm=14
    localization_radius = 75
    min_num_images=15
    catphan_radius_mm= 164.3
    module_class = GammexModule
    module: GammexModule

swiss= GammexPhantom(r"dicoms_folder_path")
swiss.analyze()
swiss.plot_analyzed_image()
print(swiss.results())
swiss.publish_pdf(filename=r"gamex\lepdf.pdf")

analyse_gammex_image

jmartens added a commit to jmartens/pylinac that referenced this issue Oct 30, 2024
This corrects the link in the documentation to link to the correct phantom

refs: jrkerns#496
jrkerns added a commit that referenced this issue Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant