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

CT Metadata access #534

Open
crcrewso opened this issue Dec 18, 2024 · 2 comments
Open

CT Metadata access #534

crcrewso opened this issue Dec 18, 2024 · 2 comments

Comments

@crcrewso
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, analysis of CT/CBCT is impacted by uncertainty in the energy and current used for the data collection.

Describe the solution you'd like
I would like to be able to retrieve the DICOM header of the central slice for any CT/CBCT dataset as a property.

Additional context
I am unsure if it would be best to:

  • add the full DICOM metadata to the main property, this could be problematic if it is called before analyze()
  • add it as a value to the results_data object,
  • create a list of the properties of interest and add that subset only
crcrewso added a commit to crcrewso/pylinac that referenced this issue Dec 19, 2024
@jrkerns
Copy link
Owner

jrkerns commented Dec 30, 2024

The DICOM tags are available in the dicom_stack object. If you know the slice ahead of time you can access individual slices by doing:

ct = CatPhan504.from_demo_images()
print(ct.dicom_stack[11].metadata.Exposure)

You could do the same after analysis by doing:

ct = CatPhan504.from_demo_images()
ct.analyze()
data = ct.results_data()
print(data.origin_slice)
print(ct.dicom_stack[data.origin_slice].metadata.Exposure)

@crcrewso
Copy link
Contributor Author

I can see how that would work and that I was missing a specific detail in my original post.
There's no corresponding key for the results_data(as_dict=true)

Do you have an idea for how we could add these parameters to the results_data dict object easily and consistently?

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

2 participants