<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>Firstly I'd like to give a big thanks to Yves
Starreveld, the little work around performed well for my application.
As pointed out by Yves calling the GetOutput method in python does result in a
memory leak, as also pointed out by Yves this can be worked around by the use of
the SetOutput and Update method. The problem I have at the moment is I
wish to obtain multiple outputs for the source - necessitating multiple
GetOutput(int index) calls. The code goes something like
follows.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>EnsightReader = vtk.vtkEnsightReader()</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkGRIDEnsight =
vtk.vtkUnstructuredGrid()<BR>appendFilter = vtk.vtkAppendFilter()<BR>tmp =
vtk.vtkUnstructuredGrid()<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>for i in
range(EnsightReader.GetNumberOfOutputs()):</FONT></DIV>
<DIV><FONT face=Arial size=2> tmp =
EnsightReader.GetOutput(i)<BR>
self.appendFilter.AddInput(tmp)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>self.appendFilter.SetOutput(vtkGRIDEnsight) <BR>self.appendFilter.Update()<BR>self.MakeEnsightActors()</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This code works, but leaks like a sieve. To my
knowledge there's no Setoutput method by output index, can anyone out there
think of another possible workaround?</FONT></DIV>
<DIV><FONT face=Arial size=2>From the above code you may have noticed that I
really only want one output from the vtkEnsightReader- another possible
workaround may be to tell the reader to give only one output (with everything in
it!) instead of an output for every part.</FONT></DIV>
<DIV><FONT face=Arial size=2>Any help would be greatly appreciated,
Thanks.</FONT></DIV>
<DIV><FONT face=Arial size=2>Lachlan Hurst</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>