Coder Social home page Coder Social logo

dgtal-team / dgtal Goto Github PK

View Code? Open in Web Editor NEW
364.0 37.0 107.0 175.16 MB

Digital Geometry Tools and Algorithm Library

Home Page: https://dgtal.org

License: GNU Lesser General Public License v3.0

CMake 1.33% C++ 92.76% C 4.85% TeX 0.37% Gnuplot 0.01% Shell 0.04% Python 0.65% Raku 0.01% Dockerfile 0.01%
digital-geometry geometry-processing topology computational-geometry discrete-mathematics

dgtal's Introduction

DGtal logo

Main website: https://dgtal.org

CI (linux/macOS), master

Description

DGtal is a generic open source library for Digital Geometry programming for which the main objective is to structure different developments from the digital geometry and topology community. The aims are numerous: make easier the appropriation of our tools for a neophyte (new PhD students, researchers from other topics,...), permit better comparisons from new methods with already existing approaches and to construct a federative project. Another objective of DGtal is to simplify the construction of demonstration tools to share new results and potential efficiency of the proposed work.

Quick Install

  • MacOS (using homebrew):

     brew tap DGtal-team/DGtal
     brew install dgtal
    

(brew options dgtal to enable optional features)

  • Linux and windows: no binary package, please compile the library.

Additional instructions are available in the documentation.

Quick Build Instructions

More details are given in the documentation pages. We just sketch the main instructions on linux/unix-based systems:

git clone https://github.com/DGtal-team/DGtal.git
cd DGtal ; mkdir build ; cd build
cmake ..
make install

Minimum system requirements: C++11 enabled compiler, cmake, boost (>= 1.50).

DGtal can be compiled on Microsoft Windows system using Visual Studio 2014 (or newer): Generate the Visual Studio project using windows cmake tool and compile the DGtal solution (you may also need to set the cmake variable BUILD_SHARED_LIBS to false).

Docker

A Docker file is included in the repository in order to allow the users to build a docker image with the DGtal library installed. Inside the docker container, the library is installed with many optional dependencies (gmp, eigen, cgal, itk, cairo, qglviewer, openmp, fftw3) so the user can start developing without the need to install DGtal on the system.

To build the Docker image, Docker should have been installed in the system (to install Docker) download the Dockerfile inside the DGtal repository, in the same directory where the Dockerfile is located execute

docker build -t dgtal:lastest .

To run an interactive terminal inside the docker container and see the examples

docker run -it --user=digital dgtal:lastest bash
cd /home/digital/git/DGtal/build/examples

To enable Viewer3D/QGLViewer features, please check this discussion.

More Information

dgtal's People

Contributors

akrah avatar alinemartin avatar baptiste-genest avatar bitdeli-chef avatar borismansencal avatar cgurps avatar copyme avatar danoan avatar dcoeurjo avatar elcerdo avatar gdamiand avatar hadjiszs avatar ihopeimnotdumb avatar isivigno avatar jacquesolivierlachaud avatar jeremyfix avatar jlevallois avatar kerautret avatar marc-chevalier avatar msalazarcgeo avatar mtola avatar ngophuc avatar nnormand avatar phcerdan avatar raphaellenain avatar rolanddenis avatar seangongx avatar tfcx avatar troussil avatar vanthonguyen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dgtal's Issues

Cairo3D->2D mode and camera as stream modifier

In other DGtal streams (DGtalBoard,..), modifications and mode are set via stream modifier, e.g.:

board << CustomStyle() << aObject

Could it be possible to convert CairoViewers modes into such "stream modes" (e.g. WireFrame, camera position, ...) ?

Prblms with Display3D

I'm trying to build DGtal on MSWindows and I'm doing code reviewing:

  • Class documentation is missing
  • why to you include Display3D.h in HyperRectDomains for instance ? do you agree that if neither Cairo nor VISU3D is defined, the class should never be loaded ?

Plenty of warnings on MS: https://gist.github.com/1167968

Cmake error and warning

It appears some warning and errors in the cmake configuration (on linux version) :

-- CTest cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work.
-- Configuring done
CMake Error: CMake can not determine linker language for target:dgtal-config
CMake Error: Cannot determine link language for target "dgtal-config".

CMake: boost_program_options not found (by default) under Fedora

CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1128 (message):
Unable to find the requested Boost libraries.

