[vtkusers] vtkAppendPolydata - wrong extents on multiple inputs

Dan Lipsa dan.lipsa at kitware.com
Thu Aug 6 17:20:41 EDT 2015


> This request is propagated upstream and stops if a filter has its inputs
older than its output.
I meant downstream. It has to check all filters as their properties might
change which will affect the final result.

On Thu, Aug 6, 2015 at 5:12 PM Dan Lipsa <dan.lipsa at kitware.com> wrote:

> Nigel,
> The pipeline executive compares the modification time (
> vtkObject::GetMTime()) for the output of a filter against each of its
> inputs. If any of the inputs is newer, the filter is updated. It may be
> that your filter does not update the time of its output properly. This
> request is propagated upstream and stops if a filter has its inputs older
> than its output. I would setup a breakpoint and look at the first update
> for your filters.
>
> On Thu, Aug 6, 2015 at 9:20 AM Nigel Mcfarlane <Nigel.Mcfarlane at beds.ac.uk>
> wrote:
>
>> Dear vtkusers,
>>
>>
>>
>> I am creating a visual pipe in vtk 6.2.0 and I am having problems
>> connecting vtkAppendPolyData to multiple inputs which start from images of
>> different dimensions.  The visual pipe converts a set of input images into
>> isosurfaces, adds scalars for colour and transparency, then merges them
>> into one polydata mesh so they can be depth sorted before rendering.  Its
>> structure looks like this:
>>
>>
>>
>> //
>>
>> //     image1       image2       image3
>>
>> //       |            |            |
>>
>> //    DMCubes1     DMCubes2     DMCubes3
>>
>> //       |            |            |
>>
>> //  AddScalars1  AddScalars2  AddScalars3
>>
>> //             \      |      /
>>
>> //              \     |     /
>>
>> //               \    |    /
>>
>> //            vtkAppendPolyData
>>
>> //                    |
>>
>> //           vtkDepthSortPolyData
>>
>> //                    |
>>
>> //               Mapper/Actor
>>
>> //                    |
>>
>> //                 Renderer
>>
>> //
>>
>>
>>
>> The images are produced by vtkMetaImageReader, the “DMCubes” filters are
>> vtkDiscreteMarchingCubes, and the”AddScalars” filters are my own code.
>>
>>
>>
>> The problem is that this produces an image in which the
>> dimensions/extents of two of the images have clearly been set incorrectly.
>> I don’t know much about the way the vtk pipeline works, but I suppose that
>> an information request for the extents of the images travels up and back
>> down the pipeline, so the extents get set to that of the last input, and
>> then applied to all the inputs.  The problem disappears if the input
>> branches are first independently updated by calling a manual Update() on
>> each of the AddScalars filters, but it returns if one of the DMCubes
>> filters is modified, which triggers another general update cycle.
>>
>>
>>
>> Is there any way to set up this pipeline so that it does not require a
>> manual update when the image inputs are modified?
>>
>>
>>
>> Nigel McFarlane
>>
>> University of Bedfordshire
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150806/42bf25ef/attachment.html>


More information about the vtkusers mailing list