#include <iostream>
#include "DGtal/io/readers/VolReader.h"
#include "DGtal/base/Common.h"
#include "DGtal/images/ImageHelper.h"
#include "DGtal/images/ImageContainerBySTLVector.h"
#include "DGtal/kernel/BasicPointFunctors.h"
#include "ConfigExamples.h"
#include "DGtal/io/viewers/PolyscopeViewer.h"
#include "DGtal/io/Color.h"
int main(
int argc,
char** argv )
{
PolyscopeViewer viewer;
std::string inputFilename = examplesPath + "samples/lobster.vol";
transTo2DdomainFunctorZ(imageVol.domain().upperBound()));
MySliceImageAdapter aSliceImageZ(imageVol, domain2DZ, aSliceFunctorZ, identityFunctor );
transTo2DdomainFunctorY(imageVol.domain().upperBound()));
MySliceImageAdapter aSliceImageY(imageVol, domain2DY, aSliceFunctorY, identityFunctor );
viewer.
draw(aSliceImageZ);
std::string imageY = viewer.
draw(aSliceImageY);
viewer.
data[imageY].transform.rotate(Eigen::AngleAxisd(M_PI / 2, Eigen::Vector3d::UnitX()));
viewer.
data[imageY].transform.translate(Eigen::Vector3d(0, 50, -50));
return 0;
}
Aim: implements a const image adapter with a given domain (i.e. a subdomain) and 2 functors : g for d...
std::string draw(const Point &p, const std::string &uname="Point_{i}")
std::map< std::string, DisplayData< RealPoint > > data
void show() override
Starts the event loop and display of elements.
HyperRectDomain< Space > Domain
DGtal is the top-level namespace which contains all DGtal functions and types.
static ImageContainer importVol(const std::string &filename, const Functor &aFunctor=Functor())
Aim: Define a simple default functor that just returns its argument.
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
void initAddOneDim(const Dimension &newDim)
void initRemoveOneDim(const Dimension &dimRemoved)