<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
hi again,<div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">thanks for your response. I was really hoping to mantain the wrapper as the entire solution is .NET based. I don't need extremely fast rendering, but for what i've read, the vtkTextureMapper2D could offer me reasonable results. Does the slow rendering might be &nbsp;happening due to the number of images? I'm sure i'm doing something wrong but my VTK knowledge is just too little. Any ideas on why the&nbsp;vtkTextureMapper2D&nbsp;only renders sometimes a black cube, sometimes nothing?</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">I am also using windows7 32bit.</div><div style="text-indent: 0in !important; "><br style="text-indent: 0in !important; "></div><div style="text-indent: 0in !important; ">Regards</div><br>&gt; Date: Fri, 5 Feb 2010 14:08:24 -0200<br>&gt; Subject: Re: [vtkusers] volume rendering help<br>&gt; From: wsales@gmail.com<br>&gt; To: peternomak@hotmail.com<br>&gt; CC: vtkusers@vtk.org<br>&gt; <br>&gt; Hi Pedro,<br>&gt; <br>&gt; If you wants a real GPU accelerated mapper, go to www.vtkedge.org and<br>&gt; download VTKEdge. After compiling  with examples enabled, you can run<br>&gt; the example GPURenderDemo against your series and see the results. The<br>&gt; code are simple and you can use them to base your own.<br>&gt; <br>&gt; Regards,<br>&gt; <br>&gt; Wagner Sales<br>&gt; <br>&gt; 2010/2/5 Pedro Sá &lt;peternomak@hotmail.com&gt;:<br>&gt; &gt; hi there,<br>&gt; &gt;<br>&gt; &gt; i'm having some issues with volume rendering. my goal is to display a 3d<br>&gt; &gt; model of 240 OCT slices with 511x427px. I've managed to create the 3d model<br>&gt; &gt; using the vtkFixedPointVolumeRayCastMapper but the performance is just too<br>&gt; &gt; slow. I read that this could be solved using the vtkVolumeTextureMapper2D<br>&gt; &gt; that, if I understood correctly, would use GPU acceleration. Unfortunately,<br>&gt; &gt; this renders nothing, only a black screen.&nbsp;Since i'm out of ideas I hope<br>&gt; &gt; that someone could help me in this. I'm&nbsp;using the&nbsp;VTK .NET wrapper (hoping<br>&gt; &gt; this is not whats causing the issue).<br>&gt; &gt;<br>&gt; &gt; System config:<br>&gt; &gt; Intel Pentium Dual CPU T3200<br>&gt; &gt; 4GB RAM<br>&gt; &gt; NVIDIA GeForece 9300GS 256 MB<br>&gt; &gt;<br>&gt; &gt; C# Code:<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkRenderer renderer1 = new vtkRenderer();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkRenderWindow renWin1 = new vtkRenderWindow();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkOpenGLExtensionManager extensions = new<br>&gt; &gt; vtkOpenGLExtensionManager();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions.SetRenderWindow(renWin1);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions.Update();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions.LoadExtension("GL_VERSION_2_0");<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extensions.Dispose();<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renWin1.AddRenderer(renderer1);<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor iren1 = new<br>&gt; &gt; vtkRenderWindowInteractor();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren1.SetRenderWindow(renWin1);<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkJPEGReader reader = new vtkJPEGReader();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.SetFilePattern("C:\\Teste\\Crop\\%d.jpg");<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.SetDataExtent(0, 511, 0, 427, 0, 72);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.SetDataSpacing(10.7, 8, 20); // mm<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.SetDataOrigin(0, 0, 0);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //reader.SetNumberOfScalarComponents(1);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.SetDataScalarTypeToUnsignedChar();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reader.Update();<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkPiecewiseFunction opacityTransferFunction = new<br>&gt; &gt; vtkPiecewiseFunction();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opacityTransferFunction.AddPoint(180, 0.0);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opacityTransferFunction.AddPoint(0, 1);<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkVolumeProperty volumeProperty = new vtkVolumeProperty();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volumeProperty.SetScalarOpacity(opacityTransferFunction);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volumeProperty.SetInterpolationTypeToNearest();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //volumeProperty.ShadeOn();<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkVolumeTextureMapper2D textureMapper = new<br>&gt; &gt; vtkVolumeTextureMapper2D();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; textureMapper.SetInputConnection(reader.GetOutputPort());<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //vtkFixedPointVolumeRayCastMapper volumeMapper = new<br>&gt; &gt; vtkFixedPointVolumeRayCastMapper();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //volumeMapper.SetInputConnection(reader.GetOutputPort());<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkVolume volume = new vtkVolume();<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume.SetMapper(textureMapper);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; volume.SetProperty(volumeProperty);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renderer1.AddVolume(volume);<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renderer1.ResetCamera();<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renWin1.Render();<br>&gt; &gt;<br>&gt; &gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren1.Initialize();<br>&gt; &gt;<br>&gt; &gt; Regards,<br>&gt; &gt;<br>&gt; &gt; Pedro<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; &gt; http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt; &gt;<br>&gt; &gt;<br>                                               <br /><hr />Faça compras on-line com mais segurança. <a href='http://go.microsoft.com/?linkid=9707132' target='_new'>Instale grátis o Internet Explorer 8.</a></body>
</html>