<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>Your patch seems to have solved my crash.</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>Your Update() suggestion is indeed still a good one...</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 class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <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 Friday, September 5, 2014 2:07:54 PM, David Gobbi <david.gobbi@gmail.com> wrote:<br> </font> </div>  <br><br> <div class="y_msg_container">The patch can be found at the following web page, if you are able to<br clear="none">try it out then I'd like to hear whether it works for you.<br clear="none"><br clear="none"><a shape="rect" href="http://review.source.kitware.com/#/c/16916/1"
 target="_blank">http://review.source.kitware.com/#/c/16916/1</a><br clear="none"><br clear="none">Even with this patch, it is still a good idea to call Update() on the<br clear="none">filter before Render(), because otherwise the filter will re-execute<br clear="none">every time the slice location changes, causing the render to be very<br clear="none">slow.<br clear="none"><br clear="none"> - David<br clear="none"><div class="yqt6922645536" id="yqtfd49925"><br clear="none">On Fri, Sep 5, 2014 at 12:06 PM, Maarten Beek <<a shape="rect" ymailto="mailto:beekmaarten@yahoo.com" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>> wrote:<br clear="none">> Thanks - David.<br clear="none">><br clear="none">> I'll try your Update() suggestion. I made my app is quite complex; not sure<br clear="none">> I can find the right stop for the function call... ;-)<br clear="none">><br clear="none">> In the meantime, do you need anything
 from me to help you with the fix?<br clear="none">><br clear="none">> Maarten<br clear="none">><br clear="none">><br clear="none">> On Friday, September 5, 2014 1:29:45 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">><br clear="none">><br clear="none">> Yes, it is a bug, and exactly at line 448 like you said.  Thanks.<br clear="none">> I'll start working on a patch, since I submitted the original code.<br clear="none">><br clear="none">> In the meantime, you might be able to work around the problem by<br clear="none">> calling Update() on vtkImageThresholdConnectivity before calling<br clear="none">> Render() on your RenderWindow.  That will cause the filter to produce<br clear="none">> a 3D extent, and then vtkImageSlice will take just the slice it needs.<br
 clear="none">><br clear="none">> - David<br clear="none">><br clear="none">> On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi <<a shape="rect" ymailto="mailto:david.gobbi@gmail.com" href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br clear="none">>> Hi Maarten,<br clear="none">>><br clear="none">>> I think it might be a bug, so I will investigate.  This filter needs<br clear="none">>> the whole extent from the input because it does a 3D connectivity<br clear="none">>> operation, but that shouldn't impact the extent that it produces as<br clear="none">>> output.  If asked for a single-slice output extent, then it should<br clear="none">>> pull in a 3D input extent but produce a 2D output extent.<br clear="none">>><br clear="none">>>  - David<br clear="none">>><br clear="none">>> On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers<br
 clear="none">>> <<a shape="rect" ymailto="mailto:vtkusers@vtk.org" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>> wrote:<br clear="none">>>> Hi all,<br clear="none">>>><br clear="none">>>> I have a problem with vtkImageThresholdConnectivity in a pipeline with<br clear="none">>>> vtkImageSlice.<br clear="none">>>><br clear="none">>>> The vtkImageSlice reduces the extent of the image to the slice that is<br clear="none">>>> visible, and vtkImageThresholdConnectivity allocates its output<br clear="none">>>> accordingly.<br clear="none">>>> However it then takes the scalar pointer of the output for the extent of<br clear="none">>>> the<br clear="none">>>> (3d) input image.<br clear="none">>>> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK<br clear="none">>>> 6.1.0).<br clear="none">>>><br
 clear="none">>>> Is this a bug, or am I doing something wrong?<br clear="none">>>><br clear="none">>>> Thanks - Maarten<br clear="none">><br clear="none">><br clear="none"></div><br><br></div>  </div> </div>  </div> </div></body></html>