Boost version: 1.46.0

Boost include path: /usr/include

The following Boost libraries could not be found:

      boost_program_options

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.

ascii PGM <-> binary PGM

shapeGenerator outputs ascii PGM (P2):
./tools/shapeGenerator/shapeGenerator -s flower -R 25 -r 5 -k 4 -o flower4
whereas pgm2freeman requieres binary PGM (P5):
./tools/2dContourTools/pgm2freeman -i flower4.pgm
gives the following error
PNMReader : No P5 format in flower4.pgm
terminate called after throwing an instance of 'DGtal::IOException'
what(): DGtal IO error
Abandon

Is it possible to only use ascii PGM (or binary PGM) or provides a tool for conversion ?

EPS export with CAIRO and alpha not equals to 1

When we export a figure with cairo in EPS format and if we use an alpha value different to 1, the export is no more vectorial.

For example:

./tools/2dContourTools/displayContours --FreemanChain? contours.fc --backgroundImage ../examples/samples/church.png

--outputEPS levelSetImage.eps --alphaBG 0.5

(the resulting file looks as a bitmap even but size=12Mo)

and

./tools/2dContourTools/displayContours --FreemanChain? contours.fc --backgroundImage ../examples/samples/church.png

--outputEPS levelSetImage.eps --alphaBG 1

(well vectorial size=2.8Mo)

testLengthEstimators.cpp changed

I removed the typename and It works, Tristan can you check if it also works (just update the master) ?

[ 32%] Building CXX object tests/geometry/2d/CMakeFiles/testLengthEstimators.dir/testLengthEstimators.cpp.o
/Users/kerautre/EnCours/DGtal/tests/geometry/2d/testLengthEstimators.cpp: In function ‘bool testDisplay(double, double)’:
/Users/kerautre/EnCours/DGtal/tests/geometry/2d/testLengthEstimators.cpp:248: error: using ‘typename’ outside of template
/Users/kerautre/EnCours/DGtal/tests/geometry/2d/testLengthEstimators.cpp:257: error: using ‘typename’ outside of template
/Users/kerautre/EnCours/DGtal/tests/geometry/2d/testLengthEstimators.cpp:267: error: using ‘typename’ outside of template
make[2]: *** [tests/geometry/2d/CMakeFiles/testLengthEstimators.dir/testLengthEstimators.cpp.o] Error 1

Cmake error when Magick is not found

After doing a :
cmake -DWITH_ALL=true
I obtain:
.................
CMake Error at cmake/FindMagick.cmake:100 (MESSAGE):
GraphicsMagick required, please specify it's location with MAGICK_HOME,
MAGICK_LOCATION or MAGICK++_LOCATION
Call Stack (most recent call first):
cmake/CheckDGtalOptionalDependencies.cmake:53 (FIND_PACKAGE)
CMakeLists.txt:157 (INCLUDE)
............

testArithDSS3d does not compile when libQGLViewer or Qt4 not found

Linking CXX executable testArithDSS3d
/usr/bin/ld: cannot find -lDGtal-visu3d
collect2: ld returned 1 exit status
make[2]: *** [tests/geometry/3d/testArithDSS3d] Erreur 1
make[1]: *** [tests/geometry/3d/CMakeFiles/testArithDSS3d.dir/all] Erreur 2

Check the cmakelists and allow the test file only when the dependency is fine.

help in shapeGenerator tool

When taping ./tools/shapeGenerator/shapeGenerator -l
we can see:
flower Flower with k petals.
Required parameter(s): --radius [-R], --smallradius [-r], --k [-k], --phi
But looking at the output shapes, I guess that -r is not the inner radius but the deviation between the outer and inner radii. This has to be checked for flower or other shapes like accFlower, etc.

Renaming io-viewers to io ?

io-viewers does not make sense...I've assigned this issue to you just to be informed and to discuss about it;)

Cellular Grid concept and other model

