unravel.warp.points_to_atlas module#
Use warp_points_to_atlas
(wp2a
) from UNRAVEL to convert cell centroids in native space to an image matching the fixed registration input and then warp it to atlas space.
- Prereqs:
reg
andrstats
- Inputs:
regional_stats/<Condition>_sample??_cell_centroids.csv (w/ columns: x, y, z, Region_ID) from
rstats
(first glob match processed)Reference image for target shape for converting points to image before padding and warping: reg_inputs/autofl_50um.nii.gz from
reg_prep
Reference image for warping to atlas space: e.g., atlas/atlas_CCFv3_2020_30um.nii.gz
- Outputs:
./sample??/atlas_space/<args.input name>
./sample??/atlas_space/<args.input name –> .nii.gz>
Notes
If the input CSV has a ‘count’ column, use
utils_points_compressor
to unpack the points before running this script.
Usage:#
warp_points_to_atlas -i regional_stats/<asterisk>_sample??_cell_centroids.csv [-a atlas/atlas_CCFv3_2020_30um.nii.gz] [-fri reg_outputs/autofl_50um_masked_fixed_reg_input.nii.gz] [-af reg_inputs/autofl_50um.nii.gz] [-thr 20000 or -uthr 20000] [-md parameters/metadata.txt] [-mi] [-d list of paths] [-p sample??] [-v]