https://github.com/bluebrain/regiodesics

https://github.com/bluebrain/regiodesics

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: BlueBrain
  • License: apache-2.0
  • Language: C++
  • Default Branch: main
  • Size: 150 KB
Statistics
  • Stars: 0
  • Watchers: 5
  • Forks: 2
  • Open Issues: 0
  • Releases: 0
Archived
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

[!WARNING] The Blue Brain Project concluded in December 2024, so development has ceased under the BlueBrain GitHub organization. Future development will take place at: https://github.com/openbraininstitute/regiodesics

Regiodesics

Tools to generate relative distance and orientation fields in 3D brain atlases.

Apps

layer_segmenter

Screenshot of layer_segmenter application.

Multi-purpose interactive application that can be used to generate top and bottom shells of a brain region. To produce shells, we provide an input NRRD file (uint16, RAW encoding) containing the brain region of interest. On launch, a GL viewer appears showing border voxels of the brain region rendered as cubes. These cubes can be assigned to the top or bottom shells by "painting" them using the mouse controls:

  • Left-Click + drag to rotate camera
  • Middle-Click + drag to displace camera
  • Right-Click + drag or Mouse-Wheel to zoom camera
  • Ctrl + Left-Click to paint cubes with bottom label (yellow, value 3)
  • Shift + Left-Click to paint cubes with top label (blue, value 4)
  • Ctrl + Shift + Left-Click to remove label from painted cubes
  • s to save result as shell.nrrd
  • + to increase brush size
  • - to decrease brush size
  • Esc to quit (without saving)

In addition to the top/bottom shells, the output file has values: 0 for background voxels, 1 for interior voxels and 2 for non-painted boundary voxels (sides).

This application can also be used to compute relative distances (to the top shell) and perform layer segmentation based on user-defined layer thicknesses.

Usage: ./build/apps/layer_segmenter input [options] Options: -h [ --help ] Produce help message. -v [ --version ] Show program name/version banner and exit. -s [ --shell ] arg Load a saved painted shell. -f [ --flip ] Flip 'top' and 'bottom' voxels in the shell dataset. -b [ --bottom-up ] Enumerate layers from the bottom to the top, instead of top to bottom. -t [ --thickness ] arg Layer thicknesses (absolute or relative). Must contain at least two values. -a [ --average-size ] lines Size of k-nearest neighbour query of top to bottom lines used to approximate relative voxel positions. -x [ --crop-x ] <min>[:<max>] Optional crop range for x axis. -y [ --crop-y ] <min>[:<max>] Optional crop range for y axis. -z [ --crop-z ] <min>[:<max>] Optional crop range for z axis. --segment Proceed directly segmentation, shell volume must be provided. -r [ --output-relative-distances ] arg File path used to save of the relative distances created by segmentation. Defaults to saving file "relativeDistances.nrrd" in the current directory. -l [ --output-layers ] arg File path used to save the layers created by segmentation. Defaults to saving file "layer.nrrd" in the current directory.

direction_vectors

Generate and save brain region direction vectors.

Unit direction vectors are obtained as the directions of straight line segments joining the bottom shell to the top shell. These segments join every voxel of the bottom shell to their closest voxels in the top shell, and vice versa. The direction vector of a voxel is the average of the unit direction vectors of its average-size closest segments.

``` Usage: ./direction_vectors --shells SHELLS

where SHELLS is the path to a nrrd file containing the definitions
of a bottom and a top shell. SHELLS holds a 3D array of type char
(int8) where bottom voxels are labeled with 3 and top voxels
are labeled with 4.

Options:
  -h [ --help ]                         Produce this help message.
  -v [ --version ]                      Show program description and exit.
  -s [ --shells ] arg                   Shells volume, that is, a 3D array of
                                        type char (int8), where bottom voxels
                                        are labeled with 3 and top voxels are
                                        labeled with 4.
  -a [ --average-size ] lines (=1000)   Size of k-nearest neighbour query of
                                        top to bottom lines used to approximate
                                        direction vectors.
  -o [ --output-path ] arg (=direction_vectors.nrrd)
                                        File path of the 3D unit vector field
                                        to save.

```

Building

A docker file is included that can be used to build the software:

# build the docker image
$ docker build -t regiodesics .

# launch the docker container
$ docker run -it -v`pwd`:/opt/regiodesics regiodesics

# from inside the docker container
$ mkdir -p /opt/regiodesics/build
$ cd /opt/regiodesics/build
$ cmake .. -GNinja
$ ninja

# applications can be found in /opt/regiodesics/build/apps

Alternatively, the software can be built locally by installing the following dependencies (listed here for Debian-based distros, equivalent ones for other distros):

build-essential              : C++ compiler and runtime
ninja-build                  : Ninja build system
cmake                        : CMake build system
libboost-filesystem-dev      : Boost.Filesystem library
libboost-program-options-dev : Boost.Program_options library
libopenscenegraph-dev        : OpenSceneGraph library

and running (from the source code root):

$ mkdir build
$ cd build
$ cmake .. -GNinja
$ ninja

Acknowledgements

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

License

For license and authors, see LICENSE.txt.

Copyright © 2017-2024 Blue Brain Project/EPFL

Owner

  • Name: The Blue Brain Project
  • Login: BlueBrain
  • Kind: organization
  • Email: bbp.opensource@epfl.ch
  • Location: Geneva, Switzerland

Open Source Software produced and used by the Blue Brain Project

GitHub Events

Total
  • Push event: 1
  • Fork event: 1
Last Year
  • Push event: 1
  • Fork event: 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • seirios (4)
Top Labels
Issue Labels
Pull Request Labels