This looks promising on my Mac with a development build of ParaView.
python3 -m venv ~/itkvenv
source ~/itkvenv/bin/activate
pip install ~/itkvenv
bin/paraview.app/Contents/MacOS/paraview --venv ~/itkvenv
Add Wavelet source, add Programmable Filter and set it’s Script to
import itk
itk_image = itk.image_from_vtk_image(inputs[0])
input_type = itk.Image[itk.F,3]
output_type = itk.Image[itk.D,3]
caster = itk.cast_image_filter(itk_image, ttype=(input_type, output_type))
caster.Update()
vtk_result = itk.vtk_image_from_image(caster)
output.ShallowCopy(vtk_result)
The Wavelet source produces a vtkImageData with floats, and this programmable script casts that image to a vtkImageData of doubles.
Input image info:
Output image info (note the array type is “double” instead of “float”):
It’s maybe not the most useful example, but it demonstrates that ITK can be used within ParaView’s Python environment using virtual environments and a pip-installed ITK.
I have not tried this with a binary from paraview.org, but it should work as long as you create your virtual environment such that it installs compatible ITK Python modules. See Install any python package for the ParaView binary release using pip for more info about that.

