[vtkusers] Repaint very slow while using vtkCutter (VTK + JAVA)

Rajesh Rapaka rajesh.rapaka at gmail.com
Sat Mar 22 21:13:51 EDT 2008


Hi,

I am having a series of 2D raw images. I am trying to cut them and display
slices from various angles such as saggital, coronal and axial.

this is how i am doing it.

*        cutter = new vtkCutter();
        cutter.SetInput(v16.GetOutput());
        cutter.SetCutFunction(plane);

        cutterMapper = new vtkDataSetMapper();
        cutterMapper.SetInput(cutter.GetOutput());
        cutterMapper.SetLookupTable(bwLut);
        cutterMapper.UseLookupTableScalarRangeOn();
        cut = new vtkActor();
        cut.GetProperty().SetInterpolationToFlat();
        cut.SetMapper(cutterMapper);
        GetRenderer().AddActor(cut);
        cut.VisibilityOn();

        vtkLight vlgt = new vtkLight();
        GetRenderer().AddLight(vlgt);
        render();
        vlgt.SwitchOff();
        GetRenderer().ResetCamera();
        aCamera.Dolly(1.5);
        GetRenderer().SetBackground(1, 1, 1);
        GetRenderer().ResetCameraClippingRange();*

where v16 is the 16bit vtk reader.

for every mouse click:

*        plane.SetOrigin(1, maxNoSlides, SliceThickness+=SliceThickness);
        cutter.SetCutFunction(plane);
        repaint().
*But the slices change very slowly. I am using vtkPanel and tried on
vtkCanvas . But the same problem exists. I am forced to use repaint for the
slice to change.

did someone experience the same problem ? is there another way to remove the
delay when repaint() ing.??

regards,
-- 
Rajesh Rapaka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080323/1a366276/attachment-0003.htm>


More information about the vtkusers mailing list