[vtkusers] JSlider + Medical
Jeff Lee
jeff at cdnorthamerica.com
Tue Oct 18 08:38:23 EDT 2005
Ziad Rahhal wrote:
>HI all,
>
>Can anybody tell me why the slider in the attached
>code is slow? I mean it doesn't move smoothly.
>
>
because you are actually recalculating the isosurface whenever the
slider state changes. you could try
if (!_slider.getValueIsAdjusting()) {
skinExtractor.SetValue(0, slider.getValue());
renWin.repaint();
}
and that will perform the calculation when you let go of the slider (not
calculating the intermediate values). Ideally you want the isosurfacing
to be interactive, but it isn't, which is why your slider doesn't move
smoothly. There are other "smoke and mirrors" techniques you can use to
feign responsiveness. A better solution than the above would be to
start a timer whenever the slider is moved. The timer action would get
restarted if the slider moves, but if the user stops moving it would
actually do the isosurface extraction.
-J
>Thank you in advance,
>
>Ziad
>
>
>
>
>__________________________________
>Yahoo! Mail - PC Magazine Editors' Choice 2005
>http://mail.yahoo.com
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list