Code Monkey home page Code Monkey logo

fastbc's Introduction

fastBC

Description

fastBC is a repository containing the C++ codes required for the computation of box-counting dimension of the point cloud representation of the surface of interest of a given 3D object consisting of overlapping spherical entities, a functionality offered by the Sphractal Python package.

Once compiled successfully, the program takes in the following as input argument:

  • Resolution of the 3D binary image (int).
  • Name of input file name (str) containing the indices of the occupied voxels.
  • Name of output file name (str) storing the box counts corresponding to each box length.

And runs the box-counting algorithm on the 3D binary image computed based onn the indices of voxels read from the input file, and outputs the box counts corresponding to each box length used to an output file with the specified name.

It was built upon the work of Juan Ruiz de Miras et al., who distributed their source codes freely as Fast Box-Counting Algorithm. The following files in this repository are obtained from Fast Box-Counting Algorithm (October 2022 version):

  • bcCPU.cpp and bcCPU.h: C++ files with the implementation on CPU of the box-counting algorithm for binary 2D, 3D and 4D data
  • bcCUDA3D.cu and bcCUDA3D.cuh: CUDA/C++ files with the implementation on GPU of the box-counting algorithm for binary 3D data

Usage and Compilation

Users need to compile either 3DbinImBCcpu.cpp or 3DbinImBCgpu.cpp on their machine and pass the path to the compiled program file to the function sphractal.runBoxCnt() or sphractal.getVoxelBoxCnts() if the computation of the box-counting dimension of the point cloud representation of the surface of interest is desired.

3DbinImBCcpu.cpp could be compiled by appropriate C++ compilers.

g++ 3DbinImBCcpu.cpp bcCPU.cpp -o 3DbinImBCcpu

3DbinImBCgpu.cpp requires the following for successful compilation:

nvcc -O3 3DbinImBCgpu.cpp bcCUDA3D.cu -o 3DbinImBCgpu

License

The original work from which this work was derived from was distributed under a Creative Commons Attribution-ShareAlike 4.0 International License. Under the ShareAlike term of this license, this work is also distributed under the same license as the original. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

Credits/Citations

This work was built upon the publication below: "Fast Computation of Fractal Dimension for 2D, 3D and 4D Data" Juan Ruiz de Miras, Miguel Ángel Posadas, Antonio José Ibáñez-Molina, María Felipa Soriano and Sergio Iglesias-Parro Journal of Computational Science 66, 2023 DOI: https://doi.org/10.1016/j.jocs.2022.101908

Contact

Email: [email protected]/[email protected]

Feel free to reach out if you have any questions, suggestions, or feedback.

fastbc's People

Contributors

jon-ting avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

liyunfei5126

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.