unravel.warp.to_atlas module#

Use warp_to_atlas from UNRAVEL to warp a native image to atlas space.

Prereqs:

reg

Input examples (path is relative to ./sample??; 1st glob match processed):

*.czi, cfos/*.tif, cfos, *.tif, *.h5, or *.zarr

Usage:#

warp_to_atlas -i cfos -o img_in_atlas_space.nii.gz [–channel 1] [-md path/metadata.txt] [-a atlas/atlas_CCFv3_2020_30um.nii.gz] [-dt uint16] [-fri reg_outputs/autofl_50um_masked_fixed_reg_input.nii.gz] [–reg_res 50] [-inp bSpline] [-zo 1] [-mi] [-d list of paths] [-p sample??] [-v]

unravel.warp.to_atlas.parse_args()[source]#
unravel.warp.to_atlas.copy_nii_header(source_img, new_img)[source]#

Copy header info from nii_img to new_img

unravel.warp.to_atlas.to_atlas(sample_path, img, fixed_reg_in, atlas, output, interpol, dtype='uint16')[source]#

Warp the image to atlas space using ANTsPy.

Parameters:
  • sample_path (-) – Path to the sample directory.

  • img (-) – 3D image.

  • fixed_reg_in (-) – Name of the fixed image for registration.

  • atlas (-) – Path to the atlas.

  • output (-) – Path to the output.

  • interpol (-) – Type of interpolation (linear, bSpline, nearestNeighbor, multiLabel).

  • dtype (-) – Desired dtype for output (e.g., uint8, uint16). Default: uint16

unravel.warp.to_atlas.main()[source]#