- One or more NVIDIA GPUs (tested on compute capability 6.1 and 5.2)
Tested on Cent OS 7.5 with the following versions of software.
- Cmake 2.8.12
- GNU Compiler Collection 4.8.5
- Python 3.6.4
- Julia 0.6.3
- CUDA Toolkit 9.0
- ANTs 2.1.0
-
Source images should be in binary format. Batch image conversion from TIFF to binary can be performed with
script/tiff2bin.py
. -
Source image files are assumed to be named like:
/path/to/src/YNAME/YNAME_XNAME/ZNAME.bin
XNAME
,YNAME
is the number specifies the origin of the stackZNAME
is the slice number
Conversion rule from these names to physical position should be provided in the HDoG parameter files.
git clone https://github.com/lsb-riken/CUBIC-informatics
cd CUBIC-informatics
Download CUBIC-Atlas reference data from here.
Some programs use helper functions in CUDA Toolkit. Create a symbolic link in the source directory. The path of CUDA Toolkit depends on your system setup.
ln -s /usr/local/cuda/samples/common common
Build programs under build
directory. Please change CUDA_NVCC_FLAGS
in CMakeLists.txt
to match the compute capability of your GPU devices.
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..
make
make install
pip install -r requirements.txt
-
Preparing HDoG parameter files for nuclear staining images
example:
param/param_example_HDoG_FW.json
,param/param_example_HDoG_RV.json
-
Preparing Merge parameter file
example:
param/param_example_mergebrain.json
-
Preparing Classify parameter file
example:
param/param_example_classify.json
-
Preparing HDoG and Merge parameter file as well for other channel images
-
Preparing MultiChannel parameter file
example:
param/param_example_multichannel.json
python script/MergeBrain.py images param/param_example_mergebrain.json
Whole brain image in TIFF format is created.
python script/HDoG_gpu.py param/param_example_HDoG_FW.json
python script/HDoG_gpu.py param/param_example_HDoG_RV.json
Cell candidate detection is performed on GPUs for forward side and reverse side.
python script/MergeBrain.py cells param/param_example_mergebrain.json
Candidate detection results on each side is merged.
python script/HDoG_classify.py param/param_example_classify.json
Create a classifier with manual decision boundary and plot cell candidates in feature space. By setting use_manual_boundary
in the parameter file to be false
, you can also perform unsupervised clustering and create classifier automatically.
python script/MultiChannelVerification.py param/param_example_multichannel.json
-
Preparing Mapping parameter file
example:
param/param_example_mapping.json
python script/AtlasMapping.py registration param/param_example_mapping.json
python script/AtlasMapping.py annotation param/param_example_mapping.json
python script/HDoG_intermediate.py param_param_example_mergebrain.json CB1_on_850-900_148804_249860_1000-1250_750-1000
Second argument of the script defines which part of images to be processed. It is in the following format :
REGIONNAME_FWorRV_ZLOCALstart-ZLOCALend_YNAME_XNAME_YLOCALstart-YLOCALend_XLOCALstart_XLOCALend
REGIONNAME
is a label for humanFWorRV
should be eitherFW
,off
,RV
oron
YNAME
,XNAME
specify which stack to be used.ZLOCALstart
,ZLOCALend
specify which images in the stack to be used. 0 corresponds to the first image in the stack.YLOCALstart
,YLOCAL_end
,XLOCALstart
,XLOCALend
specify which area in images to be used. (0,0) corresponds to the top left pixel.
If you want to check how the algorithm works, there is a program to test each step in the algorithm. As a python implementation, we have script/HDoG_cpu.py
.
Also we have CUDA programs for each step. To build these programs, run make DoG_test
for example and the binary is created under build/test/
directory.