Giter Site home page Giter Site logo

branch-generator's Introduction

Branch-Generator

Generates 2-way dendritic branches with variable branching angle and branch lengths as well as linear branches. A simple single point soma wull be included as well.

Codacy Badge Build status (Linux/OSX) Build status (Windows) License: GPL v3

Build

  • Clone this repository
  • Open in IntelliJ IDEA
  • Build->Build Project in IntelliJ IDEA

Alternative Build (Ant)

  • Navigate to $CWD
  • Type ant in $CWD Note that it might be necessary to edit build.properties in $CWD.

Alternative Build (Kotlinc)

  • Navigaegt to $CWD
  • Type kotlinc src/BranchGenerator.kt -include-runtime -d Branch-Generator.jar

Usage (constant radii)

java -jar Branch-Generator.jar --method constant --filename test --l0 100 --l1 100 --l2 100 --d0 10 --angle 90 --n 2

This will generate a SWC file: Y-branch_angle=90.swc with parent or root branch of length 100, child branches (left and right) of length 100. Branching angle is 90°. Parent branch's diameter is set to 10 corresponding length units and the branches taper off at the branching point by a factor of 2 and the dendrites by a factor of 5 with two points per branch. Additionally parameters to adjust can be displaye via: java -jar Y-Generator.jar.

Usage (tapering)

java -jar Branch-Generator.jar --method tapering --filename test --l0 100 --l1 100 --l2 100 --d0 10 --angle 90 --n 2 --d1 5 --d2 5

Usage (Rall)

According to Rall and Rinzel 1973 the sum of radii of child branches at each branching point raised to the power of 3/2 must equal the parent branch radius also raised to the power of 3/2 (Rall's 3/2 power rule). The user can specify these radii with method Rall.

Usage (linear)

The following command will generate an unbranched cable with length 10, start radius of 2 and end radius of 1. There will be inserted 10 points leading to 9 segments respectively edges:

java -jar Branch-Generator.jar --method linear --filename unbranched --l0 10 --r0 2 --r1 1 --n 10.

Usage (bended)

Create bended linear cable with length 10 and bending angle 60 degrees java -jar Branch-Generator.jar --method bende --angle 60 --length 10.

Options

For explanation of command line arguments, execute: java -jar Y-Generator.jar:

Usage:

Branch_Generator_jar/Branch-Generator --method CONSTANT,TAPERING --filename FILENAME --angle ANGLE --n NUM_POINTS

   Additional options for the methods:
   
      1. CONSTANT: --d0 DIAMETER, --l0 PARENT_LENGTH -l1 RIGHT_CHILD_LENGTH -l2 LEFT_CHILD_LENGTH
      
      2. TAPERING: --d1 DIAMETER_RIGHT_CHILD_END_POINT --d2 DIAMETER_LEFT_CHILD_END_POINT

      3. RALL: --r0 RADIUS_PARENT_BRANCHR --r1 RADIUS_LEFT_CHILD --r2 RADIUS_RIGHT_CHILD

      4. LINEAR: --r0 START_RADIUS --r1 END_RADIUS --l0 LINEAR_CABLE_LENGTH --n NUM_POINTS 

Postprocessing

The generated SWC file contains the 1D line graph geometry and can be converted to a full 3D geometry with embedded ER (scale factor 0.5 for example and 2 refinements) in the UGX file format by invoking the following ugshell call:

../bin/ugshell -call ../bin/ugshell -call "create_two_way_branch_from_swc(\"test_angle=90.0.swc\", 0.5, 2)"

Geometries

Two way branch geometries are stored here and linear cables there.

References

  • Rall W, Rinzel J. Branch input resistance and steady attenuation for input to one branch of a dendritic neuron model. Biophys J. 1973;13(7):648-687. doi:10.1016/S0006-3495(73)86014-X
  • Article in Scholarpedia

branch-generator's People

Contributors

codacy-badger avatar stephanmg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

neurobox3d

branch-generator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.