32 #include "DGtal/base/Common.h"
33 #include "DGtal/io/viewers/Viewer3D.h"
34 #include "DGtal/io/DrawWithDisplay3DModifier.h"
35 #include "DGtal/io/Color.h"
36 #include "DGtal/io/readers/VolReader.h"
37 #include "DGtal/helpers/StdDefs.h"
38 #include "DGtal/shapes/Shapes.h"
39 #include "DGtal/math/BasicMathFunctions.h"
40 #include "ConfigTest.h"
41 #include "DGtal/io/colormaps/HueShadeColorMap.h"
47 using namespace DGtal;
61 unsigned int nbok = 0;
66 trace.
info() <<
"(" << nbok <<
"/" << nb <<
") "
67 <<
"true == true" << std::endl;
75 unsigned int operator() (
unsigned int aVal)
const
85 int main(
int argc,
char** argv )
89 QApplication application(argc,argv);
91 viewer.setWindowTitle(
"simpleViewer");
96 Point p2( 125, 188, 0 );
97 Point p3( 30, 30, 30 );
99 std::string filename = testPath +
"samples/lobsterCroped.vol";
104 viewer <<
SetMode3D(image3d.className(),
"BoundingBox");
106 viewer << DGtal::AddTextureImage3DWithFunctor<Image3D, hueFct , Space, KSpace>(image3d, huefct,
Viewer3D<>::RGBMode );
112 invFunctor(image3d.domain().upperBound()));
119 SliceImageAdapter sliceImageZ(image3d, domain2D, aSliceFunctorZ, idV);
121 viewer << sliceImageZ;
124 viewer << p1 << p2 << p3;
125 viewer << Viewer3D<>::updateDisplay;
128 bool res = application.exec();
129 trace.
emphase() << ( res ?
"Passed." :
"Error." ) << endl;
void beginBlock(const std::string &keyword="")
virtual void setFillTransparency(unsigned char alpha)
virtual void show()
Overload QWidget method in order to add a call to updateList() method (to ensure that the lists are w...
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void initRemoveOneDim(const Dimension &dimRemoved)
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
Aim: Define a simple default functor that just returns its argument.
Aim: implements methods to read a "Vol" file format.
DGtal::uint32_t getRGB() const
DGtal is the top-level namespace which contains all DGtal functions and types.
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...
Modifier class in a Display3D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithDisplay3D.