#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/io/Color.h"
#include "DGtal/io/colormaps/GradientColorMap.h"
#include "DGtal/io/viewers/PolyscopeViewer.h"
#include "DGtal/kernel/SpaceND.h"
#include "DGtal/kernel/domains/HyperRectDomain.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
#include "DGtal/images/SimpleThresholdForegroundPredicate.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
#include "DGtal/helpers/StdDefs.h"
template<typename Image>
{
typename Image::Point p, low =
image.domain().lowerBound();
typename Image::Vector ext;
for (unsigned int k = 0 ; k < nb; k++)
{
for (
unsigned int dim = 0;
dim < Image::dimension;
dim++)
image.setValue(p, value);
}
}
int main(
int argc,
char** argv )
{
std::string inputFilename = examplesPath + "samples/Al.100.vol";
PolyscopeViewer<> viewer;
for ( Image::Iterator it = imageSeeds.begin(), itend = imageSeeds.end();it != itend; ++it)
(*it)=1;
Predicate aPredicate(imageSeeds,0);
unsigned int min = 0;
for(DTL2::ConstRange::ConstIterator it = dtL2.constRange().begin(),
itend=dtL2.constRange().end();
it!=itend;
++it)
{
if( (*it) < min )
min=(*it);
}
it!=itend;
++it){
double valDist= dtL2( (*it) );
Color c= gradient(valDist);
if(dtL2(*it)<=30 &&
image(*it)>0){
viewer << *it ;
}
}
return 0;
}
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 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())
ImageContainerBySTLVector< Domain, Value > Image