Coin Logo http://www.sim.no
http://www.coin3d.org

SIMVoleon Documentation

2.0.1

SIM Voleon is a software development system for aiding in writing 3D graphics application containing so-called "volumetric data", as is often used in applications targeted at analysis tasks within the oil & gas industry (e.g. from seismic measurements), in medical imaging (for data generated by e.g. Nuclear Magnetic Resonance, Computer Tomography, or ultrasound equipment), and for many other purposes.

SIM Voleon is an add-on library to Systems in Motion's visualization platform technology, known as "Coin". Coin is a high-level 3D graphics library with a C++ Application Programming Interface. Its target audience is developers of 3D graphics applications worldwide.

The library has the following major features:

Here's a simple usage example, which sets up a complete environment for voxel visualization with the SIM Voleon library:

  #include <Inventor/Qt/SoQt.h>
  #include <Inventor/Qt/viewers/SoQtExaminerViewer.h>
  #include <Inventor/nodes/SoSeparator.h>
  #include <VolumeViz/nodes/SoTransferFunction.h>
  #include <VolumeViz/nodes/SoVolumeData.h>
  #include <VolumeViz/nodes/SoVolumeRender.h>
  #include <VolumeViz/nodes/SoVolumeRendering.h>
  
  static uint8_t *
  generate8bitVoxelSet(SbVec3s & dim)
  {
    const size_t blocksize = dim[0] * dim[1] * dim[2];
    uint8_t * voxels = new uint8_t[blocksize];
    (void)memset(voxels, 0, blocksize);
  
    float t = 0;
  
    while (t < 50) {
      SbVec3f v(sin((t + 1.4234) * 1.9) * sin(t) * 0.45 + 0.5,
                cos((t * 2.5) - 10) * 0.45 + 0.5,
                cos((t - 0.23123) * 3) * sin(t + 0.5) * cos(t) * 0.45 + 0.5);
  
      assert(v[0] < 1.0f && v[1] < 1.0f && v[2] < 1.0f);
      const int nx = int(dim[0] * v[0]);
      const int ny = int(dim[1] * v[1]);
      const int nz = int(dim[2] * v[2]);
  
      const int memposition = nz*dim[0]*dim[1] + ny*dim[0] + nx;
      voxels[memposition] = (uint8_t)(255.0 * cos(t));
  
      t += 0.001;
    }
  
    return voxels;
  }
  
  int
  main(int argc, char ** argv)
  {
    QWidget * window = SoQt::init(argv[0]);
    SoVolumeRendering::init();
  
    SoSeparator * root = new SoSeparator;
    root->ref();
  
    SbVec3s dim = SbVec3s(64, 64, 64);
    uint8_t * voxeldata = generate8bitVoxelSet(dim);
  
    // Add SoVolumeData to scene graph
    SoVolumeData * volumedata = new SoVolumeData();
    volumedata->setVolumeData(dim, voxeldata, SoVolumeData::UNSIGNED_BYTE);
    root->addChild(volumedata);
  
    // Add TransferFunction (color map) to scene graph
    SoTransferFunction * transfunc = new SoTransferFunction();
    root->addChild(transfunc);
  
    // Add VolumeRender to scene graph
    SoVolumeRender * volrend = new SoVolumeRender();
    root->addChild(volrend);
  
    SoQtExaminerViewer * viewer = new SoQtExaminerViewer(window);
    viewer->setBackgroundColor(SbColor(0.1f, 0.3f, 0.5f));
    viewer->setSceneGraph(root);
  
    viewer->show();
    SoQt::show(window);
    SoQt::mainLoop();
    delete viewer;
  
    root->unref();
    delete[] voxeldata;
  
    return 0;
  }

Hardware requirements:

vol-engine.png

SIM Voleon does currently support loading of VOL files, which is a format introduced by the book "Introduction To Volume Rendering", by Lichtenbelt, Crane and Naqvi (Hewlett-Packard / Prentice Hall), ISBN 0-13-861683-3. (See the SoVRVolFileReader class doc for info). Support for more file-formats can be added by extending the SoVolumeReader class.

Beware that large voxel sets are divided into sub cubes. The largest default sub cube size is by default set to 128x128x128, to match the TGS VolumeViz API. Current graphics cards can do much larger textures than this, achieving a higher framerate due to the reduced overhead of sub cube switching and slicing. A graphics card with 128+ MB and true hardware 3D texture support can easily handle voxel sets of size 256x256x256. Increasing the maximum sub cube size can really boost the performance if your graphics card can handle it. Call SoVolumeData::setPageSize(const SbVec3s & size) to adjust the maximum sub cube size. Keep in mind that allowing really large 3D textures might cause other textures to be swapped out of graphics memory, leading to reduced performance.

See also:
The documentation for the Coin library: <http://doc.coin3d.org/Coin>.

The documentation for the SoQt library: <http://doc.coin3d.org/SoQt>.


Copyright © 1998-2004 by Systems in Motion AS. All rights reserved.

Generated on Mon Jul 27 22:01:15 2009 for SIMVoleon by Doxygen. 1.5.7.1