Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I new in OpenGl, I am trying to load ct scan into openGl and create 3d model form it. I foiund marching cube but nothing in opengl to implement or start with. any suggestion help will be more than welcome .

What I have tried:

Marching cube in openGl tutorial .(nothing found )
I found a project in source code and run it but seem hard coded I tried to understand the code but I can't .
Posted
Comments
Sergey Alexandrovich Kryukov 19-Apr-16 9:37am    
Not clear. And I'm curious: what could "volume rendering" possibly mean?
—SA
enhzflep 19-Apr-16 10:01am    
As for "volume rendering", any one of the 1,020,000 search results can explain it far better than I.
Once you understand the term, the question is perfectly clear. ;)
Sergey Alexandrovich Kryukov 19-Apr-16 14:01pm    
Thank you very much. It's totally clear what is it, but at first I was pretty much sure it wasn't a really existing term, as the expression sounds way too ugly and illogical. I still think so, but we do use many ugly terms, just because they exist.
—SA
leon de boer 19-Apr-16 10:18am    
https://en.wikipedia.org/wiki/Volume_rendering
Its a very very specific scientific and computer graphic term.
People sometimes use the term voxels or surface extraction for what it is.

Now to deal with the OP.
Sergey Alexandrovich Kryukov 19-Apr-16 14:03pm    
Thank you very much. It's totally clear what is it, but at first I was pretty much sure it wasn't a really existing term, as the expression sounds way too ugly and illogical. Do you understand what I mean? I still think so, but we do use many ugly terms, just because they exist.

But, by the way, there is nothing "very specific" and nothing at all scientific. To me, it's more like professional jargon of practical developers.

—SA

1 solution

Paul Bourke a lecturer from University of Western Australia has the best layman explaination and code I have seen for marching cubes.

Polygonising a scalar field (Marching Cubes)[^]

He shows you what is happening as well as the code.

Essentially you start with a box around what is usually a point cloud and then you start subdividing each face using the 45 degree face between them (his pictures make it clearer). So long as no point lies outside the face you continue the process over and over again marching the cubes down and subdividing more and more.

What you are left with when you can collapse the marching cubes no more is the shape that fits around the volume of the cloud points. That is where the process gets its name you have the surface render that fully encloses the random set of points (volume). Its used a lot it medical imaging where they construct the point cloud from CRT scans and then they want a surface mesh of the point cloud.
 
Share this answer
 
v3
Comments
enhzflep 19-Apr-16 11:20am    
My +5

Raymarching is another technique some find suitable for their needs.
The best explanation I've seen for it comes from rgba's member, Iq.

Here: texturing and raymarching

He's got bushels of good articles and code there - all performance and/or size oriented. :) - he was even invited to Siggraph '07 to give a presentation!
leon de boer 19-Apr-16 12:15pm    
Oh I like that one ... that is slick.
enhzflep 19-Apr-16 12:20pm    
It seemed the least I could do after you left a link to such good quality material from a fellow aussie. :)
Sergey Alexandrovich Kryukov 19-Apr-16 14:03pm    
5ed.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900