[vtkusers] Writing TIFF images

Dr. Carsten Bellon Carsten.Bellon at bam.de
Wed Aug 30 06:58:42 EDT 2006


I found the problem, I think. In vtkTIFFWriter.cxx of VTK 5.0.1:
TIFFTAG_PHOTOMETRIC is set as subject to the data scalar type. Why?

My Fix
from:
  uint16 photometric = (stype == VTK_FLOAT ? PHOTOMETRIC_MINISBLACK : 
PHOTOMETRIC_RGB);
to:
  uint16 photometric = (scomponents == 1 ? PHOTOMETRIC_MINISBLACK : 
PHOTOMETRIC_RGB);



Dr. Carsten Bellon wrote:

> Hello,
> I'm using vtkTIFFWriter for a long time to store my calculation 
> results (8bit grayscale). But by migrating to Vtk 5.0.x I lost the 
> Windows compatibility. That means there is no preview for VTK5-TIFFs 
> in the Windows Explorer and MS Office, PaintShopPro, .., are not able 
> to read them.
>
> I recognized some differences in Vtk4 and Vtk5 TIFFs: header is at the 
> end now, multiple strips now. But what are the key features in wider 
> compatibility?
>
> How to get compatible TIFFs with Vtk5?
> Thanks for any hints.
>  Carsten
>




More information about the vtkusers mailing list