Cannot save images created using python calculator
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Cannot save image data that was created using the python calculator. Often I use paraview to do simple arithmetic on image data, which I then would like to save for further processing. Not being able to do so with the python calculator is quite limiting.
Minimal example, with Paraview 3.14.0 on Ubuntu.
- Load image
- Python calculator: Expression: inputs[0].PointData['MetaImage'] // i.e. just copy data over Array Association: point data Copy arrays: off
- Resulting image looks good
- Select python calculator result, File->Save Data, save as .mhd
- Reload image - data extents are correct, but all values are 0
Somewhat similarly - If you use the Calculator instead of the Python Calculator, there is no way to turn off "copy arrays", so the output image typically has two data arrays - the original input array, and the result of the calculation. If you save this as .mhd, the result has only one data array - the result of the calculation. I would expect a .mhd with two channels.