sorry, forget my previous post..<br>I just found the solution:<br><br>for whoever could be interested, this is my working :) callback:<br><br>void callback(vtkObject *caller, unsigned long event_id, void *clientdata, void *calldata)<br>{<br>&nbsp; vtkRenderWindowInteractor *interactor = static_cast&lt; vtkRenderWindowInteractor* &gt;( clientdata );<br>&nbsp; //why is this necessary?<br>&nbsp; vtkInteractorStyleUser *style = static_cast&lt; vtkInteractorStyleUser* &gt;( caller ); <br>&nbsp;<br>&nbsp; switch( event_id ){<br>&nbsp;&nbsp;&nbsp; case vtkCommand::CharEvent:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch( style-&gt;GetChar() ){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 'h':<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scroll_Z=scroll_Z+10;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; global_XYslice-&gt;SetDisplayExtent(0,127, 0,127, scroll_Z,scroll_Z);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 g_win-&gt;Render();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; break;<br>&nbsp; }<br>}<br><br>thanks anyway..<br><br><br><br><b><i>Alessio Balzide &lt;mail_di_ale@yahoo.it&gt;</i></b> ha scritto:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> good morning everybody!<br>I'm visualizing a 3D "analyze" volume, slice by slice. Ok I can do that, but I cannot interact with the slices (moving them through the volume). Can someone explain me how to do that?<br><br>Here's my obviously-not-working idea: (the code is in C++)<br>I use "vtkInteractorStyleUser.h", create a callback and updatie the position of the slices. But it doesn't work.. even if I re-render the window. Why????<br><br>This is my code:<br>//Extract a slice<br>vtkExtractVOI *extractor_XY = vtkExtractVOI::New();<br>&nbsp;
 extractor_XY-&gt;SetInputConnection(ImgReader-&gt;GetOutputPort());<br>&nbsp; extractor_XY-&gt;SetVOI( 0, hdr.dim[1]-1, 0, hdr.dim[2]-1, scroll_Z, scroll_Z);<br>&nbsp; extractor_XY-&gt;Update();<br>&nbsp; global_extrator_XY = extractor_XY;<br><br>&nbsp; //Create its texture<br>&nbsp; vtkTexture *texture_XY = vtkTexture::New();<br>&nbsp; texture_XY-&gt;SetInputConnection(extractor_XY-&gt;GetOutputPort());<br>&nbsp;  texture_XY-&gt;InterpolateOn();<br>&nbsp; texture_XY-&gt;SetLookupTable(grayScaleLookupTable);<br>&nbsp; texture_XY-&gt;MapColorScalarsThroughLookupTableOn();<br>&nbsp; global_ texture_XY = texture_XY;<br><br>&nbsp; //Create a plane for the texture<br>&nbsp; vtkPlaneSource *plane_XY = vtkPlaneSource::New();<br>&nbsp; plane_XY-&gt;SetXResolution(1);<br>&nbsp; plane_XY-&gt;SetYResolution(1);<br>&nbsp; plane_XY-&gt;SetOrigin(0.0, 0.0, scroll_Z);<br>&nbsp; plane_XY-&gt;SetPoint1(hdr.dim[1]-1, 0.0, scroll_Z);<br>&nbsp; plane_XY-&gt;SetPoint2(0.0, hdr.dim[1]-1,
 scroll_Z);<br>&nbsp; global_plane_XY = plane_XY;<br><br>&nbsp; //Shot it through the pipeline<br>&nbsp; vtkPolyDataMapper *mapper_XY = vtkPolyDataMapper::New();<br>&nbsp; mapper_XY-&gt;SetInputConnection(plane_XY-&gt;GetOutputPort());<br>&nbsp; mapper_XY-&gt;ImmediateModeRenderingOn();<br>global_mapper_XY = mapper_XY;<br>&nbsp; vtkActor *actorSlice_XY = vtkActor::New();<br>&nbsp;  actorSlice_XY-&gt;SetMapper(mapper_XY);<br>&nbsp; actorSlice_XY-&gt;SetTexture(texture_XY);<br><br>and in the callback, I change the "scroll_Z" value, update the global variables, and re-render... Why the hell is it not working?????<br><br>Thanks for your comprehension<br>Ale<br><br><br><br><br><br><div>           </div><hr size="1"><font face="Arial" size="2"></font><hr size="1"><font face="Arial" size="2"><font face="Arial" size="2">L'email della prossima generazione? Puoi averla con la <a
 href="http://us.rd.yahoo.com/mail/it/taglines/hotmail/nowyoucan/nextgen/*http://it.docs.yahoo.com/nowyoucan.html">nuova Yahoo! Mail</a></font>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br></font></blockquote><font face="Arial" size="2"><br></font><p>&#32;



      <hr size=1><font face="Arial" size="2"><hr size=1><font face="Arial" size="2">L'email della prossima generazione? Puoi averla con la <a href="http://us.rd.yahoo.com/mail/it/taglines/hotmail/nowyoucan/nextgen/*http://it.docs.yahoo.com/nowyoucan.html">nuova Yahoo! Mail</a></font>