VolumeRendering

Slicer Framework

Dicom Framework | | Pre- and Post- Classification

The slicer frame work (slicer.h) renders a slice through a tetrahedron, specified by 4 corner points.

inline void slice(const v3d &v0, // vertex v0 of tet
                  const v3d &v1, // vertex v1 of tet
                  const v3d &v2, // vertex v2 of tet
                  const v3d &v3, // vertex v3 of tet
                  const v3d &o,  // origin of cutting plane
                  const v3d &n); // normal of cutting plane

It extracts either a triangle or a quad depending on the extraction case and pushes the vertices via glvertex3d(). Texture coordinates are identical to the vertices are also generated via glTexCoord3f().

Input parameters are specified by means of the v3d header-only class, which encapsulates a 3D vector. For example the point p with coordinates x,y,z is instanciated as v3d object with the following C++ code:

v3d p(x,y,z);

Usual vector operations like addition, scalar product etc. are available as overloaded operators, for example the addition of two vectors:

v3d a(1,0,0), b(0,0,1);
v3d p=a+b;


Dicom Framework | | Pre- and Post- Classification

Options: