The output of a filter running in Catalyst is not exactly the same when extracted in the client


(Embeddedmz) #1

Hello,

First of all, I’m using currently the version 5.4.1

In Catalyst, I’m running a pipeline that contains a filter that outputs a vtkMultiBlockDataSet that can have one or more vtkImageData.

In the client side (GUI), I have to manually change the representation from “Outline” to “Surface” and change the coloring array from solid color to an array (point data) when I extract this particular filter (let’s call it InterestZone filter, it’s placed after the first source in the pipeline and is expecting a vtkImageData in its input).

In the client side, I discovered that in void vtkTrivialProducer::SetOutput(vtkDataObject* newOutput), that the object sent by Catalyst (the filter’s extract) is not a vtkMultiBlockDataSet having vtkImageData (s) but it’s a vtkMultiBlockDataSet having vtkStructuredPoints (a subclass of vtkImageData but all the data are there).

In vtkTrivialProducer::SetOutput, I made a hack : I replaced the vtkStructuredPoints by a vtkImageData having the same data. That solved my problem with the filter InterestZone : the representation is set correctly as well as the coloring array.

I don’t really like this hack as vtkTrivialProducer is used by other classes.

More information :
Without this hack, I noticed that in vtkSMRepresentationTypeDomain::SetDefaultValues, the vtkPVDataInformation hold an incorrect extent (garbage), whereas with the hack, the extent is correct.

What do you think of that ?