[vtkusers] Integration Volume Rendering Cuda Classes (NAMIC) in VTK

Francesco Piccolo piccolo.francesco at gmail.com
Tue Jul 15 04:23:26 EDT 2008


Hi,

these are Mauro Russo e Francesco Piccolo, students of Computer Science
Engineering at Federico II University in Naples.

Actually we are working toward the B.S. in Information Technology
Engineering. Our thesis aim is to develop an application able to render, in
real-time and with high-definition too, a medical dataset by using
volumetric ray casting techniques.
We found your work on the NAMIC site and we realize it is a great solution
to parallelize the render algorithm on GPU and CPU by using CUDA.

We have closely followed your work
http://www.na-mic.org/svn/Slicer3/branches/cuda/Modules/VolumeRenderingCuda/
that has allowed us to integrate new VTK classes (VolumeRenderingCuda) with
some class for CUDA support (CudaSupport).

We have found several difficulties:

1-    first of all how to match your pipeline with the traditional volume
rendering pipeline. Your pipeline taken as a reference is on NA-MIC's site,
link (
http://www.slicer.org/slicerWiki/index.php/Slicer3:Volume_Rendering_With_Cuda);
our pipeline is attached with this mail (see FIG1.pdf).
The first problem is how to use vtkCudaImageData class after making the
filtering. The output is:
"ERROR: In ..\..\Filtering\vtkDemandDrivenPipeline.cxx, line 795
vtkStreamingDemandDrivenPipeline (02EEE500): Input for connection index 0 on
input port index 0 for algorithm vtkVolumeCudaMapper(02EE4C60) is of type
vtkCudaImageData, but a vtkImageData is required."
In short we cannot give as parameter an object of vtkCudaImageData type to
vtkVolumeCudaMapper's function SetInput(). Instead this function take as
parameter an object of vtkImageData (this is an execution time error, it
isn't a compiler's error; this means the call is syntactically correct
because vtkCudaImageData inherits from vtkImageData).
The code that we use is:

vtkImageData *imageData = vtkImageData::New();
     imageData = shiftScale->GetOutput();

vtkCudaImageDataFilter* filter = vtkCudaImageDataFilter::New();
     filter->SetInput(imageData);
     filter->Update();

     vtkCudaImageData *cudaImageData = vtkCudaImageData::New();
     cudaImageData = filter->GetOutput();

volumeCudaMapper->SetInput(cudaImageData);

2-    We use vtkVolumeRayCastMapper class in our pipeline; this class
doesn't match exactly with any classes of your project. You use
vtkVolumeCudaMapper as mapper class where is defined Render() function
(implementation of the same function declared in vtkVolumeMapper abstract
class). Inside Render() we find the call to CUDA function,
CUDArenderAlgo_doRender().
Our question is: how shall we use this class and its function Render()? Can
you send us an example of use?
It seems that for this class is not required to set an appropriate composite
function. So how to model the transfer function?

3-    Finally, we noted you use vtkSlicerRenderView to display the render, a
specific class for SLICER3 integration. Can we use another classes to
display the render? (vtkRenderer and vtkRendererWindow).

Our configuration is:
         Operating System:                    WindowsXP
         Development environment:       Visual Studio 2005
Graphics card                          NVIDIA GeForce 8800 GT

Thank you for all your answers and congratulations for the work you are
doing.

Best regards,
Mauro Russo                           mauro.russo at virgilio.it
Francesco Piccolo                   piccolo.francesco at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080715/945e90bd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FIG1.pdf
Type: application/pdf
Size: 3787 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080715/945e90bd/attachment.pdf>


More information about the vtkusers mailing list