[vtkusers] vtkImageThresholdConnectivity

Maarten Beek beekmaarten at yahoo.com
Fri Sep 5 14:51:06 EDT 2014


Your patch seems to have solved my crash.

Your Update() suggestion is indeed still a good one...

Maarten



On Friday, September 5, 2014 2:07:54 PM, David Gobbi <david.gobbi at gmail.com> wrote:
 


The patch can be found at the following web page, if you are able to
try it out then I'd like to hear whether it works for you.

http://review.source.kitware.com/#/c/16916/1

Even with this patch, it is still a good idea to call Update() on the
filter before Render(), because otherwise the filter will re-execute
every time the slice location changes, causing the render to be very
slow.

- David


On Fri, Sep 5, 2014 at 12:06 PM, Maarten Beek <beekmaarten at yahoo.com> wrote:
> Thanks - David.
>
> I'll try your Update() suggestion. I made my app is quite complex; not sure
> I can find the right stop for the function call... ;-)
>
> In the meantime, do you need anything from me to help you with the fix?
>
> Maarten
>
>
> On Friday, September 5, 2014 1:29:45 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
>
>
> Yes, it is a bug, and exactly at line 448 like you said.  Thanks.
> I'll start working on a patch, since I submitted the original code.
>
> In the meantime, you might be able to work around the problem by
> calling Update() on vtkImageThresholdConnectivity before calling
> Render() on your RenderWindow.  That will cause the filter to produce
> a 3D extent, and then vtkImageSlice will take just the slice it needs.
>
> - David
>
> On Fri, Sep 5, 2014 at 11:04 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>> Hi Maarten,
>>
>> I think it might be a bug, so I will investigate.  This filter needs
>> the whole extent from the input because it does a 3D connectivity
>> operation, but that shouldn't impact the extent that it produces as
>> output.  If asked for a single-slice output extent, then it should
>> pull in a 3D input extent but produce a 2D output extent.
>>
>>  - David
>>
>> On Fri, Sep 5, 2014 at 10:40 AM, Maarten Beek via vtkusers
>> <vtkusers at vtk.org> wrote:
>>> Hi all,
>>>
>>> I have a problem with vtkImageThresholdConnectivity in a pipeline with
>>> vtkImageSlice.
>>>
>>> The vtkImageSlice reduces the extent of the image to the slice that is
>>> visible, and vtkImageThresholdConnectivity allocates its output
>>> accordingly.
>>> However it then takes the scalar pointer of the output for the extent of
>>> the
>>> (3d) input image.
>>> This happens on line 448 of vtkImageThresholdConnectivity.cxx (VTK
>>> 6.1.0).
>>>
>>> Is this a bug, or am I doing something wrong?
>>>
>>> Thanks - Maarten
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140905/ba1359b0/attachment.html>


More information about the vtkusers mailing list