[vtkusers] performance of MIP mappers

Jesús Spí­nola jspinola at gmail.com
Tue Apr 10 04:43:43 EDT 2007


Will this changes be commited to the official release of vtk, or this is
only a patch you made?

On 4/10/07, Michael Knopke <Michael.Knopke at gmx.de> wrote:
>
>  Hi Mark,
>
> I made some changes to vtkOpenGLTextureMapper that enables MIP. Actually
> this is pretty easy to do, so I was always wondering why it was never
> included.
>
> You just have to change the appropriate lines so that :
>
>
>
> 1)
>
> Line 311: (this is the position for 1 component, need to be adjusted for
> the other parts that handle more than one component too)
>
>
>
> // added MIP functionality
>
>   if(this->Superclass::GetBlendMode() == 0){
>
>     glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
>
>   }
>
>   else if(this->Superclass::GetBlendMode() == MAXIMUM_INTENSITY_BLEND){
>
>   glBlendFunc( GL_ONE, GL_ONE);
>
>   vtkgl::BlendEquation(vtkgl::MAX_EXT);
>
>   }
>
>
>
> 2)
>
> At the end of vtkOpenGLTextureMapper:
>
>
>
> To activate the BlendEquation extension you need to load it:
>
>
>
> int supports_GL_EXT_blend_minmax       = extensions->ExtensionSupported(
> "GL_EXT_blend_minmax" );
>
>
>
> if(supports_GL_EXT_blend_minmax)
>
>     {
>
>      extensions->LoadExtension("GL_EXT_blend_minmax");
>
>     }
>
>
>
> 3)
>
>
>
> Extent the enum in vtkVolumeMapper.h
>
> enum
>
>   {
>
>     COMPOSITE_BLEND,
>
>     MAXIMUM_INTENSITY_BLEND,
>
>   };
>
>
>
> And add a function that lets you choose this enum. (SetBlendModeTo
> MaximumIntensityBlend)
>
>
>
> That's it!
>
>
>
> Regards,
>
>
>
> Michael
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070410/56d59c90/attachment.htm>


More information about the vtkusers mailing list