Skip to content

A C++ tool for 3D reconstruction from parallel 2D sections

License

Notifications You must be signed in to change notification settings

paulknysh/shaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shaper: A C++ tool for 3D reconstruction from parallel 2D sections

Demos

  • A voxel model that reconstructs the volume between lightning and star shapes (visualized in Mathematica):

  • A voxel model containing ~100 layers reconstructed from 25 sections (visualized in Mathematica):

How do I run the procedure?

In main() function of shaper.cpp user needs to specify values of n (number of input sections) and m (number of output subsections between each pair of consecutive sections). Here is the schematic:

Input sections must be PNG images named as "1.png", "2.png" etc and placed in the same directory with shaper.cpp. A code produces sets of subsections (also PNG images) between each pair of consecutive sections. The subsections are saved in the same directory and named as "1_1.png", "1_2.png" etc.

For example, if n=3 and m=2 the resultant sequence will be: "1.png", "1_1.png", "1_2.png", "2.png", "2_1.png", "2_2.png", "3.png"

Important:

  • Procedure can handle multi-phase reconstruction - each phase should be represented with its unique color throughout
  • Procedure requires "clean" colors - without noise, color variation etc

Credits

STB public domain libraries: https://github.com/nothings/stb

Author

Paul Knysh

About

A C++ tool for 3D reconstruction from parallel 2D sections

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published