{ "cells": [ { "cell_type": "markdown", "id": "0a30a029-f85b-48bd-adfe-02a318b84611", "metadata": {}, "source": [ "# Spine Registration Example \n", "\n", "The following workflow shows how to use the scripts within this directory to register a spine image with the option to supply landmark points." ] }, { "cell_type": "code", "execution_count": 3, "id": "0fde6ba6-85a5-4277-a9ee-60474b91ba02", "metadata": {}, "outputs": [], "source": [ "import os" ] }, { "cell_type": "code", "execution_count": 6, "id": "d17209bf-3a7e-4950-813e-75e3f4244ece", "metadata": { "scrolled": true }, "outputs": [], "source": [ "# fname_I = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/interpolated_atlas.npz'\n", "# fname_L = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/interpolated_atlas_labels.npz'\n", "# fname_J = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/Spine_Reflection.npz'\n", "# pointsJ_file = '/qnap/Spine_Registration/spine4_image_with_reflection/Spine_4_Morphh_Central_Canal.swc'\n", "\n", "fname_I = '/nafs/dtward/spine_work/interpolated_atlas.npz'\n", "fname_L = '/nafs/dtward/spine_work/interpolated_atlas_labels.npz'\n", "fname_J = '/nafs/dtward/spine_work/Spine_Reflection.npz'\n", "pointsJ_file = '/nafs/dtward/spine_work/Spine_4_Morphh_Central_Canal.swc'\n", "\n", "fname_script = '/home/abenneck/Desktop/spine_registration/spine_reg_pipeline.py'\n", "outdir = '/home/abenneck/Desktop/spine_outputs'\n", "e_path = '/home/abenneck/Desktop/emlddmm'\n", "command_str = f'python3 {fname_script} {fname_I} {fname_L} {fname_J} {pointsJ_file} {outdir} {e_path} -niter 5 -v'\n", "\n", "if False:\n", " os.system(command_str)" ] }, { "cell_type": "code", "execution_count": 10, "id": "30429790-b780-430c-93b6-48a3f075c2b6", "metadata": {}, "outputs": [], "source": [ "# import sys\n", "\n", "# sys.path.insert(0, str(Path('..', 'src').resolve()))\n", "# sys.path" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 5 }