DGtal 1.3.0
Loading...
Searching...
No Matches
io/digitalSetFromVol.cpp

Example of digital set extraction from volumetric file (.vol).

See also
Image and digital object import/export
3D digital set from volumetric file (.vol)
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/io/Display3D.h"
#include "DGtal/io/viewers/Viewer3D.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;
int main( int argc, char** argv )
{
std::string inputFilename = examplesPath + "samples/Al.100.vol";
QApplication application(argc,argv);
Viewer3D<> viewer;
viewer.show();
typedef ImageSelector < Z3i::Domain, int>::Type Image;
Image image = VolReader<Image>::importVol(inputFilename);
Z3i::DigitalSet set3d (image.domain());
viewer << SetMode3D(image.domain().className(), "BoundingBox");
viewer << set3d << image.domain() << Viewer3D<>::updateDisplay;
return application.exec();
}
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
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.
Definition: SetFromImage.h:64
Modifier class in a Display3D stream. Useful to choose your own mode for a given class....
Aim: implements methods to read a "Vol" file format.
Definition: VolReader.h:90
int main()
Definition: testBits.cpp:56
ImageContainerBySTLVector< Domain, Value > Image