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 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] [--smooth] [--threshold THRESHOLD]
                                  [--not_all] [-d DIR] [-c] [-f] [--map]
                                  [--roi] [--bin] [--infos]
                                  id reference file_mat {25,50,100}

Positional Arguments

id

Experiment id in the Allen Mouse Brain Connectivity Atlas dataset.

reference

Path to reference volume (.nii.gz)

file_mat

Path to transform matrix (.mat)

res

Possible choices: 25, 50, 100

Resolution of the Allen files Please use the same resolution as the transformation matrix.

Named Arguments

--smooth

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

Default: False

--threshold

Threshold for the binarised 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 informations about the experiment (.json): - Injection coordinates (MI-Brain, Allen) - Hemisphere (L or R) - Injection ROI

Default: False

Author : Mahdi