[vtkusers] vtkImageThresholdConnectivity

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


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/01a90294/attachment.html>


More information about the vtkusers mailing list