DGtal  0.9.3
display3DToOFF.cpp
Go to the documentation of this file.
1 
39 #include <iostream>
40 #include "DGtal/base/Common.h"
41 #include "DGtal/io/readers/VolReader.h"
42 #include "DGtal/io/Display3D.h"
43 
44 #include "DGtal/io/DrawWithDisplay3DModifier.h"
45 #include "DGtal/images/ImageSelector.h"
46 #include "DGtal/images/imagesSetsUtils/SetFromImage.h"
47 #include "DGtal/helpers/StdDefs.h"
48 #include "ConfigExamples.h"
49 
50 
51 using namespace std;
52 using namespace DGtal;
53 using namespace Z3i;
54 
55 
56 int main( int /*argc*/, char** /*argv*/ )
57 {
58  std::string inputFilename = examplesPath + "samples/Al.100.vol";
62  Image image = VolReader<Image>::importVol(inputFilename);
63  Z3i::DigitalSet set3d (image.domain());
64  SetFromImage<Z3i::DigitalSet>::append<Image>(set3d, image, 0,255);
65 
66  viewer << set3d ;
67  viewer >> "exportMeshToOFF.off";
69 
70  return 0;
71 }
STL namespace.
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
int main(int, char **)
const Domain & domain() const
Definition: Image.h:192
Image image(domain)
Aim: This semi abstract class defines the stream mechanism to display 3d primitive (like BallVector...
Definition: Common.h:141