DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
digitalSetFromVol.cpp
Go to the documentation of this file.
1
16
29
37
38
39
41
#include <iostream>
42
43
#include "DGtal/base/Common.h"
44
#include "DGtal/io/readers/VolReader.h"
45
#include "DGtal/io/viewers/PolyscopeViewer.h"
46
47
#include "DGtal/images/ImageSelector.h"
48
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
49
#include "DGtal/helpers/StdDefs.h"
50
#include "ConfigExamples.h"
51
53
54
using namespace
std
;
55
using namespace
DGtal
;
56
58
59
int
main
()
60
{
61
PolyscopeViewer<>
viewer;
62
std::string inputFilename = examplesPath +
"samples/Al.100.vol"
;
63
typedef
ImageSelector < Z3i::Domain, int>::Type
Image
;
64
Image
image
=
VolReader<Image>::importVol
(inputFilename);
65
66
Z3i::DigitalSet
set3d (
image
.
domain
());
67
SetFromImage<Z3i::DigitalSet>::append<Image>
(set3d,
image
, 0,255);
68
69
viewer << set3d <<
image
.
domain
();
70
viewer.
show
();
71
return
0;
72
}
73
DGtal::Image
Aim: implements association between points lying in a digital domain and values.
Definition
Image.h:70
DGtal::Image::domain
const Domain & domain() const
Definition
Image.h:192
DGtal::PolyscopeViewer
Definition
PolyscopeViewer.h:57
DGtal::PolyscopeViewer::show
void show() override
Starts the event loop and display of elements.
Definition
PolyscopeViewer.h:73
DGtal::Z3i::DigitalSet
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
Definition
StdDefs.h:173
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
std
STL namespace.
DGtal::ImageSelector::Type
ImageContainerBySTLVector< Domain, Value > Type
Definition
ImageSelector.h:84
DGtal::SetFromImage::append
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
DGtal::VolReader::importVol
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())
main
int main(int, char **)
Definition
testIntegerComputer.cpp:331
image
Image image(domain)
examples
io
digitalSetFromVol.cpp
Generated on
for DGtal by
1.18.0