Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
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/viewers/PolyscopeViewer.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 )
{
PolyscopeViewer<> viewer;
std::string inputFilename = examplesPath + "samples/Al.100.vol";
typedef ImageSelector < Z3i::Domain, int>::Type Image;
Z3i::DigitalSet set3d (image.domain());
viewer << set3d << image.domain();
viewer.show();
return 0;
}
void show() override
Starts the event loop and display of elements.
DigitalSetSelector< Domain, BIG_DS+HIGH_BEL_DS >::Type DigitalSet
Definition StdDefs.h:173
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
static void append(Set &aSet, const ForegroundPredicate &isForeground, typename Image::Domain::ConstIterator itBegin, typename Image::Domain::ConstIterator itEnd)
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())
int main()
Definition testBits.cpp:56
Image image(domain)
ImageContainerBySTLVector< Domain, Value > Image