[vtkusers] Tiff-> volume

Arindam Bhattacharya arindamb at caip.rutgers.edu
Thu Oct 19 19:37:24 EDT 2000


hello 
could anyone say what I am doing wrong in this code. I want to
create a volume (binar) from a set of tiff files.

regards
Arindam

my code
****************************************************************
#include<vtk.h>
#include <vtkTiffReader.h>
void main(void)
{
	vtkTIFFReader *myTiffReader=vtkTIFFReader::New();

myTiffReader->SetFileName("F:\\arindam\\sukmoon\\data\\control1b.tiff");
	myTiffReader->SetDataExtent(10,100,10,100,0,38);
	vtkStructuredPoints *myData=vtkStructuredPoints::New();
	vtkStructuredPointsWriter *myWriter=vtkStructuredPointsWriter::New();
	vtkStructuredPoints *points=vtkStructuredPoints::New();

points=((myTiffReader->GetOutput())->MakeImageToStructuredPoints())->GetOutput();
	myWriter->SetInput(points);
	myWriter->SetFileName("Volume.vol");
	myWriter->SetFileType(VTK_BINARY);
	myWriter->Write();
}





More information about the vtkusers mailing list