DGtal 1.3.0
|
Functions for the fast marching method. More...
#include <iostream>
#include <iomanip>
#include <functional>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/kernel/BasicPointPredicates.h"
#include "DGtal/kernel/domains/DomainPredicate.h"
#include "DGtal/kernel/sets/DigitalSetFromMap.h"
#include "DGtal/images/ImageContainerBySTLMap.h"
#include "DGtal/images/SimpleThresholdForegroundPredicate.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
#include "DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h"
#include "DGtal/geometry/volumes/distance/FMM.h"
#include "DGtal/io/colormaps/HueShadeColorMap.h"
#include "DGtal/io/boards/Board2D.h"
#include "DGtal/shapes/ShapeFactory.h"
#include "DGtal/shapes/Shapes.h"
#include "DGtal/topology/helpers/Surfaces.h"
#include "DGtal/shapes/GaussDigitizer.h"
#include "DGtal/geometry/curves/GridCurve.h"
Go to the source code of this file.
Functions | |
template<typename TKSpace > | |
void | ballGenerator (const int &size, double aCx, double aCy, double aR, GridCurve< TKSpace > &gc) |
template<typename TIterator > | |
void | draw (const TIterator &itb, const TIterator &ite, const int &size, std::string basename) |
bool | testDisplayDT2d (int size, int area, double distance) |
bool | accuracyTest (int size) |
bool | testDisplayDT3d (int size, int area, double distance) |
bool | testDisplayDTFromCircle (int size) |
template<Dimension dim, int norm> | |
bool | testComparison (int size, int area, double dist) |
int | main (int argc, char **argv) |
Functions for the fast marching method.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This file is part of the DGtal library.
Definition in file testFMM.cpp.
bool accuracyTest | ( | int | size | ) |
low accuracy
[FMMDef]
[FMMDef]
[FMMInit1]
[FMMInit1]
[FMMUsage]
[FMMUsage]
medium accuracy
[FMMInit2]
[FMMInit2]
high accuracy
[FMMDef3]
[FMMDef3]
Definition at line 233 of file testFMM.cpp.
References DGtal::Trace::beginBlock(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::compute(), DGtal::Trace::endBlock(), DGtal::Surfaces< TKSpace >::findABel(), DGtal::Trace::info(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::initFromBelsRange(), K, DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::max(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::min(), DGtal::trace, and DGtal::Surfaces< TKSpace >::track2DBoundary().
Referenced by main().
void ballGenerator | ( | const int & | size, |
double | aCx, | ||
double | aCy, | ||
double | aR, | ||
GridCurve< TKSpace > & | gc | ||
) |
Definition at line 133 of file testFMM.cpp.
References DGtal::Surfaces< TKSpace >::findABel(), DGtal::KhalimskySpaceND< dim, TInteger >::init(), DGtal::GridCurve< TKSpace >::initFromVector(), K, and DGtal::Surfaces< TKSpace >::track2DBoundaryPoints().
void draw | ( | const TIterator & | itb, |
const TIterator & | ite, | ||
const int & | size, | ||
std::string | basename | ||
) |
Definition at line 168 of file testFMM.cpp.
References LibBoard::Board::setUnit(), and LibBoard::Board::UCentimeter.
Referenced by testDisplayDT2d(), and testDisplayDTFromCircle().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 659 of file testFMM.cpp.
References accuracyTest(), DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testDisplayDT2d(), testDisplayDT3d(), testDisplayDTFromCircle(), and DGtal::trace.
bool testComparison | ( | int | size, |
int | area, | ||
double | dist | ||
) |
Comparison with the separable distance transform
Definition at line 579 of file testFMM.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Trace::beginBlock(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::compute(), dim, DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::Image< TImageContainer >::setValue(), and DGtal::trace.
bool testDisplayDT2d | ( | int | size, |
int | area, | ||
double | distance | ||
) |
Simple 2d distance transform
Definition at line 195 of file testFMM.cpp.
References DGtal::Trace::beginBlock(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::compute(), draw(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::isValid(), DGtal::Image< TImageContainer >::setValue(), and DGtal::trace.
Referenced by main().
bool testDisplayDT3d | ( | int | size, |
int | area, | ||
double | distance | ||
) |
Simple 3d distance transform and slice display
Definition at line 382 of file testFMM.cpp.
References DGtal::HyperRectDomain< TSpace >::begin(), DGtal::Trace::beginBlock(), DGtal::PointVector< dim, TEuclideanRing, TContainer >::className(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::compute(), DGtal::HyperRectDomain< TSpace >::end(), DGtal::Trace::endBlock(), DGtal::Trace::info(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::isValid(), LibBoard::Board::setUnit(), DGtal::Image< TImageContainer >::setValue(), DGtal::trace, and LibBoard::Board::UCentimeter.
Referenced by main().
bool testDisplayDTFromCircle | ( | int | size | ) |
Definition at line 438 of file testFMM.cpp.
References DGtal::functors::andBF2, DGtal::Trace::beginBlock(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::compute(), draw(), DGtal::Trace::endBlock(), DGtal::GridCurve< TKSpace >::getIncidentPointsRange(), DGtal::GridCurve< TKSpace >::getInnerPointsRange(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::getMax(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::getMin(), DGtal::GridCurve< TKSpace >::getOuterPointsRange(), DGtal::Trace::info(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::initFromIncidentPointsRange(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::initFromPointsRange(), DGtal::FMM< TImage, TSet, TPointPredicate, TPointFunctor >::isValid(), and DGtal::trace.
Referenced by main().