[vtkusers] Displaying multiple implicit functions
ChiaWeng Boon
chiaweng at gmail.com
Tue Sep 28 02:27:21 EDT 2010
Hi,
To display ONE implicit function F(x,y,z)=0, I use vtksamplefunction,
as shown below. The output of vtkSampleFunction in ImageData format is
written to a file using vtkXMLImageDataWritter. How do I write MANY
different implicit functions in one single file? Put them into cells
of unstructured grids? If yes, how?
ImpFunc* function = ImpFunc::New();
vtkSampleFunction* sample = vtkSampleFunction::New();
sample->SetImplicitFunction(function);
sample->SetModelBounds(xmin, xmax, ymin, ymax, zmin, zmax);
sample->SetSampleDimensions(20,20,20);
sample->ComputeNormalsOff();
sample->Update();
vtkSmartPointer<vtkXMLImageDataWriter> writer = vtkXMLImageDataWriter::New();
writer->SetFileName(string a);
writer->SetInput(sample->GetOutput());
writer->Write();
I am an absolute beginner. Showing the code that I have to write to
solve the problem will be helpful.
Yours,
boon
More information about the vtkusers
mailing list