pylinac icon indicating copy to clipboard operation
pylinac copied to clipboard

CBCT HU Uniformity auto slice detectionn

Open crcrewso opened this issue 4 years ago • 5 comments

Describe the bug Catphan 604 HU Slice not correctly picking center of module

To Reproduce Steps to reproduce the behavior:

  1. How Do I provide you my dataset?
  2. Run Catphan 604 analysis with defaults according to documentation

Expected behavior The slice width wires should show in the center of the blue detection regions

Screenshots CT_m011_d30_Head_result_hu It's hard to see but the slice width wires are at the edges of the detection region, looks like the slice selected was too close to the air region of the phantom CT_m01_d14_Pelvis_result_hu This is consistent over a wide selection of our datasets.

This issue is probably also contributing to our inconsistent measured slice width

crcrewso avatar May 19 '20 17:05 crcrewso

Yeah looks like an incorrect assessment of the central 404 slice. Upload your dataset here: https://www.dropbox.com/request/YKRu4AmuPsXu55uQq761

jrkerns avatar May 20 '20 01:05 jrkerns

So after looking at this dataset and a few others, the 604 appears to have a inconsistency with the other modules. The HU cylinders of the 604 are longer than the extent of the wire ramps. After stepping through the slices, the HU rois appears first, and then a few slices later the wire ramps start.

Unfortunately, it's not a straightfoward fix. I can apply a correction to the HU slice position for 604 scans but it's pretty hacky and fragile.

jrkerns avatar May 22 '20 20:05 jrkerns

I would like to see two ways forward, could you post the hacky way for me to get through some clinical analysis that is somewhat time dependent, then we can get to testing the ultimate non-fragile solution for mainline integration.

crcrewso avatar May 24 '20 12:05 crcrewso

The hacky way is to modify this line of code: https://github.com/jrkerns/pylinac/blob/master/pylinac/ct.py#L1026

You can either directly replace it with (based on my experience so far with a few datasets): hu_slices = np.array(hu_slices[2:]) # drop the first two indices where the ROIs are present but not wire ramps but this will change the behavior for all analyses. If you're using multiple catphans then you'd need to add something like an if statement for the 604 right above that line: if isinstance(self, CatPhan604): hu_slices = hu_slices[2:]

On Sun, May 24, 2020 at 7:58 AM crcrewso [email protected] wrote:

I would like to see two ways forward, could you post the hacky way for me to get through some clinical analysis that is somewhat time dependent, then we can get to testing the ultimate non-fragile solution for mainline integration.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jrkerns/pylinac/issues/289#issuecomment-633227328, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEUWCFFVVWHEFW56IQ4WGTRTEKWRANCNFSM4NFGFDNA .

jrkerns avatar May 24 '20 13:05 jrkerns

Great, Right now we're using just the one phantom. I'll confirm the thickness with the manufacturing specs. Do you think the following ultimate solution might be stable

if (is 604) STh = slice thickness index = inset distance / STh hu_slices = hu_slices[index:]

crcrewso avatar May 24 '20 14:05 crcrewso