DGtal 1.4.2
Loading...
Searching...
No Matches
io/display3DToOFF.cpp

Example of OFF generation from a Display3D object.

See also
Export 3D mesh in OFF and OBJ format
Visualisation of the Display3D mesh export using MeshLab software (http://meshlab.sourceforge.net).
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/io/Display3D.h"
#include "DGtal/io/DrawWithDisplay3DModifier.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
using namespace std;
using namespace DGtal;
using namespace Z3i;
int main( int /*argc*/, char** /*argv*/ )
{
std::string inputFilename = examplesPath + "samples/Al.100.vol";
typedef ImageSelector < Z3i::Domain, int>::Type Image;
Image image = VolReader<Image>::importVol(inputFilename);
Z3i::DigitalSet set3d (image.domain());
viewer << set3d ;
viewer >> "exportMeshToOFF.off";
return 0;
}
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: This semi abstract class defines the stream mechanism to display 3d primitive (like BallVector,...
Definition Display3D.h:93
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Aim: Define utilities to convert a digital set into an image.
Aim: implements methods to read a "Vol" file format.
Definition VolReader.h:90
int main()
Definition testBits.cpp:56
ImageContainerBySTLVector< Domain, Value > Image