DGtal  1.5.beta
3dBorderExtractionImg.cpp File Reference
#include <iostream>
#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/Viewer3D.h"
#include "DGtal/helpers/StdDefs.h"
#include "ConfigExamples.h"
Include dependency graph for 3dBorderExtractionImg.cpp:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author
Bertrand Kerautret (kerau.nosp@m.tre@.nosp@m.loria.nosp@m..fr ) LORIA (CNRS, UMR 7503), University of Nancy, France
Date
2011/03/25

An example file named 3dBorderExtraction.

This file is part of the DGtal library.

Definition in file 3dBorderExtractionImg.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 65 of file 3dBorderExtractionImg.cpp.

66 {
67 
68  std::string inputFilename = examplesPath + "samples/Al.100.vol";
69  QApplication application(argc,argv);
70  Viewer3D<> viewer;
71  viewer.show();
72 
74  Image image = VolReader<Image>::importVol(inputFilename);
75  Z3i::DigitalSet set3d (image.domain());
77  Z3i::Object18_6 obj3d (Z3i::dt18_6, set3d);
78  Z3i::Object18_6 border = obj3d.border();
79  viewer << border;
80  viewer << ClippingPlane(0,1,0, -40) << Viewer3D<>::updateDisplay;
81 
82  return application.exec();
83 }
Aim: A wrapper class around a STL associative container for storing sets of digital points within som...
Aim: implements association bewteen points lying in a digital domain and values.
Definition: Image.h:70
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
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Class for adding a Clipping plane through the Viewer3D stream. Realizes the concept CDrawableWithView...
Aim: Define utilities to convert a digital set into an image.
Definition: SetFromImage.h:64
Aim: implements methods to read a "Vol" file format.
Definition: VolReader.h:90
ImageContainerBySTLVector< Domain, Value > Image

References DGtal::Object< TDigitalTopology, TDigitalSet >::border(), and DGtal::Viewer3D< TSpace, TKSpace >::show().