Spine Registration Pipeline

spine_reg_pipeline.main()[source]

Command Line Arguments:

fname_Istr

The path to the interpolated atlas .npz file to be used for registration

fname_Lstr

The path to the interpolated atlas labels .npz file to be used for registration

fname_Jstr

The path to the spine reflection .npz file to be registered

fname_pointsJstr

The path to an .swc file used for more precise registration of J

outdirstr

The directory where all output files should be saved

e_pathstr

The location of the custom Python library ‘emlddmm’, which can be cloned from GitHub at https://github.com/twardlab/emlddmm

-devicestr

Default - cpu; The device where registration computations should occur

-dtypetorch.dtype

Default - torch.float32; The data type used for the voxel values in image registration

-niterint

Default - 5000; The number of iterations to use for image registration

-downlist of int

Default - [8,8,8]; The factor used to downsample along each axis of I, respectively

-blocksizeint

Default - 50; TODO: …

-verbosebool

Default - False; If present, print out several progress messages throughout the registration process

-saveAllFigsbool

Default - False; If present, save every intermediate figure generated before, during, and after registration

-saveIntermediateFigsbool

Default - false; If present, save intermediate figures at each iteration of the registration process

-saveFig0bool

Default - False; If present, save a MIP of the interpolated atlas provided

-saveFig1bool

Default - False; If present, save a MIP of the interpolated atlas labels provided

-saveFig2bool

Default - False; If present, save a scatter plot of all the points labeled in the interpolated atlas porvided

-saveFig3bool

Default - False; If present, save a standard view of the target data along all 3 cardinal axes

-saveFig4bool

Default - False; If present, save a MIP of the target data along all 3 cardinal axes

-saveFig5bool

Default - False; If present, save a standard view of the target data along all 3 cardinal axes

-saveFig6bool

Default - False; If present, save a standard view of the target data along all 3 cardinal axes

-saveFig7bool

Default - False; If present, save a save a scatter plot of all points along the AP axis

-saveFig8bool

Default - False; If present, save a standard view of the qJU object along the AP axis

-saveFig9bool

Default - False; If present, save a save a standard view of the qJU object along the AP axis with points superimposed

-saveFig10bool

Default - False; If present, save a save a standard view of the downsampled target data along all 3 cardinal axes

-saveFig11bool

Default - False; If present, save a save a plot of the xv*xId object

-saveFig12bool

Default - False; If present, save a save a plot of the B object

-saveFig13bool

Default - False; If present, save a color gradient

-saveFig14bool

Default - False; If present, save a color gradient

-saveFig15bool

Default - False; If present, save a color gradient

-saveFig16bool

Default - False; If present, save a color gradient

Raises:

Exception

If any of the 8 input files do not have the correct file extension

Exception

If a negative Jacobian arises during the registration loop