DGtal  0.9.2
3dBorderExtractionImg.cpp
1 
30 #include <iostream>
32 
33 #include "DGtal/base/Common.h"
34 
35 #include "DGtal/base/Common.h"
36 #include "DGtal/io/readers/VolReader.h"
37 #include "DGtal/images/ImageSelector.h"
38 #include "DGtal/images/imagesSetsUtils/SetFromImage.h"
39 #include "DGtal/io/viewers/Viewer3D.h"
40 
41 #include "DGtal/helpers/StdDefs.h"
42 #include "ConfigExamples.h"
43 
44 
46 
47 using namespace std;
48 using namespace DGtal;
49 
51 
52 int main( int argc, char** argv )
53 {
54 
55  std::string inputFilename = examplesPath + "samples/Al.100.vol";
56  QApplication application(argc,argv);
57  Viewer3D<> viewer;
58  viewer.show();
59 
61  Image image = VolReader<Image>::importVol(inputFilename);
62  Z3i::DigitalSet set3d (image.domain());
63  SetFromImage<Z3i::DigitalSet>::append<Image>(set3d, image, 0,255);
64  Z3i::Object18_6 obj3d (Z3i::dt18_6, set3d);
65  Z3i::Object18_6 border = obj3d.border();
66  viewer << border;
67  viewer << ClippingPlane(0,1,0, -40) << Viewer3D<>::updateDisplay;
68 
69  return application.exec();
70 }
71 // //
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition: Object.h:119
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:69
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
STL namespace.
Aim: implements methods to read a "Vol" file format.
Definition: VolReader.h:88
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: Define utilities to convert a digital set into an image.
Definition: SetFromImage.h:63
const Domain & domain() const
Definition: Image.h:192
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Object border() const