CBCT Analysis Slices

Hey guys,

Is there a way to access which slice is being used for the different analyses? Say, if I wanted to know which specific slice it used for ctp486.rois

Hi,
I am not sure if that answers your question (haven’t tested it), but there is a function find_origin_slice(self) that uses a brute force method to find the phantom origin. The rest of the modules are found by offsets:

https://pylinac.readthedocs.io/en/latest/cbct.html#partial-scans

You can access the origin slice via the origin_slice property of the module. If you add the offset you should get slice you asked for.

with kind regards

Thomas

The slice_num attr

ct = pylinac.CatPhan504.from_demo_images()
ct.analyze()
print(ct.ctp404.slice_num)
print(ct.ctp486.slice_num)
print(ct.ctp515.slice_num)
print(ct.ctp528.slice_num)

Thank you very much. Looking at these slices as I import them into ImageJ it seems like they could be off by a bit. (I’m using 2.2.7 btw)

Does this index start at 0 by any chance such that if I want to look at the same slice in imageJ I should increment the pylinac value by 1?

Indices do indeed start at 0 (normal Python convention). See here: pylinac/image.py at master · jrkerns/pylinac · GitHub If something looks weird then please do share.