[vtkusers] generate 3D images from 2D bmp files in java
Rémi DUCCESCHI
remi.ducceschi at gmail.com
Fri Jun 15 08:38:00 EDT 2012
@*Jonathan Ruiz Peinado*
thanks for your help.
panel is a vtkRenderWindowPanel
I tried panel.Render(), panel.getRenderer().Render(), panel.repaint() and
even this.repaint() (where this is the JFrame).
the only solution to update the image is to create an event with the mouse.
in the JFrame, I have a JSlider "stz" (Slider for Translation on Z axe) :
stz.addChangeListener(new ChangeListener()
{
@Override
public void stateChanged (ChangeEvent arg0)
{
double pos[] = actor().GetPosition(); // actor is the
vtkImageSlice which contains my 3D picture
System.out.println(stz.getValue());
pos[2] = stz.getValue();
actor().SetPosition(pos);
panel.Render(); // panel is the vtkRenderWindowPanel which
contains the actor <-- HERE I want to update the frame to see the new
position
}
});
I'd like to update the position while I move the slider, but it does not
work... :/ I don't understand why: panel.Render() should launch the update
of the whole pipeline...
if you have any other ideas...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120615/03bd13dc/attachment.htm>
More information about the vtkusers
mailing list