vtkResampleToImage ignore hidden cells in vtkSmartVolumeMapper

Hi, is it possible to ignore cells marked as hidden when doing volume rendering of the output of vtkResampleToImage? My pipeline is roughly:
unstructuredgrid->ImageResample->smartvolumemapper. ResampleToImage seems to mark the cells outside my dataset with the hidden bitmask

The issue i see is that for voxels outside the sampled dataset i have field values which default to zero, and my ug dataset field has negative and positive values that i want to see, so when i try to apply a scalar opacity function i see what is essentially the outside of the image, not the outer boundaries of my volume.

Is there a way to set the field values for voxels which failed the probe to VTK_DOUBLE_MAX or something like that? I think there is currently a pad of 0.0 applied in the ResampleToImage filter but we could add api to set a value outside the dataset range so it can be masked by the opacity function.

I’m surprised there isn’t API to do that already - it sounds useful. Seems simple enough to implement. If you want to try your hand at contributing that feature, I would be happy to review.

Im surprised too, tetrahedralization of the data is too expensive to do direct bunyk. I already have an idea to just add an api to ResampleToImage and change the pad value to be outside my data focus range. If it works i will add an automatic mode behavior to set the pad value to be outside the data range for each array but it might have the side effect of messing up the array ranges.

I dont see the dataarray classes respecting this hidden flag either - how do you get the range of a dataarray from a structured grid with iblanking? i see code like vtkExtractDataArraysOverTime which replace invalid cells with 0.0 which seems wrong to me. I’m surely missing something.

I think the ultimate solution would be having the volume mappers skip hidden cells.

Maybe you could set them to Inf. There is vtkDataArray API to get only the data range of finite values, so this would work well.

AFAIK, blanking is not consistently supported throughout VTK, unfortunately.

Thanks Cory,
I was able to get the desired behavior by turning on PassPartialArrays on the internal vtkCompositeDataProbeFilter inside vtkResampleToImage. vtkSmartVolumeMapper seems to be working fine. Maybe the simplest fix is as simple as exposing this setting in vtkResampleToImage?