Difference between revisions of "Slicer3:Volume Rendering With Cuda"
Line 43: | Line 43: | ||
In the following image the pipeline is displayed together with the connections from the VTK, Slicer3 and CUDA frameworks. | In the following image the pipeline is displayed together with the connections from the VTK, Slicer3 and CUDA frameworks. | ||
− | [[Image:VtkCudaVolumeRenderingPipeline.png]] | + | [[Image:VtkCudaVolumeRenderingPipeline.png|frame|none|CUDA Volume Rendering Pipeline]] |
Description: | Description: |
Revision as of 21:22, 28 December 2007
Home < Slicer3:Volume Rendering With CudaContents
Objectives
The goal of this project is to implement a CUDA based Volume Rendering Technique inside of VTK and Slicer3.
Project Outline
Several steps have to be made to integrating a CUDA based volume rendering technique into vtk.
- Integrate CUDA runtime API support into VTK using a class based approach.
- Implement and Integrate a CUDA Volume Rendering algorithm.
- Integrate the algorithm into a VTK pipeline (described below)
- Create a user interface to control the flow of the Volume Rendering within Slicer3.
VTK Cuda Runtime API support
The c-interface to the CUDA objects and functions will be wrapped in a safe object oriented VTK-C++ class hierarchy.
Cuda Memory
Cuda memory comes in different shapes and forms:
- Host Memory: Non-Paged Memory on the host side for fast interaction with the CUDA devices. see vtkCudaHostMemory.h
- Linear Memory: Linerely arranged memory on the CUDA device. see vtkCudaMemory.h
- Pitch Memory: 2D memory arrays that are aligned in the correct fashion for a fast interaction on the cuda devices. (Arranged over the memory banks for quick access). see vtkCudaMemoryPitch.h
- Array Memory: Arrays allocated over the CUDA API. see vtkCudaMemoryArray.h
- Texture Memory: Not discussed here. see VTK Cuda Wrapper Classes
All these memories are derived from a base class (see vtkCudaMemoryBase.h) as shown in the following picture:
Cuda Volume Rendering Algorithm
The Code that we use so far has been implemented by Nicholas Harlambang and can be viewed at [1].
VTK Modules and Pipeline
These are the modules that will be created in order to integrate a Cuda based Volume Rendering into the Slicer3 pipeline
- A vtkImageReader: to read Volume data as any kind of Volume Data
- A vtkCudaImageFilter: A Filter to convert from the reader output to a cuda-able DataSet
- A vtkCudaDataSet: A new vtkDataSet where that holds and handles the data transfer from and to one or multiple CUDA devices.
- A vtkCudaVolumeMapper: A new vtkVolumeMapper that renders the scene using the
- lighting model
- a prepared Z buffer
- a camera position
- A [vtkTexture] and a Plane to render the result to
- An actor that places the volume into the scene
- Chain this pipeline together and attach it to a rendering window.
In the following image the pipeline is displayed together with the connections from the VTK, Slicer3 and CUDA frameworks.
Description:
- The Fat line displays the pipeline flow.
- Green colored fields are classes from the Slicer3 or vtk implementation
- Red colored fields are CUDA and hardware specific parts
- Blue colored fields are specially implemented parts for the communication of cuda and vtk and the volume rendering algorithms.
A Slicer3 User Interface
The GUI will be designed using KWWidgets. With this the user will be able to change the rendering resolution, step size, control the color sceme and load and store further information.
Tasks and timeline
Tasks
- Proof of concept
- Integrate into VTK
- Render the output from the code of Nicholas volume render sample into vtkImageViewer
- Adapt to Z-buffer
- Adapt lighting model
- Adapt to input Image
- Integration into Slicer
Timeline
From | To | Task |
---|---|---|
12/01/07 | 05/31/08 | Master Thesis Duration |
12/01/07 | 12/31/07 | Reading into the Project, Defining Basic Classes |
01/01/08 | 01/06/08 | Basic Class Definition Ready for Hands on Meeting |
01/07/08 | 01/12/08 | Hands on meeting in Salt Lake City |
01/14/08 | 02/01/08 | Further Implementation |
Resources
- For testing purposes: File:Heart256.raw Store this file in Slicer3/Modules/VolumeRenderingCuda/Testing/heart256.raw
- Also checkout the main project page at Slicer-IGT/GPU-IGT