VTKEdge:FAQ
Requirement
Compile time
- VTKEdge svn compiles against VTK CVS.
- Some classes use CUDA to perform parallel computation: http://www.nvidia.com/object/cuda_get.html . As of April 17 2009, the only classes using CUDA are vtkKWEImageFFT and vtkKWEImageRFFT. Notably,
the vtkKWEGPUVolumeRayCastMapper does not require CUDA.
- In order to use the vtkKWEGPUInfo class under Windows, you need to install the DirectX SDK: http://www.microsoft.com/downloads/details.aspx?FamilyID=ea4894b5-e98d-44f6-842d-e32147237638&DisplayLang=en
- In order to use the vtkKWEGPUInfo class under Linux with nVidia cards, switch the cmake variable VTKEdge_USE_NVCONTROL to ON and install the NVCtrl library. It gives access to the NV-CONTROL X extension.
- If it is already installed on your system, you can find the library libXNVCtrl.a in /usr/lib/ and the header files NVCtrlLib.h and NVCtrl.h in /usr/include/NVCtrl/. On Ubuntu, those files are provided by the package "nvidia-settings".
- You can also get them from the source package of nvidia-settings from ftp://download.nvidia.com/XFree86/nvidia-settings/. With the source package, all the relevant files are in src/libXNVCtrl/. Make sure to download a version of nvidia-settings equal or greater to 177.82 to avoid any license issue. (on August 25 2008, nVidia acknowledges that there is a mistake in the license of the NVCtrl library prior to 177.82, it should be MIT-X11 / BSD instead of GPL, only the nvidia-settings application is covered by the GPL, not the NVCtrl library: http://www.nvnews.net/vbulletin/showpost.php?p=1756087&postcount=8 )
- the GUI based paintbrush tool demos require KWWidgets.
Run time
- The volume mapper works with nVidia cards from GeForce 6 series (or Quadro equivalent) and above
- The LIC algorithms work with nVidia cards from GeForce 8 series (or Quadro equivalent) and above
Issues
vtkKWEGPUVolumeRayCastMapper
fatal error C9999: Bad scope in ConvertLocalReferences()
This is an nVidia bug. It has been fixed by nVidia. Just update your driver.
- Example of driver version having this bug: nVidia Quadro FX 3600M, Driver, Windows Vista 64-bit, Multi Language, Precision M6300, v.167.55, A00. Release Date: 2/26/2008
- Example of driver version with the fix: nVidia Quadro FX 3600M, Driver, Windows Vista 64-bit, Multi Language, Precision M6300, v.175.75 ISV, A01. Release Date: 6/10/2008
- References:
TestKWEGPUArrayCalculator
Time out on Vista
Depending on how fast/slow is the graphics card, the computation on the GPU can take more than 2 seconds. On Vista, after a 2 seconds timeout, the Windows Vista's Timeout Detection and Recovery (TDR) kills all the graphics contexts, resets the graphics chip and recovers the graphics driver, in order to keep the operating system responsive.
ref: http://www.opengl.org/pipeline/article/vol003_7/
This reset actually freezes the test. And it really times out this time...
Questions
Does vtkKWEGPUVolumeRayCastMapper require CUDA?
No. See compile time section for classes that require CUDA. Remember that CUDA requires an nVidia card from the GeForce 8 series and above. See runtime section for classes requiring a GeForce 8 series and above.
How can I make vtkKWEGPUVolumeRayCastMapper run as fast as in VolView 3.0?
- Short answer: set up the required third-party libraries properly for the vtkKWEGPUInfoList and vtkKWEGPUInfo classes (see the compile section). Optionally, use vtkKWEVolumeRayCastMapper instead of vtkKWEGPUVolumeRayCastMapper.
- long answer:
- vtkKWEGPUVolumeRayCastMapper uses the vtkKWEGPUInfoList and vtkKWEGPUInfo classes to have an estimate of how much VRAM the GPU has. See the compile section to set up the required third-party libraries properly. If it is not set properly, the amount of VRAM returned is 0 and the volume mapper will look at the used-defined ivar MaxMemoryInBytes instead. If MaxMemoryInBytes is 0, it means the user did not defined any limit, the GPU volume mapper will assume 128MB of VRAM.
- VolView 3.0 does not use vtkKWEGPUVolumeRayCastMapper directly but uses vtkKWEVolumeRayCastMapper instead, a volume mapper chooser. See the next question for more details:
What is the difference between vtkKWEGPUVolumeRayCastMapper and vtkKWEVolumeRayCastMapper?
- vtkKWEGPUVolumeRayCastMapper is a volume mapper running on the GPU.
- vtkKWEVolumeRayCastMapper is a volume mapper chooser. It will pick a volume mapper for high resolution rendering (might be slow) and a volume mapper for low resolution rendering (fast enough for a good interaction). Depending on the hardware capabilities, amount of VRAM, type of the components of the datasets, type of rendering mode, the volume chooser will pick the right and best volume mapper for the job. For example, if the hardware does not support the GPU volume mapper, the volume chooser will pick a software ray cast mapper.
Does VTKEdge require KWWidgets?
No. You need them only if you'd like to build the GUI based paintbrush tool demos. See compile time section.
What kind of DICOM files does GPURenderDemo support?
It uses a rudimentary DICOM reader found in VTK. It accepts sequence of files. Its documentation ( vtkDICOMImageReader) tells it does not handle multi-frames DICOM datasets. If you want full DICOM support, use a dedicated DICOM library like GDCM.
What is this compile error in objidl.h in the Windows SDK?
If you encounter the following error:
C:\Program Files\Microsoft SDKs\Windows\V6.0A\include\objidl.h(11265) : error C2061: syntax error : identifier '__RPC__out_xcount_part' C:\Program Files\Microsoft SDKs\Windows\V6.0A\include\objidl.h(11266) : error C2059: syntax error : ')' C:\Program Files\Microsoft SDKs\Windows\V6.0A\include\objidl.h(11266) : fatal error C1903: unable to recover from previous error(s); stopping compilation
it is probably because you have DirectX SDK installed after the Windows SDK. If the DirectX SDK was installed after the Windows SDK, the DirectX \include directory will come before the Windows SDK \include directory in your PATH. This means that Visual Studio will be build with the version of objidl.h that ships in the DirectX SDK. You must build with the version of objidl.h that ships in the Windows SDK. Make sure the Windows SDK include path (like C:\Program Files\Microsoft SDKs\Windows\V6.0A\include or C:\Program Files\Microsoft SDKs\Windows\v7.0\Include) is at the top of the list to make the compiler use the SDK resources first.
- ref: http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/9779c9ad-e20c-4d73-9703-a1a308775e4b
- ref: http://www.vtk.org/pipermail/vtkusers/2009-April/100463.html
How to run ctest on Windows without errors about DartConfiguration.tcl?
If you are on Windows, and the following command (to submit a build to the Experimental section of the VTKEdge dashboard)
ctest -D Experimental
leads to errors like:
Cannot find file: C:/VTKEdge/BIN/bin/Release/DartConfiguration.tcl
it is probably because you build VTKEdge in Debug mode. For multi-configuration generators such as visual studio, it assumes that you have built your project for the Release configuration. Add -C Debug to explicitly asks ctest to test the Debug tree, like this:
ctest -D Experimental -C Debug