For now, the cellular grid space concept exists only through its first model : the KhalimskySpace. The concept should be written and another model should be proposed, We propose the integer coded model of cells of [http://gforge.liris.cnrs.fr/projects/imagene ImaGene] as another model of cellular grid space, especially for its efficiency.

DGtal Cairo Code cleanup

  • remove unnecessary commented code (e.g. dgtalcairo.cpp)
  • remove all references to "GL" stuff in DGtalCairo

Gcc warnings to remove (ambiguous else)

/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Arrow::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:912:10: warning: suggest explicit braces to avoid ambiguous ‘else’
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Ellipse::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:1171:8: warning: suggest explicit braces to avoid ambiguous ‘else’
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Circle::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:1349:5: warning: suggest explicit braces to avoid ambiguous ‘else’
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Arc::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:1400:10: warning: suggest explicit braces to avoid ambiguous ‘else’
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Polyline::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:1612:10: warning: suggest explicit braces to avoid ambiguous ‘else’
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp: In member function ‘virtual void LibBoard::Rectangle::flushCairo(cairo_t_, const LibBoard::TransformCairo&) const’:
/home/dcoeurjo/Sources/DGtal/src/Board/Shapes.cpp:1814:10: warning: suggest explicit braces to avoid ambiguous ‘else’

Enhance FreemanChain

  • Create an CharIterator? that provides the chain code char by char
  • Store the last point so that isClosed() may be performed in linear time,
  • create extend and retract methods as if FreemanChain? is a primitive.

Convert SpaceND into a pure "type/static only" struct

In spaceND, there are plenty of typdefs and a few methods: (selfdisplay, subspace, subcospace)

The methods make sense only if we create instances of SpaceND. In the current DGtal dev, SpaceND is just use as a template parameter (and never instantiated).

I suggest to remove the constructor and the methods.

Export in PDF 3D: format U3D

A great feature for the 3D visualisation should be to have an export with the format U3D which allows to display interactive 3D view in pdf format.
See for instance this example: http://www.loria.fr/~kerautre/lobster.pdf
You just need to read the pdf file with acroread for instance.
It can be generated simply from latex file and/or in a beamer presentation!

It could be a great feature for the next potential demo/tutorial session...
Perhaps Martial it could be included with the cairo related framework ?

compile pb with new build directory...

I don't why but after the new directory "build" I obtain this error:

Scanning dependencies of target testReverseDT
[ 41%] Building CXX object tests/geometry/nd/CMakeFiles/testReverseDT.dir/testReverseDT.cpp.o
In file included from /Users/kerautre/EnCours/DGtal/tests/geometry/nd/testReverseDT.cpp:36:
/Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.h:211: error: ‘Vector’ does not name a type
In file included from /Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.h:226,
from /Users/kerautre/EnCours/DGtal/tests/geometry/nd/testReverseDT.cpp:36:
/Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.ih: In member function ‘typename DGtal::ReverseDistanceTransformation<Image, p, IntegerShort>::OutputImage DGtal::ReverseDistanceTransformation<Image, p, IntegerShort>::reconstruction(const I&)’:
/Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.ih:73: error: ‘myDisplacementVector’ was not declared in this scope
/Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.ih: In member function ‘void DGtal::ReverseDistanceTransformation<Image, p, IntegerShort>::reconstructionAsSet(Set&, const I&)’:
/Users/kerautre/EnCours/DGtal/src/DGtal/geometry/nd/volumetric/ReverseDistanceTransformation.ih:105: error: ‘myDisplacementVector’ was not declared in this scope
make[2]: *** [tests/geometry/nd/CMakeFiles/testReverseDT.dir/testReverseDT.cpp.o] Error 1
make[1]: *** [tests/geometry/nd/CMakeFiles/testReverseDT.dir/all] Error 2
make: *** [all] Error 2

PB in cmake:

When trying to compile on linux from the master of main remote I get the following pb:
(pershpas the cmake version 2.6-patch 4 since it works on mac with version 2.8.4 ?)


CMake Error at cmake/DGtalConfigGenerator.cmake:7 (export):
export Unknown arguments.
Call Stack (most recent call first):
CMakeLists.txt:176 (INCLUDE)

-- Configuring incomplete, errors occurred!

"Generic" Image Reader

Specs:

Provide a mechanism to load a file image with the bestloader according to an image filename (parsing the extension).

Some readers may not be relevant. E.g. for RAW reader, there are ambiguities: dimension, Raw8 vs. Raw16, size,...

Interface:

e.g.:

typname ImageContainer... MyImage

MyImage image = GenericReader::import("glop.png");
MyImage image2= GenericReader::import("glop.vol");

introspection (to return/display the best loader used for this filename):

trace.info() << GenericReader::getReaderName("glop.png") <<std::endl;

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.