<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 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 vtkTextureMapper2D 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>> Date: Fri, 5 Feb 2010 14:08:24 -0200<br>> Subject: Re: [vtkusers] volume rendering help<br>> From: wsales@gmail.com<br>> To: peternomak@hotmail.com<br>> CC: vtkusers@vtk.org<br>> <br>> Hi Pedro,<br>> <br>> If you wants a real GPU accelerated mapper, go to www.vtkedge.org and<br>> download VTKEdge. After compiling with examples enabled, you can run<br>> the example GPURenderDemo against your series and see the results. The<br>> code are simple and you can use them to base your own.<br>> <br>> Regards,<br>> <br>> Wagner Sales<br>> <br>> 2010/2/5 Pedro Sá <peternomak@hotmail.com>:<br>> > hi there,<br>> ><br>> > i'm having some issues with volume rendering. my goal is to display a 3d<br>> > model of 240 OCT slices with 511x427px. I've managed to create the 3d model<br>> > using the vtkFixedPointVolumeRayCastMapper but the performance is just too<br>> > slow. I read that this could be solved using the vtkVolumeTextureMapper2D<br>> > that, if I understood correctly, would use GPU acceleration. Unfortunately,<br>> > this renders nothing, only a black screen. Since i'm out of ideas I hope<br>> > that someone could help me in this. I'm using the VTK .NET wrapper (hoping<br>> > this is not whats causing the issue).<br>> ><br>> > System config:<br>> > Intel Pentium Dual CPU T3200<br>> > 4GB RAM<br>> > NVIDIA GeForece 9300GS 256 MB<br>> ><br>> > C# Code:<br>> ><br>> > vtkRenderer renderer1 = new vtkRenderer();<br>> > vtkRenderWindow renWin1 = new vtkRenderWindow();<br>> > vtkOpenGLExtensionManager extensions = new<br>> > vtkOpenGLExtensionManager();<br>> > extensions.SetRenderWindow(renWin1);<br>> > extensions.Update();<br>> > extensions.LoadExtension("GL_VERSION_2_0");<br>> > extensions.Dispose();<br>> ><br>> > renWin1.AddRenderer(renderer1);<br>> ><br>> > vtkRenderWindowInteractor iren1 = new<br>> > vtkRenderWindowInteractor();<br>> > iren1.SetRenderWindow(renWin1);<br>> ><br>> > vtkJPEGReader reader = new vtkJPEGReader();<br>> > reader.SetFilePattern("C:\\Teste\\Crop\\%d.jpg");<br>> ><br>> > reader.SetDataExtent(0, 511, 0, 427, 0, 72);<br>> > reader.SetDataSpacing(10.7, 8, 20); // mm<br>> > reader.SetDataOrigin(0, 0, 0);<br>> > //reader.SetNumberOfScalarComponents(1);<br>> > reader.SetDataScalarTypeToUnsignedChar();<br>> > reader.Update();<br>> ><br>> > vtkPiecewiseFunction opacityTransferFunction = new<br>> > vtkPiecewiseFunction();<br>> > opacityTransferFunction.AddPoint(180, 0.0);<br>> > opacityTransferFunction.AddPoint(0, 1);<br>> ><br>> > vtkVolumeProperty volumeProperty = new vtkVolumeProperty();<br>> > volumeProperty.SetScalarOpacity(opacityTransferFunction);<br>> > volumeProperty.SetInterpolationTypeToNearest();<br>> > //volumeProperty.ShadeOn();<br>> ><br>> > vtkVolumeTextureMapper2D textureMapper = new<br>> > vtkVolumeTextureMapper2D();<br>> > textureMapper.SetInputConnection(reader.GetOutputPort());<br>> ><br>> > //vtkFixedPointVolumeRayCastMapper volumeMapper = new<br>> > vtkFixedPointVolumeRayCastMapper();<br>> > //volumeMapper.SetInputConnection(reader.GetOutputPort());<br>> ><br>> > vtkVolume volume = new vtkVolume();<br>> > volume.SetMapper(textureMapper);<br>> > volume.SetProperty(volumeProperty);<br>> > renderer1.AddVolume(volume);<br>> > renderer1.ResetCamera();<br>> ><br>> > renWin1.Render();<br>> ><br>> > iren1.Initialize();<br>> ><br>> > Regards,<br>> ><br>> > Pedro<br>> ><br>> > _______________________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Please keep messages on-topic and check the VTK FAQ at:<br>> > http://www.vtk.org/Wiki/VTK_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> ><br>> ><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>