<div dir="ltr">Hi David,<div><br></div><div>Didn't realize OpenGL2 backend was using vtkTexture. We are still on the old OpenGL backend (hopefully we will switch soon).</div><div><br></div><div>We have had our own (very simple) version of vtkImageStack based on vtkTexture for a while. Ours uses multi texturing to combine images, which is limited by the number of textures the OpenGL driver allows. I've been wanting to replace it with vtkImageStack for that reason but was always stopped by the lack of control of blending with vtkImageStack.</div><div><br></div><div>I think modifying vtkImageStack is a little more work than you suggest though. vtkTexture has control for blending (I guess you are referring to VTKTextureBlendingMode), but nothing that would be compatible with vtkImageStack. VTKTextureBlendingMode controls how multiple textures are combined together and with incoming fragment color rather than how the fragment is blended into the frame buffer. My understanding is that vtkImageStack combines images in the framebuffer, so to control blending you have to be able to set glBlendFunc and glBlendEquation for each vtkImageSlice. </div><div><br></div><div>I think one extra option that would be interesting for vtkImageStack is to allow rendering of all images in a texture rather than directly in the frame buffer. It would allow to combine all images in the stack in a very flexible way before rendering to the screen.</div><div><br></div><div>What do you think? </div><div><br></div><div>I'll try to find a time slot to work on those ideas. If I find the time I'll contact you to help me push the code to VTK.</div><div><br></div><div>Cheers.</div><div><br></div><div>s.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 1:59 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Simon,<div><br></div><div>The vtkTexture class provides some control over blending modes, and this feature could also be added to vtkOpenGLImageSliceMapper (which uses vtkTexture internally, for the OpenGL2 backend).  If it was added there, then it could be used with vtkImageStack or anywhere else that the vtkImageSlice/vtkImageActor classes are used.</div><div><br></div><div>I've had this feature on my mind for a long while, but I haven't had any work projects that need it yet.  If you want to tinker around with vtkOpenGLImageSliceMapper and get things working to your satisfaction, I'd gladly help to get your changes into VTK.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div> - David</div></font></span><div><div class="h5"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 3, 2016 at 11:41 AM, Simon Drouin <span dir="ltr"><<a href="mailto:drouin.simon@gmail.com" target="_blank">drouin.simon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>Looking for a class that behaves similarly to vtkImageStack but that allows for different types of blending between the slices ( basically, expose OpenGL controls for blending, i.e. glBlendFunc, and glBlendEquation). Is there a class that does that in VTK without relying on CPU-based image processing?</div><div><br></div><div>Thanks in advance.</div><span><font color="#888888"><div><br></div><div>Simon Drouin</div></font></span></div></blockquote></div></div></div></div></div></div>
</blockquote></div><br></div>