DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
3dBorderExtractionImg.cpp
Go to the documentation of this file.
1
16
29
30
41
42
44
#include <iostream>
45
46
#include "DGtal/base/Common.h"
47
48
#include "DGtal/base/Common.h"
49
#include "DGtal/io/readers/VolReader.h"
50
#include "DGtal/images/ImageSelector.h"
51
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
52
#include "DGtal/io/viewers/PolyscopeViewer.h"
53
54
#include "DGtal/helpers/StdDefs.h"
55
#include "ConfigExamples.h"
56
57
59
60
using namespace
std
;
61
using namespace
DGtal
;
62
64
65
int
main
()
66
{
67
68
std::string inputFilename = examplesPath +
"samples/Al.100.vol"
;
69
PolyscopeViewer<>
viewer;
70
71
typedef
ImageSelector < Z3i::Domain, int>::Type
Image
;
72
Image
image
=
VolReader<Image>::importVol
(inputFilename);
73
Z3i::DigitalSet
set3d (
image
.
domain
());
74
SetFromImage<Z3i::DigitalSet>::append<Image>
(set3d,
image
, 0,255);
75
Z3i::Object18_6
obj3d (Z3i::dt18_6, set3d);
76
Z3i::Object18_6
border = obj3d.
border
();
77
viewer << border;
78
viewer <<
ClippingPlane
(0,1,0, -40);
79
80
viewer.
show
();
81
return
0;
82
}
83
// //
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::Object::border
Object border() const
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::Object18_6
Object< DT18_6, DigitalSet > Object18_6
Definition
StdDefs.h:178
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::ClippingPlane::ClippingPlane
ClippingPlane(double _a, double _b, double _c, double _d)
Definition
Display3D.h:300
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
topology
3dBorderExtractionImg.cpp
Generated on
for DGtal by
1.18.0