<DIV>
<DIV>
<DIV>I have similar problem. I was wondering can vtk provide some tool to debug this kind of problem.</DIV>
<DIV> </DIV>
<DIV>For me, it looks like a memory problem. </DIV>
<DIV> </DIV>
<DIV> Luke<BR><BR><B><I>rchqh@polyu.edu.hk</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Dear VTK users,<BR>I am programming with VTK 4.0. I tried to add several actors into a renderer<BR>as follows.<BR><BR>vtkActor *actor[3];<BR>actor[0] = vtkActor::New();<BR>actor[1] = vtkActor::New();<BR>actor[2] = vtkActor::New();<BR>vtkPlaneSource *plane[3];<BR>plane[0] = vtkPlaneSource::New();<BR>plane[1] = vtkPlaneSource::New();<BR>plane[2] = vtkPlaneSource::New();<BR>vtkPolyDataMapper *pMapper[3];<BR>pMapper[0] = vtkPolyDataMapper::New();<BR>pMapper[1] = vtkPolyDataMapper::New();<BR>pMapper[2] = vtkPolyDataMapper::New();<BR>vtkTexture *text[3];<BR>text[0] = vtkTexture::New();<BR>text[1] = vtkTexture::New();<BR>text[2] =
vtkTexture::New();<BR>plane[0]->SetOrigin(,,,);<BR>plane[0]->SetPoint1(,,,);<BR>plane[0]->SetPoint2(,,,);<BR>plane[1]->SetOrigin(,,,);<BR>plane[1]->SetPoint1(,,,);<BR>plane[1]->SetPoint2(,,,);<BR>plane[2]->SetOrigin(,,,);<BR>plane[2]->SetPoint1(,,,);<BR>plane[2]->SetPoint2(,,,);<BR>pMapper[0]->SetInput(plane[0]->GetOutput());<BR>pMapper[1]->SetInput(plane[1]->GetOutput());<BR>pMapper[2]->SetInput(plane[2]->GetOutput());<BR>text[0]->SetInput(imagedata0);<BR>text[1]->SetInput(imagedata1);<BR>text[2]->SetInput(imagedata2);<BR>actor[0]->SetMapper(pMapper[0]);<BR>actor[1]->SetMapper(pMapper[1]);<BR>actor[2]->SetMapper(pMapper[2]);<BR>actor[0]->SetTexture(text[0]);<BR>actor[1]->SetTexture(text[1]);<BR>actor[2]->SetTexture(text[2]);<BR><BR>actor[0]->RotateX(90);<BR>actor[1]->RotateY(-90);<BR>actor[2]->SetPosition(,,,);<BR><BR>ren->GetActors()->RemoveAllItems(); //ren is a vtkRenderer defined in<BR>other
part of my program<BR>ren->AddActor(actor[0]);<BR>ren->AddActor(actor[1]);<BR>ren->AddActor(actor[2]);<BR><BR>renWin->Render(); //renWin is a vtkRenderWindow defined in other part of<BR>my program;ren is the only renderer in this window<BR><BR>The program worked very well and the actors were displayed properly.However,<BR>after I switched to other windows using Alt+Tab and switched back to my vtk<BR>window, two actors disappeared.I also found the only actor left in the<BR>renderwindow had incorrect position and size. Did anyone meet same problem<BR>as mine? Could you help me?<BR>Any reply is appreciated.<BR>Thanks in advance!<BR><BR>HW Wong<BR><BR><BR>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: <HTTP: vtkfaq cgi-bin public.kitware.com><BR>Follow this link to subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers</BLOCKQUOTE></DIV></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>