[vtkusers] A problem in VTK Usntructured Poly Data Writer

Rizwan SIDDIQUI rasidiki at yahoo.co.in
Mon Jul 9 07:09:56 EDT 2007


Dear Fellows

I am trying to work on unstructured grid with no
connectivity information for 3D volumetric and surface
data. Lately I am experimenting with Dragon Model
which has 437645 vertices. But while implementing the
following code it gives me run time error while
writing the Unstructured grid writer. I am using VTK
3.1 version. Can anyone help me out.

void writeDelaunayImageToFile(char inputFile[], char
outputFile[], double alpha)
{
	polyDataReader = vtkPolyDataReader::New();
	printf("No Error 1a\n");
	polyDataReader->SetFileName(inputFile);
	printf("No Error 1b\n");
	polyDataReader->Update();
	printf("No Error 1c\n");
    delaunay3D = vtkDelaunay3D::New();
	printf("No Error 1d\n");
	delaunay3D->SetInput(polyDataReader->GetOutput());
	printf("No Error 1e\n");
	delaunay3D->SetAlpha(alpha);
//  delaunay3D->BoundingTriangulationOff();
//  delaunay3D->BoundingTriangulationOn();
	
	unstructuredGridWriter =
vtkUnstructuredGridWriter::New();
	printf("No Error 1f\n");

unstructuredGridWriter->SetInput(delaunay3D->GetOutput());
	printf("No Error 1g\n");
	unstructuredGridWriter->SetFileName(outputFile);
	printf("No Error 1k\n");
	unstructuredGridWriter->Write();
	printf("No Error 1L\n");
REGARDS.

Rizwan


		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/



More information about the vtkusers mailing list