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/DrawWithDisplay3DModifier.h"
51#include "DGtal/io/viewers/Viewer3D.h"
53#include "DGtal/kernel/SpaceND.h"
54#include "DGtal/kernel/domains/HyperRectDomain.h"
55#include "DGtal/images/ImageSelector.h"
57#include "DGtal/geometry/volumes/distance/DistanceTransformation.h"
58#include "DGtal/images/SimpleThresholdForegroundPredicate.h"
59#include "DGtal/helpers/StdDefs.h"
61#include "ConfigExamples.h"
63#include "DGtal/helpers/StdDefs.h"
80template<
typename Image>
83 typename Image::Point p, low = image.domain().lowerBound();
89 for (
unsigned int k = 0 ; k < nb; k++)
91 for (
unsigned int dim = 0;
dim < Image::dimension;
dim++)
94 image.setValue(p, value);
100int main(
int argc,
char** argv )
103 std::string inputFilename = examplesPath +
"samples/Al.100.vol";
106 QApplication application(argc,argv);
108 viewer.setWindowTitle(
"simpleViewer");
120 for (
Image::Iterator it = imageSeeds.begin(), itend = imageSeeds.end();it != itend; ++it)
129 Predicate aPredicate(imageSeeds,0);
134 unsigned int min = 0;
135 unsigned int max = 0;
136 for(DTL2::ConstRange::ConstIterator it = dtL2.constRange().begin(),
137 itend=dtL2.constRange().end();
164 double valDist= dtL2( (*it) );
165 Color c= gradient(valDist);
167 if(dtL2(*it)<=30 && image(*it)>0){
170 (
float)(c.blue(),205)),
171 Color((
float)(c.red()),
173 (
float)(c.blue()),205));
177 viewer<< Viewer3D<>::updateDisplay;
179 return application.exec();
Structure representing an RGB triple with alpha component.
static const Color Yellow
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)
Iterator for HyperRectDomain.
const ConstIterator & begin() const
const ConstIterator & end() const
std::vector< Value >::iterator Iterator
Aim: implements association bewteen points lying in a digital domain and values.
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Aim: Define a simple Foreground predicate thresholding image values given a single thresold....
static const L2Metric l2Metric
DGtal is the top-level namespace which contains all DGtal functions and types.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())
ImageContainerBySTLVector< Domain, Value > Image