|
@@ -5,17 +5,45 @@ This repository contains the full data set for constructing the DAPI template, t
|
|
|
|
|
|
Program for automatic segmentation to a DAPI-stained coronal mouse brain slices.
|
|
|
|
|
|
-## Dependecies
|
|
|
-* Python 3.7+
|
|
|
-* ANTs (https://github.com/ANTsX/ANTs) precompiled binaries
|
|
|
- (https://github.com/ANTsX/ANTs/releases/tag/v2.1.0)
|
|
|
+## How to setup the enviroment
|
|
|
+* To run the program, Python 3.7+ is required. You can get the newest version of
|
|
|
+ python by installing Anaconda. To check the version of the python instalation
|
|
|
+ typing
|
|
|
+ ````sh
|
|
|
+ python --version
|
|
|
+ ```
|
|
|
+* Install ANTs. This is done by adding a precompiled binaries to the libary
|
|
|
+ directory. The precompiled binaries for Mac/Win/Linux is avaliable at
|
|
|
+ https://github.com/ANTsX/ANTs/releases/tag/v2.1.0
|
|
|
+
|
|
|
+* Make shure to ad ANTs to the path. This is done by editing the config file for
|
|
|
+ the terminal shell. The config file would often be named
|
|
|
+ ```sh
|
|
|
+ ~/.bashrc
|
|
|
+ ```
|
|
|
+ In the configfile add the path. This can be done by
|
|
|
+ ````sh
|
|
|
+ export PATH=$PATH:usr/lib/bin/ANTs:
|
|
|
+ ```
|
|
|
+ After adding this to the config file, restart the terminal and test if the
|
|
|
+ path was added correctly by typing
|
|
|
+ ````sh
|
|
|
+ which antsRegistration
|
|
|
+ ```
|
|
|
+ The correct path should then be printed.
|
|
|
+
|
|
|
+* Make shure to have installed or updated all packages listed in
|
|
|
+ requirements.txt. All the packages can be updated using pip. It is espicially
|
|
|
+ crucial to have installed to have installed the non standard packages Nibabel
|
|
|
+ and nipype. To install a a package i.e. Nibabel
|
|
|
+ ````sh
|
|
|
+ pip install nibabel
|
|
|
+ ```
|
|
|
+ To check the version of a package
|
|
|
+ ````sh
|
|
|
+ pip freeze | grep nibabel
|
|
|
+ ```
|
|
|
|
|
|
-# Packages
|
|
|
-Make sure the following non-standard packages are installed:
|
|
|
-* Nipype
|
|
|
-* Nibabel
|
|
|
-
|
|
|
-If not already installed, you can use 'pip install <packagename> '
|
|
|
|
|
|
## Prerequisites
|
|
|
* A high-resolution, DAPI modality TIFF image of a brain slice. Can have multiple channels.
|
|
@@ -26,7 +54,6 @@ If not already installed, you can use 'pip install <packagename> '
|
|
|
* Use runner.py to preprocess and output a sgementation registred to the slice
|
|
|
in a designated output folder
|
|
|
* Use preprocess.py to prepare input slice for automatic registration
|
|
|
-* Use auto_seg.py with preprocessed slice which will output a folder containing segmentation registered to slice.
|
|
|
|
|
|
## Details
|
|
|
Detailed parameter description.
|
|
@@ -54,28 +81,6 @@ intended with test brainslice.
|
|
|
|---|---|
|
|
|
|`--dapi [index]` |Index of the DAPI channel in the slice, by default the DAPI channel is assumed to be the last channel|
|
|
|
|
|
|
-### auto_seg.py
|
|
|
-**Usage**
|
|
|
-```sh
|
|
|
-python3 auto_seg.py sliceloc segloc templateloc --bregma [coord]
|
|
|
-```
|
|
|
-**Positional/Required Arguments**
|
|
|
-
|
|
|
-|||
|
|
|
-|--------------------------------|-----------------------------|
|
|
|
-|`sliceloc` |Location of the slice you wish to register (.nii or.nii.gz) |
|
|
|
-|`segloc` |Location of file containing segmentation of the template (.nii or.nii.gz) |
|
|
|
-|`templateloc`|Location of template file (.nii or .nii.gz)|
|
|
|
-|`--bregma [coord]`|Bregma coordinate of input slice (if --approx argument is present, this is an optional argument)|
|
|
|
-
|
|
|
-**Optional arguments**
|
|
|
-
|
|
|
-| | |
|
|
|
-|---|---|
|
|
|
-|`--approx [index]` |Provide the location of the slice as a z-index of the template. Can be used instead of --bregma argument.|
|
|
|
-|`--out [directory]` |Provide an alternative output directory (default directory is /output) |
|
|
|
-|`--dapi [index]` |Index of the DAPI channel in the slice, by default the DAPI channel is assumed to be the last channel|
|
|
|
-
|
|
|
### preprocess.py
|
|
|
**Usage**
|
|
|
```sh
|