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.
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/io/DrawWithDisplay3DModifier.h"
#include "DGtal/io/viewers/Viewer3D.h"
#include "DGtal/io/Color.h"
#include "DGtal/images/ImageSelector.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
int main(
int argc,
char** argv )
{
Adj6 adj6;
Adj18 adj18;
DT6_18 dt6_18( adj6, adj18, JORDAN_DT );
typedef Domain::ConstIterator DomainConstIterator;
Point p1( -50, -50, -50 );
for ( DomainConstIterator it =
domain.begin(); it !=
domain.end(); ++it )
{
if ( (*it - c ).norm1() <= 30 ) diamond_set.insertNew( *it );
}
ObjectType diamond( dt6_18, diamond_set );
ObjectType diamond_clone( diamond );
diamond_clone.pointSet().erase( c );
ObjectType bdiamond = diamond.border();
ObjectType bdiamond_clone = diamond_clone.border();
QApplication application(argc,argv);
MyViewer viewer;
viewer << bdiamond_clone;
viewer << bdiamond ;
viewer <<
ClippingPlane(1,1,0,5,
false) << MyViewer::updateDisplay;
return application.exec();
}
Structure representing an RGB triple with alpha component.
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: Represents a digital topology as a couple of adjacency relations.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: Describes digital adjacencies in digital spaces that are defined with the 1-norm and the infinit...
Aim: An object (or digital object) represents a set in some digital space associated with a digital t...
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.
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
HyperRectDomain< Space > Domain
Z2i::DigitalSet DigitalSet