Spine Registration ExampleΒΆ

The following workflow shows how to use the scripts within this directory to register a spine image with the option to supply landmark points.

[3]:
import os
[6]:
# fname_I = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/interpolated_atlas.npz'
# fname_L = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/interpolated_atlas_labels.npz'
# fname_J = '/home/dtward/Documents/UCLA/dong/spine_registration_2025/Spine_Reflection.npz'
# pointsJ_file = '/qnap/Spine_Registration/spine4_image_with_reflection/Spine_4_Morphh_Central_Canal.swc'

fname_I = '/nafs/dtward/spine_work/interpolated_atlas.npz'
fname_L = '/nafs/dtward/spine_work/interpolated_atlas_labels.npz'
fname_J = '/nafs/dtward/spine_work/Spine_Reflection.npz'
pointsJ_file = '/nafs/dtward/spine_work/Spine_4_Morphh_Central_Canal.swc'

fname_script = '/home/abenneck/Desktop/spine_registration/spine_reg_pipeline.py'
outdir = '/home/abenneck/Desktop/spine_outputs'
e_path = '/home/abenneck/Desktop/emlddmm'
command_str = f'python3 {fname_script} {fname_I} {fname_L} {fname_J} {pointsJ_file} {outdir} {e_path} -niter 5 -v'

if False:
    os.system(command_str)
[10]:
# import sys

# sys.path.insert(0, str(Path('..', 'src').resolve()))
# sys.path