PDA

View Full Version : volume isosurface rendering



jrbcast
06-19-2002, 04:25 AM
I everybody,

i would like to render a part of a volume. I simply take the values that are close to a given one and then make a surface with them 8is not as easy ...). I have noticed that is not too much complex using openGL. In fact the most difficult thing is to extract a surface from the non regular mesh defined by those points. Someone told me it would be easier using VTK but it has been impossible for me to find a C++-VTK manual on the net. Do you know any? if not... do you know how can I do it with openGL?.

many thanks

ffish
06-19-2002, 04:38 AM
It would be nice if you had a regular, high(ish) resolution mesh. Then you could use 2D or 3D texture mapped volume rendering (relatively easy). If the mesh is unstructured, you would probably end up using marching cubes and possibly some sort of triangle decimation like those based on Hugues Hoppe's work (http://research.microsoft.com/~hoppe IIRC).

You may also use marching squares for slices through a dataset, then join the contours created to create a set of triangles.

You could also look into 3D Delauney triangulation, but that may be harder to code - I dunno, I've never tried the 3D case.

VTK may be easy to use, but I had a lot of trouble trying to get it configured on my computer. IMHO, if you implement the algorithms yourself, you will learn a lot more. BTW, OpenGL won't do any algorithmic stuff like this for you. OpenGL is only concerned with display of primitives. You will have to write the code that generates the primitives and just use OpenGL for the rendering. That is why someone suggested VTK - a lot of volume rendering algorithms have been implemented for you by the VTK authors.

Hope that helps.

jrbcast
06-19-2002, 04:54 AM
Yes, of course it helps, thanks.

I know I wold learn much more if i implement the algorithm but the problem is the time. it is not an obetive in my current work and it is only for make sure my program is doing well. :-(.

Thanks again

Won
06-19-2002, 05:14 AM
VTK? Did you try the VTK website at www.kitware.com? (http://www.kitware.com?) http://www.opengl.org/discussion_boards/ubb/smile.gif

-Won

jrbcast
06-19-2002, 05:56 AM
Originally posted by Won:
VTK? Did you try the VTK website at www.kitware.com? (http://www.kitware.com?) http://www.opengl.org/discussion_boards/ubb/smile.gif

-Won

yes i did, in fact is the firs site I visited :-(.

thanks

ffish
06-19-2002, 07:01 AM
Paul Bourke has some stuff on volume rendering (as well as heaps of general maths/graphics goodness):
http://astronomy.swin.edu.au/~pbourke/modelling/

especially:
http://astronomy.swin.edu.au/~pbourke/modelling/polygonise/

Note the source code links at the top. One has a GLUT demo app IIRC.

One thing to bear in mind if you are using the marching cubes algorithm is that is is protected by a patent. Depends on your usage I guess but if you are doing something commercial, it would be worth checking out the restrictions. IANAL, so I don't know what you can do with it, but I think that most university stuff should be alright.

Hope that helps.

Won
06-19-2002, 09:38 AM
http://public.kitware.com/VTK/doc/release/4.0/html/

Perhaps this more specific link will help, then. There is plenty of C++ documentation here.

-Won