Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Creating 3D Texture - Sample Help

  1. #1
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Creating 3D Texture - Sample Help

    Hi,
    One of the possible solutions I have been told in the forum is to load my medical images slices into a 3d Textures. How do to this, is another question in itself. I found a tutorial for 3d texturing http://gpwiki.org/index.php/OpenGL:T...ls:3D_Textures

    I was able to compile the code by making some changes. I'm going to study the code to see what I learn.

    My hope was either to
    1) Read the image and put in a slice of the cube. But how are the coordinates supposed to be set? (texture coords)

    2) Set each pixel color to the correct part of the array and then bind the slice.

    Any additional info that you guys can provide.

    I also purchased Real-time volume graphics that I hope it helps. I should it have by next week.
    thanks,
    Francisco

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2007
    Posts
    271

    Re: Creating 3D Texture - Sample Help

    While waiting for your book to come, start reading the following courses/tutorials:

    http://www.real-time-volume-graphics.org/?page_id=28

    The book is actually based upon these materials.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    801

    Re: Creating 3D Texture - Sample Help


    But how are the coordinates supposed to be set? (texture coords)
    This depends on what method you use for rendering of the volume.
    If you use object aligned 3D texture slicing, you will need to update the texture coordinates depending on the axis overlapping the viewing direction. If you use the view aligned 3D texture slicing, the texture coordinates are generated using a simple ray/box intersection.
    The book gives everything you would need. In addition, I have given some details on my blog here http://mmmovania.blogspot.com/2008/0...ed-volume.html
    Any more help, just ask here.
    Regards,
    Mobeen

  4. #4
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Re: Creating 3D Texture - Sample Help

    Mobeen,
    do you think I could get the code your wrote? I would be very interested not only the visualization but how to read the medical images. I was thinking to use imebra to read them.

    thanks,
    Francisco

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    801

    Re: Creating 3D Texture - Sample Help

    Well i can help u in the process. Itsjust backtofront blending with 3d texturemapping. The code can be obtained from the realtime volume gfx book site given above. For medical image formats i used a basic loader to read in raw ct data.for our application wehad a proprietory format.
    You shud giv it a try i will help u in the process.
    Regards,
    Mobeen

  6. #6
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Re: Creating 3D Texture - Sample Help

    Sure, I will. I already received the book (saturday delivery) and I'm finishing chapter 3. I'm going to take this week to read the book as much as I can. I like the book, but is all little pieces that I have to put together. It seems very difficult but I think I can do it.

  7. #7
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Re: Creating 3D Texture - Sample Help

    I'm having trouble compiling the code from the book. I posted another thread for that:
    http://www.opengl.org/discussion_boa...798#Post297798

  8. #8
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Re: Creating 3D Texture - Sample Help

    nevermind ... it compiles now...
    However, I encounter another error.

  9. #9
    Advanced Member Frequent Contributor
    Join Date
    Mar 2009
    Location
    Singapore
    Posts
    801

    Re: Creating 3D Texture - Sample Help

    what is the error?
    Regards,
    Mobeen

  10. #10
    Intern Contributor
    Join Date
    Apr 2011
    Location
    Miami, FL
    Posts
    54

    Re: Creating 3D Texture - Sample Help

    Now it compiles fine.
    The errors I get is at runtime due to CG. I have an ATI card which maybe the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •