Example of 2D image display in 3D by 3D embedding.
#include <iostream>
#include "DGtal/base/Common.h"
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/images/ImageHelper.h"
#include "ConfigExamples.h"
#include "DGtal/io/viewers/Viewer3D.h"
#include "DGtal/kernel/BasicPointFunctors.h"
int main(
int argc,
char** argv )
{
QApplication application(argc,argv);
MyViewer viewer;
std::string inputFilename = examplesPath + "samples/lobster.vol";
unsigned int pos=0;
for (double alpha = 0; alpha< 1.54; alpha+= 0.01){
ptCenter+
DGtal::Z3i::Point(
static_cast<int>(200.0*cos(alpha)),
static_cast<int>(100.0*sin(alpha))),
ImageAdapterExtractor extractedImage(imageVol, domainImage2D, embedder, idV);
viewer << extractedImage;
viewer << DGtal::UpdateImage3DEmbedding<Z3i::Space, Z3i::KSpace>(pos,
pos++;
}
viewer << MyViewer::updateDisplay;
return application.exec();
}
Aim: implements a const image adapter with a given domain (i.e. a subdomain) and 2 functors : g for d...
const Point & upperBound() const
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Aim: Functor that embeds a 2D point into a 3D space from two axis vectors and an origin point given i...
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: implements methods to read a "Vol" file format.
Aim: Define a simple default functor that just returns its argument.