Git Product home page Git Product logo

fractal-tree's Introduction

FractalTree

Forked from https://github.com/fsahli/fractal-tree

This code is to create a fractal tree over a surface discretized by triangles. It was developed to create a representation of the Purkinje network in the ventricles of the human heart.

The details of the algorithm are presented in this article. If you are going to use this code, please cite:

Generating Purkinje networks in the human heart.
F. Sahli Costabal, D. Hurtado and E. Kuhl.
Journal of Biomechanics, doi:10.1016/j.jbiomech.2015.12.025

Install

pip install FractalTree
# or
git clone https://github.com/GaetanDesrues/fractal-tree FractalTree
python setup.py build_ext --inplace
cd FractalTree/FractalTree/core
python setup.py build_ext --inplace

#You may have to add this line to Cython/Includes/libcpp/algorithm.pxd:
Iter min_element[Iter](Iter first, Iter last) except +

# Test
python test_install.py

#python setup.py build_ext --inplace
#python build_geodesic.py build_ext --inplace

You will need .obj mesh file to create the tree. A very nice software to manipulate the mesh and export it to .obj is MeshLab. Please check if the mesh has duplicated vertex or faces before running the code. Also the orientation of the normals can change your results, because the angles will be flipped. To visualize the output, the best alternative is Paraview.

To define the mesh file and the parameters of the tree to use, edit the parameters.py file and then run:

from FractalTree import *
from parameters import Parameters

param=Parameters()

branches, nodes = Fractal_Tree_3D(param)

Example: computing distances on purkinje network

fractal-tree's People

Contributors

fsahli avatar gaetandesrues avatar adsche avatar

Watchers

James Cloos avatar

Forkers

akaroui

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.