Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Obating an XRay effect

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2009
    Posts
    3

    Obating an XRay effect

    i am working on a medical software project i am facing a problem
    i render a number of give slices from a volume dataset and i need to apply a blending on them to have an X-ray image effect, but i didn't succeeded.
    i have done this at past using delphi and an opengl extenstion library known as DGL using this code:
    glEnable(GL_BLEND);
    glBlendFunc(GL_CONSTANT_ALPHA_EXT, GL_ONE);
    glBlendColorEXT(1.0, 1.0, 1.0, 1.0/npicNum);

    now i am using Visual Studio 2008 C++ and opengl ihave used the GLEW extension but i didn't find the similar method and constants that do the same effect as with the delphi.
    Kindly, if any one have any suggestion it will be appreciated.
    Cordialement
    Kind regards,
    -----------
    Ahmed Khaled Omer, B.Sc.
    Medical Imaging Software Developer

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,575

    Re: Obating an XRay effect

    for constants, be sure to get glext.h and for glBlendColorEXT one can use GLEW or Glee if you don't want to get the pointer yourself.

    For reference :
    http://www.opengl.org/wiki/Getting_s...and_extensions

  3. #3
    Senior Member OpenGL Pro Ilian Dinev's Avatar
    Join Date
    Jan 2008
    Location
    Watford, UK
    Posts
    1,294

    Re: Obating an XRay effect

    glBlendFunc(GL_ONE, GL_ONE); // additive blending

    could be useful.

  4. #4
    Junior Member Newbie
    Join Date
    Aug 2009
    Posts
    3

    Re: Obating an XRay effect

    For the GLEW does it support 64-bit as icompiled it using VC++ 9 x64 and i get a linkage error due to the presence of the glBlendColorEXT method
    Cordialement
    Kind regards,
    -----------
    Ahmed Khaled Omer, B.Sc.
    Medical Imaging Software Developer

  5. #5
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,962

    Re: Obating an XRay effect

    Quote Originally Posted by Ilian Dinev
    glBlendFunc(GL_ONE, GL_ONE); // additive blending

    could be useful.
    Correct, this is what you need for an x-ray effect, or glBlendFunc(GL_SRC_ALPHA, GL_ONE); depending on whether your intensity is stored in color or alpha (or both).

Posting Permissions

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