<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16490"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" 
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Calibri>hi there,</FONT></DIV>
<DIV><FONT face=Calibri></FONT>&nbsp;</DIV>
<DIV><FONT face=Calibri>i'm having some issues with volume rendering. my goal is 
to display a 3d model of 240 OCT slices with 511x427px. I've managed to create 
the 3d model using the vtkFixedPointVolumeRayCastMapper but the performance is 
just too slow. I read that this could be solved using the 
vtkVolumeTextureMapper2D that, if I understood correctly, would use GPU 
acceleration. Unfortunately, this renders nothing, only a black 
screen.&nbsp;Since i'm out of ideas I hope that someone could help me in this. 
I'm&nbsp;using the&nbsp;VTK .NET wrapper (hoping this is not whats causing the 
issue). </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Calibri>System config:</FONT></DIV>
<DIV><FONT face=Calibri>Intel Pentium Dual CPU T3200</FONT></DIV>
<DIV><FONT face=Calibri>4GB RAM</FONT></DIV>
<DIV><FONT face=Calibri>NVIDIA GeForece 9300GS 256 MB</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Calibri>C# Code:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
face=Calibri>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderer renderer1 = new 
vtkRenderer();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderWindow renWin1 = new 
vtkRenderWindow();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkOpenGLExtensionManager extensions = new 
vtkOpenGLExtensionManager();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
extensions.SetRenderWindow(renWin1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
extensions.Update();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
extensions.LoadExtension("GL_VERSION_2_0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
extensions.Dispose();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
renWin1.AddRenderer(renderer1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
face=Calibri>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderWindowInteractor iren1 = new 
vtkRenderWindowInteractor();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iren1.SetRenderWindow(renWin1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
face=Calibri>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkJPEGReader reader = new 
vtkJPEGReader();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.SetFilePattern("C:\\Teste\\Crop\\%d.jpg");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
face=Calibri>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.SetDataExtent(0, 511, 0, 427, 0, 
72);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.SetDataSpacing(10.7, 8, 20); // 
mm<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.SetDataOrigin(0, 0, 
0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//reader.SetNumberOfScalarComponents(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.SetDataScalarTypeToUnsignedChar();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
reader.Update();</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Calibri>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkPiecewiseFunction opacityTransferFunction = new 
vtkPiecewiseFunction();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
opacityTransferFunction.AddPoint(180, 
0.0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
opacityTransferFunction.AddPoint(0, 1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkVolumeProperty volumeProperty = new 
vtkVolumeProperty();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
volumeProperty.SetScalarOpacity(opacityTransferFunction);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
volumeProperty.SetInterpolationTypeToNearest();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//volumeProperty.ShadeOn();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkVolumeTextureMapper2D textureMapper = new 
vtkVolumeTextureMapper2D();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
textureMapper.SetInputConnection(reader.GetOutputPort());<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//vtkFixedPointVolumeRayCastMapper volumeMapper = new 
vtkFixedPointVolumeRayCastMapper();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//volumeMapper.SetInputConnection(reader.GetOutputPort());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
vtkVolume volume = new 
vtkVolume();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
volume.SetMapper(textureMapper);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
volume.SetProperty(volumeProperty);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
renderer1.AddVolume(volume);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
renderer1.ResetCamera();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
renWin1.Render();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iren1.Initialize();</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Pedro</FONT>&nbsp;</DIV></BODY></HTML>