Try using the vtkAppendFilter to append all ths functions into a single unstructured grid, and then write that output. BTW, since this is a VTK question, it's best asked on the VTK users list and not ParaView user's list.
Utkarsh On Thu, Sep 23, 2010 at 7:28 PM, ChiaWeng Boon <[email protected]> wrote: > 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 > implicit functions in one single file? Put them into cells of > unstructured grids? > > 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(); > > > Yours, > > boon > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the ParaView Wiki at: > http://paraview.org/Wiki/ParaView > > Follow this link to subscribe/unsubscribe: > http://www.paraview.org/mailman/listinfo/paraview > _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
