TeraRecon, Inc. Real Time Visualization June-25-2001 ======================= Software Postwarp using the VLIPlus library The VLIPlus library provides a software postwarp for the VolumePro500. The software postwarp may be used alone, generating a bitmap, or with the included display capability. These allow the VolumePro500 to be used in environments where hardware acceleration of OpenGL is not available or is otherwise undesirable. Both VLIPlus and the example, spinner, are structured such they can be used on both Microsoft Windows and X windows. However, only the Windows version is being made available at this time. INSTALL VLIPLUS ================ Unzip vliplus.zip and double click VLIPlus\setup.exe This will install : VliPlus.exe and vliplus.dll in c:\progran files\Volumepro\bin Following include files in C:\Program Files\VolumePro\inc VLIPlus.h VLIPlusContext.h VLIPlusDisplay.h VLIPlusDisplayNT.h VLIPostWarp.h VLIPlusExport.h VLISWPostWarp.h vliplus.lib in C:\Program Files\VolumePro\lib and example source files in c:\program files\Volumepro\VLIPlus\Spinner. Build environment : Spinner is set to build with Microsoft Visual C++ 6.0. You have to have VolumePro_SDK Version 2.1 installed on your system to cpmpile this program. Postwarp The software postwarp uses a bilinear filter to map the baseplane output of the VolumePro500 to a postwarped bitmap. The performance and accuracy of this postwarp depends on the CPU: On an Intel Pentium III and above a highly optimized bilinear filter is used. This runs far faster than the standard filter but with a reduced precision. Sub-pixel accuracy is limited to 1/16 of a pixel in X and 1/8 in Y. This precision may show artifacts with larger zoom factors. For example, displaying a 32x32x32 volume at 512x512x512 will be visibly different from the full precision filter. The RGBA calculation is always done in full 8888. On other x86 CPUs -- or on Pentium III systems that do not permit the Pentium III extensions to be used -- a less optimized filter is used. However, this filter runs at full precision. A Pentium II, or equivalent, is recommended as a minimum. NOTE: To use the general x86 routine on a Pentium III processor, override FilterScanlinePIII in CVLISWPostWarp to call FilterScanline. Performance on non-x86 processors is unsatisfactory and is therefore not supported. Display VLIPlusDisplay provides a simple mechanism to output the output of the postwarp to the display. On Win32 (VLIPlusDisplayNT) this uses GDI using 32bit DIBs. On systems with an 8bit display (for example hi-resolution monochrome displays) an 8bit DIB is built from the green channel from the image and displayed using the system palette. (Use a gray scale system palette for best results in 8bpp.) Spinner A sample application, spinner, is supplied to demonstrate how to use the software postwarp and display capabilities as well as provide a mechanism for testing the postwarp and display performance. In all the following, filename refers to a vox file, with the .vox extension. Hitting q always ends the program. Spinner may be used interactively: spinner filename Drag with the left mouse button to rotate the volume. Drag with the right mouse button to change the window/level. Hold down the shift key and drag horizontally zooms the image in and out. To run a standard animation: spinner filename -a [n] By default this runs 128 frames. Specify a frame count, n, for different lengths. 0 indicates indefinite. The animation repeats after 128 frames. An averaged frame rate is output once spinner ends. To disable the display but still perform the postwatrp: spinner filename -a [n] -nd To disable the postwarp and display: spinner filename -a [n] -nw Comparing the output of these three -a options indicates the relative performance of the display and postwarp. Any of the -a options also accepts a -sb flag to force single buffer mode. By default animations are double buffered. Other options are available. Run spinner with no arguments to see them. Spinner is structured with a portable core (spinner_window) and platform specific interfaces, such as spinner_window_nt for Win32. Line drawing support VLISWPostwarp in VLIPlus has the ability to draw alpha blended lines on the post-warped image using the DrawLine32bpp method. This is not currently optimized and has limited performance. The xxxx_NoFP methods are not currently implemented. Steps to perform a simple postwarp and display To postwarp a baseplane and display the result perform these steps: Prior to rendering, construct the VLIPlus objects. See Spinner_window::CreateDisplayConductor(). For each frame you can have VLI plus handle the process ('automatic mode') or perform the steps manually. See spinner_window::Render(). In automatic mode: CVLIPlus::Render() Otherwise: 1) CVLIPlus::Render() 2) CVLISWPostWarp::PrepareCanvas() 3) CVLIPlus::Fetch() 4) CVLIPlus::WarpBasePlane() 5) CVLIPlus::OnSync() 6) CVLIPlusContext:Release() In either mode this is then followed by: CVLIPlusDisplay->OnPaint() ay->OnPaint()