DGtal  1.0.0
3dBorderExtractionImg.cpp
Go to the documentation of this file.
1 
43 #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/Viewer3D.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( int argc, char** argv )
66 {
67 
68  std::string inputFilename = examplesPath + "samples/Al.100.vol";
69  QApplication application(argc,argv);
70  Viewer3D<> viewer;
71  viewer.show();
72 
74  Image image = VolReader<Image>::importVol(inputFilename);
75  Z3i::DigitalSet set3d (image.domain());
77  Z3i::Object18_6 obj3d (Z3i::dt18_6, set3d);
78  Z3i::Object18_6 border = obj3d.border();
79  viewer << border;
80  viewer << ClippingPlane(0,1,0, -40) << Viewer3D<>::updateDisplay;
81 
82  return application.exec();
83 }
84 // //
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
int main(int argc, char **argv)
Object border() const
Aim: implements methods to read a "Vol" file format.
Definition: VolReader.h:89
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
ImageContainerBySTLVector< Domain, Value > Image
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...