XML specification questions for a filter

Hi,

I recently modified the ParaView to have the Image Data to Uniform Grid filter be available in the GUI’s Filter’s menu. There’s a couple of issues with the XML configuration though.

The biggest issue is that vtkGhostType isn’t available in the Select Input Scalars option as this is the natural array name for a ghost array in VTK but is normally hidden in ParaView. Is there a way to make that shown for this filter?

The second issue is that I didn’t properly set the filter to work for composite data sets. I want the filter to be available when there are at least some but not necessarily all vtkImageDatas in the composite dataset. For example, I have a combination of vtkImageDatas with blanking and vtkUnstructuredGrids and the filter knows to properly work with that. I tried the following which doesn’t work:

        <DataTypeDomain name="input_type" composite_data_supported="1">
          <DataType value="vtkImageData" />
        </DataTypeDomain>

Alternatively, I could do the following but that may be confusing as it would make the filter available even when there are no vtkImageDatas in the composite dataset:

        <DataTypeDomain name="input_type">
          <DataType value="vtkImageData" />
          <DataType value="vtkCompositeDataSet" />
        </DataTypeDomain>

I’d be ok with this if others are though.

Thanks,
Andy

I think if you use your first method:

<DataTypeDomain name="input_type" composite_data_supported="1">

you could add vtkUnstructuredGrid as a supported type, and your filter would accept your input data. However, I think ParaView would call the filter once for each piece of the composite dataset, rather than just once with the

vtkCompositeDataSet as input.

If you use the second method, you get a vtkCompositeDataSet as input, and can iterate the blocks inside your filter. I think you can do something in the GetInformation methods to validate that you can handle the input, so that you know there’s at least one vtkImageData. I look in filters.xml for something with similar inputs, and then see if the data validation matches my needs…

HTH,

Aron

Not as an option that exists in ParaView. We could probably add a hint that tells ParaView to show hidden arrays.

It should be possible with some extension to vtkSMDataTypeDomain.

Thanks Cory.

I started looking at doing the hint and modifying vtkPVDataSetAttributesInformation.cxx and realized it was going to be quite a bit more complex than I originally thought. I created an issue for this at https://gitlab.kitware.com/paraview/paraview/issues/19353. Do you think you could get this done by the 5.8 release?

I also changed the XML and pushed a MR so that it will work with composite datasets. I’ll add an issue after the MR makes it into master to extend vtkSMDataTypeDomain to help keep the GUI clean but that’s not as urgent of a change in my opinion. I’ll leave it up to you as to whether you want to target 5.8 for that issue or not.

Thanks,
Andy

I just created an issue to clean up the GUI for when to make the ImageDataToUniformGrid filter available now that it is available for composite datasets.

Thanks, Andy.