I am trying to convert from .vtk
to a series of .png
slices (i.e., P images each with a resolution of MxN). I am currently using ParaView to attempt to accomplish this. However, upon attempting to save the data as .png
, I receive the following error:
vtkkPNGWriter (0x7fa8339b4620) PNGWriter only supports unsigned char and unsigned short inputs
The steps I am currently attempting are:
- Load the data
- Apply the filter: Convert from cell to point data
- Apply the filter: Resample to Image
- Save Data as
.png
- Error as specified above.
This error appears regardless of data format (i.e., jpg, png, etc.). However, it successfully outputs a .mhd
file that is readable with Slicer.
Is there a fix for this, is it just my dataset, or is this a known bug?
I am also open to suggestions for ways of easily generating the sequence of images I need so I can throw them into something like ImageJ. Currently looking at python vtk and SimpleITK.
ParaView Versions Tested:
- Linux 5.4.0
- Windows 5.8.0
question from:
https://stackoverflow.com/questions/65909302/paraview-how-to-fix-pngwriter-only-supports-unsigned-char-and-unsigned-short-i 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…