[vtkusers] help in using vtkTIFFWriter

varshini v vvarshini at hotmail.com
Mon Aug 8 11:33:51 EDT 2005


I am trying to write a series of tiff images. Below is the code that I am 
using.

vtkTIFFWriter *writer = vtkTIFFWriter::New();

	writer->SetFilePrefix("test");
	writer->SetFilePattern("%s.%2d.tif");
	writer->SetFileDimensionality(2);
	writer->SetInput(Reader->GetOutput()); //reader reads a series of 3D 
images.
	writer-> SetCompressionToNoCompression() ;
	writer->Write();

I get errors while executing,when I try to write a series of images using 
SetFilePattern(). If I use SetFileName() it is able to write a single file 
with continuous images in it. But I would like to have seperate 2D file for 
each image.

I tried using vtkJPEGWriter,vtkBMPWriter,vtkIMageWriter to write a series of 
images. They all seem to be fine. But I get errors while executing only for 
vtkTIFFwriter. Am I missing something in my code? Any help will be greatly 
appreciated.

Thanks,

Varshini

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list