<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>I'm using VTK 6.0, but with the fixed vtkTIFFReader added to my project.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>vtkImageActor::HasTranslucentPolygonalGeometry() seems to want image data of type unsigned char and 2 or 4 components in order to do transparency. I'm using vtkImageShiftScale to get unsigned char and am working on an algorithm to add an alpha component to my one component tiff data. Curious if this does the
 trick.<br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>I can understand the order is important if one of the actor is opaque, but why would this still be important when both are 50% transparent.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style:
 normal;"><span>In my app the loading of each image is initiated through a button. I would like to create an app which is independent of the order in which the user clicks these buttons.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><span>Maarten<br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2"
 face="Arial"> On Thursday, January 16, 2014 3:25:11 PM, David Gobbi <david.gobbi@gmail.com> wrote:<br> </font> </div>  <div class="y_msg_container">Are you using vtk-master (or perhaps a vtk 6.1 release candidate)?<br clear="none">The TIFF reader had a serious multi-frame bug in older versions.<br clear="none"><br clear="none">First, note that the vtkTIFFReader doesn't just give you the raw data<br clear="none">from the files, it seems to pass it through a lookup table sometimes.<br clear="none">And I'm not sure exactly how it deals with alpha, and to be honest,<br clear="none">I wouldn't trust it.<br clear="none"><br clear="none">I'm really not sure what you mean when you say "The order of adding<br clear="none">the actors to the renderer matters, but I try to avoid this by using<br clear="none">transparency."  The order in which you add images is _crucial_ when<br clear="none">you are using transparency.<br clear="none"><br clear="none">Are
 you using the vtkImageStack?  It's a class that is designed<br clear="none">specifically to handle layered rendering of images.<br clear="none"><br clear="none">  David<br clear="none"><br clear="none"><br clear="none"><div class="yqt4308330413" id="yqtfd04675"><br clear="none">On Thu, Jan 16, 2014 at 12:40 PM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br clear="none">> Hi David,<br clear="none">><br clear="none">> Is it possible to show all images in a multi-paged tiff transparently?<br clear="none">><br clear="none">> Only when I show the 1st image (page), I see a 2nd 2d image (both are<br clear="none">> transparent).<br clear="none">> As soon as I move to another tiff image (page), the 2d image disappears. It<br clear="none">> returns when I move back to the 1st tiff page.<br clear="none">><br clear="none">>
 The multi-paged tiff is one component, and I am thinking of an algorithm to<br clear="none">> add an alpha component, but can hardly believe this would be required...<br clear="none">><br clear="none">> The order of adding the actors to the renderer matters, but I try to avoid<br clear="none">> this by using transparency.<br clear="none">><br clear="none">> Moving one image in front of the other by changing its z-coordinate using<br clear="none">> vtkImageActor::SetPosition() doesn't help.<br clear="none">><br clear="none">> Maarten<br clear="none">><br clear="none">><br clear="none">><br clear="none">> On Friday, November 8, 2013 4:36:06 PM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>><br clear="none">> wrote:<br clear="none">> Hi David,<br clear="none">><br clear="none">> Using VTK 6.0.0, sorry ;-)<br
 clear="none">><br clear="none">> Should I send you the tiff file so you can play with it?<br clear="none">><br clear="none">> Now I seem to have your attention:<br clear="none">><br clear="none">> - How do I display a multi-page tif? I don't seem to see the different<br clear="none">> images using a vtkImageSlice.<br clear="none">><br clear="none">> - What would be good values for the window and level parameters? I am using<br clear="none">> window = range[1]-range[0] and level = 0.5*(range[0]+range[1]) which works<br clear="none">> ok for this multi-page tif, but gets me nowhere when I try to display a drr.<br clear="none">><br clear="none">> Thanks - Maarten<br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">><br clear="none">> On Friday, November 8, 2013 4:23:23 PM, David Gobbi <<a shape="rect" ymailto="mailto:david.gobbi@gmail.com"
 href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br clear="none">> wrote:<br clear="none">> Hi Maarten,<br clear="none">><br clear="none">> Which version of VTK are you using?  I believe that this bug has been<br clear="none">> fixed in the master branch by a commits in the following topic merge:<br clear="none">> <a shape="rect" href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7e3d5270" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7e3d5270</a><br clear="none">><br clear="none">> It was not fixed in time for VTK 5.10, however.<br clear="none">><br clear="none">>   David<br clear="none">><br clear="none">><br clear="none">> On Fri, Nov 8, 2013 at 2:12 PM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br clear="none">>> Hi all,<br clear="none">>><br
 clear="none">>> vtkTIFFReader crashed for me while loading a multi-paged tiff file.<br clear="none">>><br clear="none">>> The crash occured in vtkTIFFReader::ReadGenericImage(), because<br clear="none">>> this->OutputExtent was not set (still NULL).<br clear="none">>> The scalar type for the image I was loading was unsigned short, so it<br clear="none">>> happened at line 1368.<br clear="none">>><br clear="none">>> I changed void vtkTIFFReader::ReadVolume(void* buffer) into void<br clear="none">>> vtkTIFFReader::ReadVolume(void* buffer, int outExt[6]) and added the line<br clear="none">>> this->outputExtent = outExt.<br clear="none">>><br clear="none">>> This solved my crash.<br clear="none">>> I am not sure I am on to something, but thought to let you know.<br clear="none">>><br clear="none">>> Maarten<br clear="none"></div><br><br></div>  </div> </div> 
 </div> </div></body></html>