Low resolution image to high resolution image registration

High resolution mouse brain image to low resolution mouse brain image registration

This script is intended to be used at the command line and will save the initial and final registration results for aligning 2 3D mouse brain slices of the same area at different resoluions. This script performs step 2 of 3 in the registration pipeline.

step2_atlas_registration.main()

Command line arguments

datasetstr

The name of the dataset to be registered. This will be included in the names of the majority of the output files.

-low_pathstr

The location of the low resolution .npz file to be aligned to the high resolution .npz file

-high_pathstr

The location of the high resolution .npz file

-high_numstr

The slice ID number of the high resolution image

-outdirstr

The path to the directory where all outputs will be stored

-shiftslist of 3 integers

Shifts in the Anterior/Posterior, Left/Right, and Dorsal/Ventral directions to be applied to the low resolution image

-e_pathstr

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

-d_pathstr

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

-gammabool

Default - False; If present, apply a gamma correction to the file located at high_path.

-checkInitbool

Default - False; If present, script will save initial guesses and terminate before registration begins.

-zeroMeanbool

Default - True; If present, use the zero mean convention when loading input data.

-useRigidTransformbool

Default - False; If present, use a rigid transform instead of an affine transform for registration.

raises Exception:

If the only objects in the .npz file located at ‘-high’ are not [I, I2, xI, w]

raises Exception:

If the only objects in the .npz file located at ‘-low’ are not [I, I2, xI, w]