[vtkusers] possible to write actors to file?

Amy Squillacote amy.squillacote at kitware.com
Wed Apr 26 08:21:00 EDT 2006


Are you trying to write your whole scene to a file (e.g., an image 
file like PNG, JPEG, etc.), or are you trying to write a particular 
dataset to a file?  See the VTK/IO directory to get an idea of the 
readers and writers VTK supports.

- Amy

At 07:21 AM 4/26/2006, N. Yang wrote:
>Dear all,
>
>i am wondering if i can use some writer object to write an actor that
>has set a certain mapper to a file(binary, ascii)?
>
>example:
>
>   public static void main (String[] args)
>   {
>vtkSphereSource sphere = new vtkSphereSource();
>sphere.SetRadius(1.0);
>sphere.SetThetaResolution(18);
>sphere.SetPhiResolution(18);
>
>vtkPolyDataMapper map = new vtkPolyDataMapper();
>map.SetInput(sphere.GetOutput());
>
>// actor coordinates geometry, properties, transformation
>vtkActor aSphere = new vtkActor();
>aSphere.SetMapper(map);
>aSphere.GetProperty().SetColor(0,0,1); // color blue
>
>--------some writer object is applicable here?
>
>// a renderer for the data
>vtkRenderer ren1 = new vtkRenderer();
>ren1.AddActor(aSphere);
>ren1.SetBackground(1,1,1); // background color white
>
>
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list