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

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 ?

Below, a copy paste of the vtkPVDataInformation gathered in int vtkSMRepresentationTypeDomain::SetDefaultValues(vtkSMProperty* property, bool use_unchecked_values)

As you can see, the vtkImageData in the MBDS is seen as a vtkStructuredPoints and the extent is garbage (2147483647, -2147483647, 2147483647, -2147483647, 2147483647, -2147483647) bounds are OK !

DEBUG*********************vtkPVDataInformation (0x4097fc0)
  Debug: Off
  Modified Time: 334611
  Reference Count: 1
  Registered Events: (none)
  RootOnly: 0
  PortNumber: 0
  DataSetType: 1
  CompositeDataSetType: 13
  NumberOfPoints: 251000
  NumberOfRows: 0
  NumberOfCells: 249750
  NumberOfDataSets: 1
  MemorySize: 995
  PolygonCount: 0
  Bounds: 0, 100, 0, 1998, 0, 0
  Extent: 2147483647, -2147483647, 2147483647, -2147483647, 2147483647, -2147483647
  PointDataInformation 
    Debug: Off
    Modified Time: 275793
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 4
      Debug: Off
      Modified Time: 334601
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: ch1
      DataType: 2
      NumberOfComponents: 1
      NumberOfTuples: 251000
      IsPartial: 0
      Ranges :
        -111, 100
      InformationKeys :
        vtkAbstractArray::PER_COMPONENT

      Debug: Off
      Modified Time: 334604
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: ch2
      DataType: 2
      NumberOfComponents: 1
      NumberOfTuples: 251000
      IsPartial: 0
      Ranges :
        -110, 105
      InformationKeys :
        vtkAbstractArray::PER_COMPONENT

      Debug: Off
      Modified Time: 334607
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: ch3
      DataType: 2
      NumberOfComponents: 1
      NumberOfTuples: 251000
      IsPartial: 0
      Ranges :
        -128, 122
      InformationKeys :
        vtkAbstractArray::PER_COMPONENT

      Debug: Off
      Modified Time: 334610
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: ch4
      DataType: 2
      NumberOfComponents: 1
      NumberOfTuples: 251000
      IsPartial: 0
      Ranges :
        -127, 126
      InformationKeys :
        vtkAbstractArray::PER_COMPONENT

  CellDataInformation 
    Debug: Off
    Modified Time: 275794
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 0
  VertexDataInformation
    Debug: Off
    Modified Time: 275796
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 0
  EdgeDataInformation
    Debug: Off
    Modified Time: 275797
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 0
  RowDataInformation
    Debug: Off
    Modified Time: 275798
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 0
  FieldDataInformation 
    Debug: Off
    Modified Time: 275795
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    ArrayInformation, number of arrays: 11
      Debug: Off
      Modified Time: 334591
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: AmpliPower
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334594
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: DataDomain
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 2
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334567
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: FiberLength
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334579
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: FreqRes
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334585
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: GaugeLength
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334597
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: Hostname
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334576
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: Oversampling
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334588
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: PipelineTracker
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334582
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: PulseRateFreq
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334570
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: SamplingRate
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

      Debug: Off
      Modified Time: 334573
      Reference Count: 1
      Registered Events: (none)
      RootOnly: 0
      Name: SamplingRes
      DataType: 20
      NumberOfComponents: 1
      NumberOfTuples: 1
      IsPartial: 0
      Ranges :
        1e+299, -1e+299
      InformationKeys :
        None

  CompositeDataInformation 
    Debug: Off
    Modified Time: 275791
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    DataIsMultiPiece: 0
    DataIsComposite: 1
  PointArrayInformation 
    Debug: Off
    Modified Time: 275792
    Reference Count: 1
    Registered Events: (none)
    RootOnly: 0
    DataType: 0
    NumberOfComponents: 0
    NumberOfTuples: 0
    IsPartial: 0
    Ranges :
    InformationKeys :
  DataClassName: vtkStructuredPoints
  CompositeDataClassName: vtkMultiBlockDataSet
  CompositeDataSetName: (none)
  TimeSpan: 1e+299, -1e+299
  NumberOfTimeSteps: 0

DEBUG********************

UPDATE: I found a fix and I will create a merge request soon : VTK_STRUCTURED_POINTS extent is not handled in vtkPVDataInformation::CopyFromDataSet

However, this doesn’t explain why an MBDS (multi block) containing vtkImageData blocks in Catalyst is received as an MBDA of vtkStructuredPoints (a subclass of vtkImageData).

There’s maybe a bug in vtkStructuredPointsWriter or (IO/Legacy) vtkStructuredPointsReader, these classes are used to marshall a vtkImageData (they are called resp. in vtkGenericDataObjectWriter and vtkGenericDataObjectReader). In my case, the bug also might be vtkCompositeDataWriter/Reader as we are dealing with a composite data set.