[vtkusers] How to write vtkImageData with vtkTIFFWriter?

David Gobbi david.gobbi at gmail.com
Sun Jan 10 17:38:30 EST 2010


On Sun, Jan 10, 2010 at 2:35 PM,  <lynx.abraxas at freenet.de> wrote:
> On 10/01/10 14:20:01, lynx.abraxas at freenet.de wrote:
>> Hello again!
>>
>>
>> Another problem arose in my little test program (see below): How do I save the
>> output of GaussianSplatter into a (3D) TIFF? What could convert the output  of
>> GaussianSplatter to vtkImageData?
>
> How comes vtkTIFFWriter cannot write vtkImageData? Is there something missing in vtkImageData that an image writer needs to know as well?
>
> Thanks,
> Lynx

I believe TIFF baseline requires byte data (either greyscale or RGB),
so you have to convert whatever data you have to UnsignedChar, e.g.
with vtkImageMapToColors or with vtkImageShiftScale.  DItto for PNG,
PNM, BMP, and JPEG.

   David



More information about the vtkusers mailing list