36 #include "DGtal/base/Common.h"
37 #include "DGtal/helpers/StdDefs.h"
38 #include "DGtal/io/viewers/Viewer3D.h"
43 using namespace DGtal;
48 typedef KSpace::SCell SCell;
53 std::map< DGtal::int32_t, Z3i::SCell > cells;
58 std::map< DGtal::int32_t, Z3i::Point > voxels;
63 BigDataCells* bg = (BigDataCells*) data;
64 stringstream ssMessage;
65 ssMessage <<
"Reaction1 with name " << name <<
" cell " << bg->K.sKCoords( bg->cells[ name ] ) ;
66 ((
MyViewer *) viewer)->displayMessage(QString(ssMessage.str().c_str()), 100000);
67 trace.
info() << ssMessage.str() << std::endl;
72 BigDataCells* bg = (BigDataCells*) data;
73 stringstream ssMessage;
74 ssMessage <<
"Reaction23 with name " << name <<
" cell " << bg->K.sKCoords( bg->cells[ name ] );
75 ((
MyViewer *) viewer)->displayMessage(QString(ssMessage.str().c_str()), 100000);
76 trace.
info() << ssMessage.str() << std::endl;
81 BigDataVoxels* bg = (BigDataVoxels*) data;
82 stringstream ssMessage;
83 ssMessage <<
"Reaction4 with name " << name <<
" Voxel " << bg->voxels[name] ;
84 ((
MyViewer *) viewer)->displayMessage(QString(ssMessage.str().c_str()), 100000);
85 trace.
info() << ssMessage.str() << std::endl;
91 int main(
int argc,
char** argv )
93 QApplication application(argc,argv);
100 K.init( p1, p2,
true );
105 dataV.voxels[4001] = v1;
106 dataV.voxels[4002] = v2;
107 dataV.voxels[4003] = v3;
112 viewer.displayMessage(QString(
"You can use [shift + click right] on surfels or voxel to interact ..."), 100000);
113 Z3i::SCell surfel1 = K.sCell( Point( 1, 1, 2 ), KSpace::POS );
114 Z3i::SCell surfel2 = K.sCell( Point( 3, 3, 4 ), KSpace::NEG );
115 Z3i::SCell surfel3 = K.sCell( Point( 5, 6, 5 ), KSpace::POS );
116 data.cells[ 10001 ] = surfel1;
117 data.cells[ 10002 ] = surfel2;
118 data.cells[ 10003 ] = surfel3;
132 return application.exec();
std::string className() const
KhalimskySpaceND< 2, Integer > KSpace
Display::SelectCallbackFct SelectCallbackFct
DGtal is the top-level namespace which contains all DGtal functions and types.
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value...
boost::int32_t int32_t
signed 32-bit integer.
Modifier class in a Display3D stream. Useful to choose your own mode for a given class. Realizes the concept CDrawableWithDisplay3D.