DGtal 2.0.0
Loading...
Searching...
No Matches
topology/3dBorderExtractionImg.cpp

Objects have a border, which are the points which touch the complement in the sense of background adjacency. A border of an object is itself an object, with the same topology as the object.

See also
Border of a digital object
Border extraction visualisation from imported volume
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/images/imagesSetsUtils/SetFromImage.h"
#include "DGtal/io/viewers/PolyscopeViewer.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";
typedef ImageSelector < Z3i::Domain, int>::Type Image;
Z3i::DigitalSet set3d (image.domain());
Z3i::Object18_6 obj3d (Z3i::dt18_6, set3d);
Z3i::Object18_6 border = obj3d.border();
viewer << border;
viewer << ClippingPlane(0,1,0, -40);
viewer.show();
return 0;
}
// //
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
Definition Object.h:120
Object border() const
void show() override
Starts the event loop and display of elements.
DGtal is the top-level namespace which contains all DGtal functions and types.
STL namespace.
Clipping plane.
Definition Display3D.h:299
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
Image image(domain)
ImageContainerBySTLVector< Domain, Value > Image