42#include "DGtal/base/Common.h"
43#include "DGtal/kernel/SpaceND.h"
44#include "DGtal/kernel/domains/HyperRectDomain.h"
45#include "DGtal/images/ImageSelector.h"
46#include "DGtal/io/readers/VolReader.h"
48#include "DGtal/io/Color.h"
49#include "DGtal/io/colormaps/GradientColorMap.h"
50#include "DGtal/io/viewers/PolyscopeViewer.h"
52#include "DGtal/kernel/SpaceND.h"
53#include "DGtal/kernel/domains/HyperRectDomain.h"
54#include "DGtal/images/ImageSelector.h"
56#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
57#include "DGtal/images/SimpleThresholdForegroundPredicate.h"
58#include "DGtal/helpers/StdDefs.h"
60#include "ConfigExamples.h"
62#include "DGtal/helpers/StdDefs.h"
79template<
typename Image>
88 for (
unsigned int k = 0 ; k < nb; k++)
90 for (
unsigned int dim = 0;
dim < Image::dimension;
dim++)
93 image.setValue(p, value);
99int main(
int argc,
char** argv )
102 std::string inputFilename = examplesPath +
"samples/Al.100.vol";
116 for (
Image::Iterator it = imageSeeds.begin(), itend = imageSeeds.end();it != itend; ++it)
125 Predicate aPredicate(imageSeeds,0);
130 unsigned int min = 0;
131 unsigned int max = 0;
132 for(DTL2::ConstRange::ConstIterator it = dtL2.constRange().begin(),
133 itend=dtL2.constRange().end();
159 double valDist= dtL2( (*it) );
160 Color c= gradient(valDist);
162 if(dtL2(*it)<=30 &&
image(*it)>0){
165 (
float)(c.
blue(),205));
99int main(
int argc,
char** argv ) {
…}
Structure representing an RGB triple with alpha component.
void green(const unsigned char aGreenValue)
void red(const unsigned char aRedValue)
static const Color Yellow
void blue(const unsigned char aBlueValue)
static const Color Magenta
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
std::vector< Value >::iterator Iterator
Aim: implements association bewteen points lying in a digital domain and values.
void show() override
Starts the event loop and display of elements.
Aim: Define a simple Foreground predicate thresholding image values given a single thresold....
static const L2Metric l2Metric
HyperRectDomain< Space > Domain
DGtal is the top-level namespace which contains all DGtal functions and types.
ImageContainerBySTLVector< Domain, Value > Type
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())