[Rtk-users] CUDA 3D texture memory management

MORY, CYRIL Cyril.Mory at philips.com
Fri May 24 05:44:55 EDT 2013


Hi everyone,

I'm converting a filter I've designed into CUDA, and I'm new to CUDA. The filter takes in input a 4d image (3D +time), interpolates between two instants (two 3D images taken from the 4D image by selecting a given instant) to obtain a 3D image, and forward projects through this 3D image. I already have an interpolation kernel that works, it uses global memory to store both the 4D image and the interpolated 3D image (there probably is a better way, but I'll optimize that later). For the forward projection, I'd like to reuse as much as possible the rtkCudaForwardProjectionImageFilter code, but :

-          rtkCudaForwardProjectionImageFilter stores its input 3D volume into a 3D texture

-          texture memory, I think, is read-only for threads

-          So I can't fill in the 3D texture during interpolation
I think I need to work with global memory during interpolation to generate the 3D volume, then somehow copy the result to a 3D texture, and use the existing (maybe slightly modified) forward projection function to get the projection.

My problem is in the "somehow"... Do I need to actually copy the data from the global memory to the texture memory ? Or is it enough to bind it to a texture ? Does anyone have an example somewhere ?

Regards,
==========================================
Cyril Mory
PhD student at Philips Medisys and CREATIS

Groupement Hospitalier Est
Hôpital Cardiologique Louis Pradel
Laboratoire CREATIS - Bât. B13
CNRS UMR5220, INSERM U1044, INSA-Lyon, Univ. Lyon 1
28, Avenue du Doyen LEPINE
69677 Bron cedex FRANCE

Office : +33 4 72 35 74 12
Cell : +33 6 69 46 73 79


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20130524/bc7b9636/attachment-0008.html>


More information about the Rtk-users mailing list