Hi,<br><br>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.<br><br>this is how i am doing it.<br><br><b><span style="color: rgb(204, 0, 0);"> cutter = new vtkCutter();</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cutter.SetInput(v16.GetOutput());</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> cutter.SetCutFunction(plane);</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> </span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> cutterMapper = new vtkDataSetMapper();</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> cutterMapper.SetInput(cutter.GetOutput());</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cutterMapper.SetLookupTable(bwLut);</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> cutterMapper.UseLookupTableScalarRangeOn();</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cut = new vtkActor();</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> cut.GetProperty().SetInterpolationToFlat();</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cut.SetMapper(cutterMapper);</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> GetRenderer().AddActor(cut);</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cut.VisibilityOn();</span><br style="color: rgb(204, 0, 0);"><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> vtkLight vlgt = new vtkLight();</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> GetRenderer().AddLight(vlgt);</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> render();</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> vlgt.SwitchOff();</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> GetRenderer().ResetCamera();</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> aCamera.Dolly(1.5);</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> GetRenderer().SetBackground(1, 1, 1);</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> GetRenderer().ResetCameraClippingRange();</span></b><br>
<br>where v16 is the 16bit vtk reader.<br><br>for every mouse click:<br><br><b><span style="color: rgb(204, 0, 0);"> plane.SetOrigin(1, maxNoSlides, SliceThickness+=SliceThickness);</span><br style="color: rgb(204, 0, 0);">
<span style="color: rgb(204, 0, 0);"> cutter.SetCutFunction(plane);</span><br style="color: rgb(204, 0, 0);"><span style="color: rgb(204, 0, 0);"> repaint().</span><br style="color: rgb(204, 0, 0);"></b>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.<br>
<br>did someone experience the same problem ? is there another way to remove the delay when repaint() ing.??<br><br>regards,<br>-- <br>Rajesh Rapaka<br><br>