<div dir="ltr">Hi Lizeth,<div><br></div><div>Many (most?) of the tests are written to exit as soon as the window</div><div>pops up, because that's all the testing system needs.</div><div><br></div><div>The easiest way to get the program to stick around is to run python</div><div>with the "-i" option:</div><div><br></div><div>python -i TestAccumulate.py</div><div><br></div><div>To make the program stick around without the "-i" option, you have to</div><div>connect a vtkRenderWindowInteractor and then call interactor.Start()</div><div>at the end of the code.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 1, 2014 at 5:23 PM, Lizeth Castellanos <span dir="ltr"><<a href="mailto:castellanoslizan@gmail.com" target="_blank">castellanoslizan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello vtk-users!</div><div><br></div><div><br></div><div>I'm using the TestAccumulate.py from <a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestAccumulate.py;h=40054f0e43dbf7914f911815172d8c02378826ee;hb=HEAD" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Imaging/Core/Testing/Python/TestAccumulate.py;h=40054f0e43dbf7914f911815172d8c02378826ee;hb=HEAD</a></div><div><br></div><div>I don't get see the result. The test ran without  compilation errors, but the vtk window closes unexpectedly.</div><div><br></div><div>Any idea?</div><div><br></div><div>Thanks!</div><div><br></div><div>-Lizeth<br></div><div><br></div><div>My Code here: </div><div><br></div><div>#!/usr/bin/env python </div><div>import vtk</div><div>from vtk.test import Testing</div><div>   </div><div>reader = vtk.vtkPNGReader()</div><div>reader.SetFileName("/home/user/Downloads/fullhead15.png")</div><div><br></div><div>smooth = vtk.vtkImageGaussianSmooth()</div><div>smooth.SetDimensionality(2)</div><div>smooth.SetStandardDeviations(1,1)</div><div>smooth.SetInputConnection(reader.GetOutputPort())</div><div><br></div><div>imageAppend = vtk.vtkImageAppendComponents()</div><div>imageAppend.AddInputConnection(reader.GetOutputPort())</div><div>imageAppend.AddInputConnection(smooth.GetOutputPort())</div><div><br></div><div>clip = vtk.vtkImageClip()</div><div>clip.SetInputConnection(imageAppend.GetOutputPort())</div><div>clip.SetOutputWholeExtent(0,255,0,255,20,22)</div><div><br></div><div>accum = vtk.vtkImageAccumulate()</div><div>accum.SetInputConnection(clip.GetOutputPort())</div><div>accum.SetComponentExtent(0,255,0,255,0,0)</div><div>accum.SetComponentSpacing(12,12,0.0)</div><div>accum.Update()</div><div><br></div><div>viewer = vtk.vtkImageViewer()</div><div>viewer.SetInputConnection(accum.GetOutputPort())</div><div>viewer.SetColorWindow(4)</div><div>viewer.SetColorLevel(2)</div><div>viewer.Render()</div></div></blockquote></div></div></div></div>