August 9, 2007, 2:13am
Im not very expert OpenGl developper but my problem isn’t not trivial…and not for beginners too…
I’m developping a Multi-Planar Reconstruction for medical application and I’m a texture 3D that I cut with some quads for display different sections (Images 2D) translating plans…
Now, I would get back Images 2D diaplayed on the quads, in a buffer…but I don’t have Ideas what…
Do you have???
thank you very much
August 9, 2007, 3:45am
So basically you want to extract a 2D image layer from a 3D texture, is this correct? In such case, you can just draw a quad, textured with the appropiate texture layer and get the array of pixels using the ReadPixels function. I am not sure how this is an advanced question though…
I you don’t need the results back on the CPU, simply use
glTexSubImage to copy a portion of screen to texture (faster).
EDIT: more precise.
August 9, 2007, 8:18am
In fact i draw a quad but in my viewer ther are a lot of object and i would recover back onli the 2D cut and not all the screen
Yes of course.
Please read the link I posted.
August 10, 2007, 2:41am
In fact I would like get back the interpolted images in the seme qualities and size of original images source of texture
What prevents you from rendering your 2D quad (with appropriate scale to match texture size) on screen, then copy to tex, then clear (no swap) then do the real classic rendering ?
I am not sure if you are advanced enough, but another possibility is to render to a
Search the web for other tutorials on opengl FBO.
August 13, 2007, 1:13am
thanks I 'll try with the FBO…
but with this object, can I get back the interpolated images? the parameter zoffset is int…
thank you very much…
August 14, 2007, 6:33am
I’m ssorry, another question…
can i with the FBO recover back all t possible cut image (In every direction) of texture 3D???
August 14, 2007, 11:16am
I don’t really understand… Just render the part of the 3d texture on a fullscreen quad, either using FBO or without it (doesn’t matter anyway). Then read or copy it. Like this (without vbo):
bind 3d texture
render a quad
repeat as much you want
render the scene