ServiceViewer

Chair for Computer Aided Medical Procedures & Augmented Reality
Lehrstuhl für Informatikanwendungen in der Medizin & Augmented Reality

Viewer

The cvs branch formerly known as Viewer_2_0 is now merged as the main version (aka. cvs head). This means from know on every service should be written to use this new viewer and its interface. Older services should be ported to the new interface as soon as possible.

This new version brings you:

  • improved performance & stability (sorry not yet)
  • improved flexibility of the Interface
  • all scenegraph changes can be made at runtime, the follwing is an excerpt:
    • 3D objects can be inserted, deleted and moved in the scenegraph
    • 3D object properties can be changed, like their color, scale or drawstyle
    • position data receivers and their DWARF needs can be created and deleted
    • all named objects within a wrapperkit can be connected and disconnected to a position data receiver
    • objects in the scenegraph can be arranged hirachical, e.g. 3D objects like arms of a body can be relative to the body and position data receivers can be relative to each other

Warning: The old version of the interface is discontinued and won't be updated anymore.

Table of Contents


fmi.png This is the 3D Renderer for usage in DWARF applications. It is highly specialized for and integrated within it's DWARF environment. The DWARF Viewer supports rendering of 3D scenes in various file formats such as OpenInventor (.iv) VRML 1&2 (.wrl). Further the DWARF Viewer supports 3 different render modes for mono- and stereovision.

  • line-interleaved stereo for some HMD's (e.g. iglasses) and a broad range of stereo-beamers.
  • anaglyphic stereo (red/cyan or red/green) for standard red/cyan glasses.
  • mono rendering for presentation purposes where a real stereo impression is not needed/wanted.

In addition the viewer supports a videoseethrough mode where a videosignal is overlayed by 3D Graphics.

The viewer is based on the OpenInventor Implementation Coin by Systems in Motion.

The position of the virtual camera and arbitrary objects in the scene can be modified with tracking data delivered by DWARF tracking subsystem.

Thanks to the Studierstube project for providing code snippets and ideas through their open source Framework.

Needs & Abilities

As stated in the Viewer.xml file, the service has the following Needs and Abilities.

(the following are for automatic label placement, still in unstable phase, can safely be ignored)

Interaction with other Services

The Viewer can be controlled by the UIC?, the ServiceModel?, a combination of both, or arbitrary DWARF services which send DWARF events for SceneData, UserAction?, and CameraMatrix.

More Documentation

Source is, to a certain degree, commented

How-To

See DwarfUserInterfaceTutorial

Installation

For building the Viewer Coin3D from Systems in Motion and the SoQt - window binding is needed. The package can be downloaded here. RPM's will be available here soon. If you have a running DWARF installation, do a make install in the Viewer directory. This creates an application called Viewer which can be started on the command line.

To get the current frame rate displayed in the viewer, you should set the environment variable COIN_SHOW_FPS_COUNTER to 1. e.g. for the bash shell: export COIN_SHOW_FPS_COUNTER=1.

Note: COIN_SHOW_FPS_COUNTER shows two numbers. The left number is the maximum frame rate that would be possible with the current scene, the right number is the current frame rate.

Testing

Just start the ServiceViewer and the ServiceManualTracker and set the ThingType? to "Viewpoint". Use the -Dmodel command line parameter to load an Inventor or VRML model on startup.

Command Line Parameter

You can use the following command line parameter:

Videoseethrough
-Dvideobackround=(yes|no) (default: no)
Stereomode
-Dstereomode=(anaglyphic|lineinterleaved|none) (default: none)
Fullscreen
-Dfullscreen=(yes|no) (default: no)
Resolution
-Dresolutionx= (default: 640) -Dresolutiony= (default: 480)
WindowPos
-DwindowPositionX (default: 0)
-DwindowPositionY (default: 0)
Model
-Dmodel= (default: none)
ServiceName
-Dservicename= (default: Viewer)
Field of view
-Dfov= (default: 90)
Eyeangle
-Deyeangle= (default 0)
Backgroundcolor
-Dbackgroundcolor=<0=black 1=white> (default 0)
maxFPS
-DmaxFPS= (default 0, i.e. disabled, also disabled if negative)
minFPS
-DminFPS= (default 30, i.e. 30 FPS, also 30 FPS if negative)

Known Bugs and Limitations

The ServiceViewer has a very limited or none errorhandling (e.g. it'll crash if you try to select a 3D object that isn't in the scene).

  • Update 13 Aug 2003: Error handling is now available but not yet really mature. There are some feature's missing needed for easy adding/removing widgets to manipulate the scene indirectly. Some performance problems occur when a lot of tracked objects deliver PoseData.
  • Update 13 Aug 2003: Several modifications on PoseData handling have been applied. Speedup has been observed but no real benchmarks...
  • Bugreport 10 Oct 2003: Using the -Dvideobackground=yes and -Dmodel=xxx option for video see-through works only in the order ./viewer -Dvideobackgroung=yes -Dmodel=xxx and not the other way around.
  • Update 10 Oct 2003: For video ST displays: The command line parameter -Dfov should be set to 40 using the iBot camera with markers for a more precise overlay.

Q: How can a virtual camera be modeled with only one internal parameter? What about distortion and image center? JoergTraub 10 Oct 2003

Old Stuff

ViewerWishList and RefactoringTheViewer

History



Edit | Attach | Refresh | Diffs | More | Revision r1.31 - 11 Jul 2005 - 12:53 - MarcusToennis

Lehrstuhl für Computer Aided Medical Procedures & Augmented Reality    rss.gif