DGtal  1.1.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 // //
DGtal::SetFromImage
Aim: Define utilities to convert a digital set into an image.
Definition: SetFromImage.h:64
main
int main(int argc, char **argv)
Definition: 3dBorderExtractionImg.cpp:65
DGtal::ImageContainerBySTLVector
Definition: ImageContainerBySTLVector.h:127
DGtal::Viewer3D
Definition: Viewer3D.h:133
Image
ImageContainerBySTLVector< Domain, Value > Image
Definition: testSimpleRandomAccessRangeFromPoint.cpp:45
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::Object::border
Object border() const
DGtal::ClippingPlane
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Definition: DrawWithDisplay3DModifier.h:157
DGtal::Image
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:70
DGtal::VolReader
Aim: implements methods to read a "Vol" file format.
Definition: VolReader.h:90
DGtal::Viewer3D::show
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
DGtal::Object
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition: Object.h:120
DGtal::DigitalSetByAssociativeContainer
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Definition: DigitalSetByAssociativeContainer.h:90