<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>Hi all,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>I've implemented multi-threaded gradient computation in 
vtkFixedPointVolumeRayCastMapper.&nbsp;It can make the volume rendering 
initialization step 30-40% faster on a dual-core system (and probably even 
faster on a system with more CPUs), if shading is used.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>Just a few changes were needed, as the </FONT></SPAN><SPAN 
class=622562312-01082007><FONT face=Arial color=#000080 
size=2>vtkFixedPointVolumeRayCastMapperComputeGradients method was already 
prepared for multi-threaded computation. </FONT></SPAN><SPAN 
class=622562312-01082007><FONT face=Arial color=#000080 size=2>I attach the 
updated files (based on VTK-5.0.3 release).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>Would it be possible to integrate this performance 
improvement into the next VTK release?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>Thanks in advance.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=622562312-01082007><FONT face=Arial 
color=#000080 size=2>Andras</DIV>
<DIV dir=ltr align=left><BR></DIV></FONT></SPAN><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
vtkusers-bounces+andras.lasso=med.ge.com@vtk.org 
[mailto:vtkusers-bounces+andras.lasso=med.ge.com@vtk.org] <B>On Behalf Of 
</B>Lasso, Andras (GE Healthcare)<BR><B>Sent:</B> Tuesday, July 31, 2007 4:46 
PM<BR><B>To:</B> vtkusers@vtk.org<BR><B>Subject:</B> [vtkusers] Gradients 
computation speed-up invtkFixedPointVolumeRayCastMapper by 
multi-threading<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2>Hi all,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2>I use vtkFixedPointVolumeRayCastMapper for volume 
rendering. The image quality is perfect, but&nbsp;I have to wait about 30 sec 
for the first rendered image, mainly due </FONT></SPAN><SPAN 
class=429432814-31072007><FONT face=Arial color=#000080 size=2>gradient 
computation.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2>Currently (VTK-5.0.3) the gradient computation is 
implemented in a single thread. I would expect that on&nbsp;</FONT></SPAN><SPAN 
class=429432814-31072007><FONT face=Arial color=#000080 size=2>multi-core/CPU 
systems the gradient computation could be made 2-4 times faster with a 
multi-threaded implementation. </FONT></SPAN><SPAN 
class=429432814-31072007><FONT face=Arial color=#000080 size=2>Looking at the 
code I've found that&nbsp;the&nbsp;</FONT></SPAN><SPAN 
class=429432814-31072007><FONT face=Arial color=#000080 size=2>algorithm in 
<SPAN class=429432814-31072007><FONT face=Arial color=#000080 
size=2>vtkFixedPointVolumeRayCastMapperComputeGradients </FONT></SPAN>is already 
prepared for a multi-threaded implementation.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2>Does anyone know why the multi-threaded gradient 
computation just prepared, and finally not implemented for 
vtkFixedPointVolumeRayCastMapper?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2>Andras</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=429432814-31072007><FONT face=Arial 
color=#000080 size=2></FONT></SPAN>&nbsp;</DIV></BODY></HTML>