DGtal  1.1.0
digitalSetFromVol.cpp
Go to the documentation of this file.
1 
40 #include <iostream>
42 
43 #include "DGtal/base/Common.h"
44 #include "DGtal/io/readers/VolReader.h"
45 #include "DGtal/io/Display3D.h"
46 #include "DGtal/io/viewers/Viewer3D.h"
47 #include "DGtal/io/DrawWithDisplay3DModifier.h"
48 
49 #include "DGtal/images/ImageSelector.h"
50 #include "DGtal/images/imagesSetsUtils/SetFromImage.h"
51 #include "DGtal/helpers/StdDefs.h"
52 #include "ConfigExamples.h"
53 
55 
56 using namespace std;
57 using namespace DGtal;
58 
60 
61 int main( int argc, char** argv )
62 {
63  std::string inputFilename = examplesPath + "samples/Al.100.vol";
64  QApplication application(argc,argv);
65  Viewer3D<> viewer;
66  viewer.show();
68  Image image = VolReader<Image>::importVol(inputFilename);
69  Z3i::DigitalSet set3d (image.domain());
71  viewer << SetMode3D(image.domain().className(), "BoundingBox");
72  viewer << set3d << image.domain() << Viewer3D<>::updateDisplay;
73  return application.exec();
74 }
DGtal::SetFromImage
Aim: Define utilities to convert a digital set into an image.
Definition: SetFromImage.h:64
DGtal::ImageContainerBySTLVector
Definition: ImageContainerBySTLVector.h:127
main
int main(int argc, char **argv)
Definition: digitalSetFromVol.cpp:61
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::SetMode3D
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
Definition: DrawWithDisplay3DModifier.h:74
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::DigitalSetByAssociativeContainer::domain
const Domain & domain() const
DGtal::DigitalSetByAssociativeContainer
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Definition: DigitalSetByAssociativeContainer.h:90