m2m_import_proj_density

By default, download all File flags (see arguments) and align them on User Data Space.

Important: Select the same resolution as your matrix

Minimum mandatory requires to call the script : (a)

>>> m2m_import_proj_density.py --id id path/to/ref.nii.gz
    path/to/matrix.mat resolution

OR if you have a CSV files containing ids (column labelled ‘id’)

>>> m2m_import_proj_density.py --ids_csv path/to/ids.csv 
    path/to/ref.nii.gz path/to/matrix.mat resolution

Find an id here : https://connectivity.brain-map.org/

If –not_all is set, only the files specified will be output.

((a) correpond to the previous mandatory command line)

Import a projection density map of an experiment in the Allen Mouse Brain Connectivity Atlas and align it on UserDataSpace.

>>> (a) --not_all --map
>>> (a) --not_all --map --smooth

Download a spherical roi mask located at the injection coordinates of an experiment in the Allen Mouse Brain Connectivity Atlas and align it on UserDataSpace.

>>> (a) --not_all --roi

Save experiment injection coordinates (Allen and MI-Brain) in a json file.

>>> (a) --not_all --infos

Save a binarized projection density map.

>>> (a) --not_all --bin --threshold

usage: m2m_import_proj_density.py [-h] (--id ID | --ids_csv IDS_CSV)
                                  [--smooth] [--threshold THRESHOLD]
                                  [--not_all] [-d DIR] [-c] [-f] [--map]
                                  [--roi] [--bin] [--infos]
                                  reference file_mat {10,25,50,100}

Positional Arguments

reference

Path to reference volume (.nii.gz)

file_mat

Path to transform matrix (.mat)

res

Possible choices: 10, 25, 50, 100

Resolution (in micron) of the Allen files Please use the same resolution as the transformation matrix.

Named Arguments

--id

Single experiment id in the Allen Mouse Brain Connectivity Atlas dataset.

--ids_csv

Path to a CSV file containing 1-n experiment ids in the Allen Mouse Brain Connectivity Atlas dataset.

--smooth

Interpolation method for the registration is nearestNeighbor by default. Using –smooth will change the method to bSpline.

Default: False

--threshold

Threshold for the binarized map.

Default: 0.5

--not_all

If set, only saves the files specified

Default: False

-d, --dir

Path of the ouptut file directory is . by default. Using –dir <dir> will change the output file’s directory or create a new one if does not exits.

Default: “.”

-c, --nocache

Update the Allen Mouse Brain Connectivity Cache

Default: False

-f

Force overwriting of the output files.

Default: False

File flags

--map

Save the projection density map of the experiment (.nii.gz)

Default: False

--roi

Save a spherical mask at the injection coordinatesof the experiment (.nii.gz)

Default: False

--bin

Save a binarized projection density map (.nii.gz)with a certain –threshold.

Default: False

--infos

Save information about the experiment (.json): - Injection coordinates (MI-Brain, Allen) - Hemisphere (L or R) - Injection ROI

Default: False

Author : Mahdi