GSTT-CSC / hazen

Quality assurance framework for Magnetic Resonance Imaging
https://github.com/GSTT-CSC/hazen
Apache License 2.0
22 stars 11 forks source link

Centroid may be slightly off with some Siemen's data #452

Open luissantosHCIT opened 2 weeks ago

luissantosHCIT commented 2 weeks ago

Disclaimer If it has not been said before, excellent work! The architecture also matches the Unix philosophy and it is how I approach most of my own software. I think it is really good and you should be proud!

Describe the bug Running hazen acr_geometric_accuracy <siemens_dataset> yields results with off-centered arrows. The scanner is a Siemens 1.5T Magnetom Sola Fit. The acquisition matrix is 0\256\192\0. We have two phantoms and the one used here has the plate for slice 5 instead of the grid. See screenshots below! Per our internal QA, the phantom's positioning should not be the main source of error here. It seems the centroid accuracy is key for several of the ACR tasks which can add small errors to their results.

To Reproduce Run utility against Siemens phantom data using an equivalent phantom to the one shown below.

Expected behavior I expected to see arrows go through most of the holes on the plate.

Screenshots Siemens result image

After small adjustment to HoughCircles() call to use the HOUGH_GRADIENT_ALT as described in here. image

Desktop (please complete the following information):

Tentative Solution I did some digging into the documentation and found that the HoughCircles() function has an alternative mode of detection controlled by the HOUGH_GRADIENT_ALT flag. I did a brief control test with the other phantom which was scanned with a Philips scan and changing the flag did not appear to have an adverse effect on that other data. However, it vastly improved the accuracy of the centroid for the phantom data shown in this ticket. Since I am new to the project how would you like me to contribute my change? Would you like me to open a PR against a feature branch? How do you normally run your tests? I will be happy to prepare a PR and do some more testing for you.

I am going to try and find details as to what the alternative detection method is and how it differs from the default detection algorithm.

In the meantime, let me know how I can make my first contribution to the project. Thank you!

luissantosHCIT commented 2 weeks ago

Per https://docs.opencv.org/4.x/dd/d1a/group__imgproc__feature.html#gga073687a5b96ac7a3ab5802eb5510fe65aad57c72131c801de427f1fdb55c8c8ad

image