32#include "DGtal/base/Common.h"
33#include "DGtal/io/viewers/PolyscopeViewer.h"
34#include "DGtal/io/Color.h"
35#include "DGtal/io/readers/VolReader.h"
36#include "DGtal/helpers/StdDefs.h"
37#include "DGtal/shapes/Shapes.h"
38#include "DGtal/math/BasicMathFunctions.h"
39#include "DGtal/kernel/BasicPointFunctors.h"
40#include "ConfigTest.h"
53int main(
int argc,
char** argv )
58 trace.beginBlock(
"Testing Viewer with display of 3D Image ");
61 Point p2( 125, 188, 0 );
62 Point p3( 30, 30, 30 );
64 std::string filename = testPath +
"samples/lobsterCroped.vol";
68 viewer <<
Color(255, 255, 200);
74 invFunctor(image3d.domain().upperBound()));
81 SliceImageAdapter sliceImageZ(image3d, domain2D, aSliceFunctorZ, idV);
83 std::string name = viewer.
draw(sliceImageZ);
84 viewer.
data[name].transform.translate(Eigen::Vector3d(0, 0, -10));
86 viewer << p1 << p2 << p3;
88 trace.emphase() <<
"Passed." << endl;
53int main(
int argc,
char** argv ) {
…}
Structure representing an RGB triple with alpha component.
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
Z3i this namespace gathers the standard of types for 3D imagery.
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)