update wlutz notebook
"# Experimental!\n",
"\n",
"**Disclaimer**: All pixel size extraction code is a first pass **guess**.\n",
- "I do not have access to a Varian Linac, the numbers here were chosen\n",
- "with no experience."
+ "I do not have access to a Varian Linac."
]
},
{
"\n",
"import IPython.display\n",
"\n",
- "import pydicom\n",
- "\n",
+ "import pydicom"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!pip install pymedphys==0.19.0dev0"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
"import pymedphys\n",
"import pymedphys._wlutz.core\n",
"import pymedphys._wlutz.reporting\n",
"import pymedphys._vendor.pylinac.winstonlutz"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pymedphys.__version__"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"\n",
" plt.title('Pylinac v2.2.7 Filter and Scikit-Image Method')\n",
" except Exception as e:\n",
- " print(e)"
+ " print(e)\n",
+ " \n",
+ " return np.array(field_centre) - np.array(bb_centre)"
]
},
{
"for img, coll, gantry in zip(scaled_images, colls, gantries):\n",
" display_markdown(f'## Gantry {coll} | Collimator {gantry}')\n",
" \n",
- " analysis(x, y, img, coll)\n",
+ " deviation = np.round(analysis(x, y, img, coll), 2)\n",
+ " display_markdown(\n",
+ " f'PyMedPhys field centre - BB centre (mm):\\n\\n```python\\n[x, y] = [{deviation[0]}, {deviation[1]}]\\n```'\n",
+ " )\n",
" plt.show()"
]
}
],
"metadata": {
"kernelspec": {
- "display_name": "pymedphys-master",
+ "display_name": "Python 3",
"language": "python",
- "name": "pymedphys-master"
+ "name": "python3"
},
"language_info": {
"codemirror_mode": {
