DGtal 0.2.1

3dBorderExtractionVol.cpp


#include <iostream>
#include "DGtal/base/Common.h"
#include <QtGui/qapplication.h>
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/kernel/images/ImageSelector.h"
#include "DGtal/3dViewer/DGTalQGLViewer.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/implicitrounded.vol~"; 
  QApplication application(argc,argv);
  DGTalQGLViewer viewer;
  viewer.show(); 
  
  typedef ImageSelector < Z3i::Domain, int>::Type Image;
  Z3i::DigitalSet set3d = VolReader<Image>::importDigitalSet(inputFilename , 
                                                             1, 255, 10 );
  Z3i::Object18_6 obj3d (Z3i::dt18_6, set3d);
  Z3i::Object18_6 border = obj3d.border();
  viewer << border  << DGTalQGLViewer::updateDisplay;
  return application.exec();   
}
//                                                                           //
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines