Code Monkey home page Code Monkey logo

skeltools's Introduction

Introduction

Tools related to skeletonization of objects. The codes requires the ITK library to work and CMake to build.

Compilation

  • Create a build directory for compilation
$ mkdir build
  • Set the ITK_DIR variable inside the CMakeLists.txt. The exact path will depend on the location where ITK is installed on your machine. Run following command (with appropriate path/to/ITK) to set the variable.
$sed -i '10s/.*/set(ITK_DIR \/path\/to\/ITK)/' CMakeLists.txt
  • Change into the build directory and generate make files using cmake
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
  • Compile using make
$ make -j2

If all goes well you should now have skeltools executable insed the build folder.

Computing object centerline.

To compute (boundary distance weighted) medial curve for dinosaur sample image run

$ skeltools -priority distance -curve -input data/dinosaur.tif -smooth 0.2  -fillholes -outputFolder results

If everything runs without errors you should see dinosaur_distance_curve.tif inside results folder.

dinosaur-noanchor-unweighted

Sample dinosaur object in translucent blue with reddish colored medial curve inside

Computing object medial surface

To compute medial surface for dinosaur sample image run

$ skeltools -priority distance -surface -input data/dinosaur.tif -smooth 0.1  -fillholes -output results/dino_surface.tif

The output of the above command should be the medial surface dino_surface.tif inside the results folder.

dinosaur-aofanchor-unweighted-surface

Sample dinosaur object in translucent blue with reddish colored medial surface inside

Mapping object thickness to object boundary

MapToBoundaryImageFilter can be used to map features (for example object width) from medial surface to the object boundary. Example map-medial-thickness-to-boundary.cpp computes object width weighted medial skeleton of `dinosaur.tif' and maps it back to the boundary.

dinosaur-mapped-object-width

Visualization of object thickness to object boundary for dinosaur sample image

skeltools's People

Contributors

haaput avatar

Watchers

 avatar

Forkers

chry04

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.