<div dir="ltr">I am using Nvidia 6000 Quadro card which supposedly has support for OpenGL.<div><br></div><div>Prathamesh<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 12:38 AM, alex Dowson <span dir="ltr">&lt;<a href="mailto:alexdowson@hotmail.com">alexdowson@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:&#39;Calibri&#39;;color:#000000;font-size:12pt">
<div>Hi</div>
<div> </div>
<div>I think you’r graphic card doesnot have this extension supported. Do you 
have any GPU based card ? like ATI Radeon or Nvidia ?<br></div>
<div> </div>
<div>Alex</div>
<div style="font-style:normal;display:inline;font-family:&#39;Calibri&#39;;color:#000000;font-size:small;font-weight:normal;text-decoration:none">
<div style="font:10pt tahoma">
<div> </div>
<div style="background:#f5f5f5">
<div><b>From:</b> <a title="prathameshmkulkarni@gmail.com" href="mailto:prathameshmkulkarni@gmail.com" target="_blank">Prathamesh Kulkarni</a> </div>
<div><b>Sent:</b> Wednesday, September 21, 2011 9:32 AM</div>
<div><b>To:</b> <a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank">VTK 
Mailing List</a> ; <a title="insight-users@itk.org" href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a> </div>
<div><b>Cc:</b> <a title="jdluisi@central.uh.edu" href="mailto:jdluisi@central.uh.edu" target="_blank">Luisi, Jonathan D</a> </div>
<div><b>Subject:</b> [Insight-users] problems with rendering using ray 
casting</div></div></div>
<div> </div></div>
<div style="font-style:normal;display:inline;font-family:&#39;Calibri&#39;;color:#000000;font-size:small;font-weight:normal;text-decoration:none"><div><div></div><div class="h5">
<div dir="ltr">
<div> </div>
<div>Hello, </div>
<div> </div>
<div>I am trying to render a volume (mhd file read as ITKImage&lt;float, 3&gt;) 
using VTK ray casting. I have tried to use the different available mappers, but 
the output is always only background. For the mappers using OpenGL, I get the 
error:  line 100 vtkOpenGLVolumeTextureMapper3D (0000000003270440): 
required extensions not supported. Below is my code. Any help would be very 
useful.</div>
<div> </div>
<div> </div>
<div>
<div>        typedef 
itk::ImageToVTKImageFilter&lt;ImageType3D&gt; ITKToVTKConnectorType;</div>
<div><span style="white-space:pre-wrap"></span>ITKToVTKConnectorType::Pointer ITK_to_VTK_connector 
= ITKToVTKConnectorType::New();</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>ITK_to_VTK_connector-&gt;SetInput(data_ptr);</div>
<div><span style="white-space:pre-wrap"></span>ITK_to_VTK_connector-&gt;Update();</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkImageData&gt; vtk_image = 
ITK_to_VTK_connector-&gt;GetOutput();</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>// Testing vtk 
image</div>
<div><span style="white-space:pre-wrap"></span>vtk_image-&gt;PrintSelf(std::cout, 
vtkIndent(0));</div>
<div><span style="white-space:pre-wrap"></span> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkRenderer&gt; renderer = 
vtkSmartPointer&lt;vtkRenderer&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>renderer-&gt;SetBackground(1.0, 1.0, 1.0);</div>
<div><span style="white-space:pre-wrap"></span></div>
<div>        
vtkSmartPointer&lt;vtkRenderWindow&gt; render_window = 
vtkSmartPointer&lt;vtkRenderWindow&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>render_window-&gt;AddRenderer(renderer);</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; 
render_window_interactor = 
vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>render_window_interactor-&gt;SetRenderWindow(render_window);</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkPiecewiseFunction&gt; 
opacity_transfer_function = 
vtkSmartPointer&lt;vtkPiecewiseFunction&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>/*opacity_transfer_function-&gt;AddPoint(20, 
0.0);</div>
<div><span style="white-space:pre-wrap"></span>opacity_transfer_function-&gt;AddPoint(25, 
0.2);</div>
<div><span style="white-space:pre-wrap"></span>*/</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkColorTransferFunction&gt; 
color_transfer_function = 
vtkSmartPointer&lt;vtkColorTransferFunction&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>/*color_transfer_function-&gt;AddRGBPoint(0.0, 0.0, 
0.0, 0.0);</div>
<div><span style="white-space:pre-wrap"></span>color_transfer_function-&gt;AddRGBPoint(64.0, 1.0, 
0.0, 0.0);</div>
<div><span style="white-space:pre-wrap"></span>color_transfer_function-&gt;AddRGBPoint(128.0, 0.0, 
0.0, 1.0);</div>
<div><span style="white-space:pre-wrap"></span>color_transfer_function-&gt;AddRGBPoint(192.0, 0.0, 
1.0, 0.0);</div>
<div><span style="white-space:pre-wrap"></span>color_transfer_function-&gt;AddRGBPoint(255.0, 0.0, 
0.2, 0.0);</div>
<div><span style="white-space:pre-wrap"></span>*/</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkVolumeProperty&gt; 
volume_property = vtkSmartPointer&lt;vtkVolumeProperty&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>volume_property-&gt;SetColor(color_transfer_function);</div>
<div><span style="white-space:pre-wrap"></span>volume_property-&gt;SetScalarOpacity(opacity_transfer_function);</div>
<div><span style="white-space:pre-wrap"></span>volume_property-&gt;ShadeOn();</div>
<div><span style="white-space:pre-wrap"></span>volume_property-&gt;SetInterpolationTypeToLinear();</div>
<div><span style="white-space:pre-wrap"></span>volume_property-&gt;SetIndependentComponents(1);</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkVolumeRayCastCompositeFunction&gt; 
composite_function = 
vtkSmartPointer&lt;vtkVolumeRayCastCompositeFunction&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>//vtkSmartPointer&lt;vtkVolumeRayCastMapper&gt; 
volume_mapper = vtkSmartPointer&lt;vtkVolumeRayCastMapper&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>//vtkSmartPointer&lt;vtkFixedPointVolumeRayCastMapper&gt; 
volume_mapper = 
vtkSmartPointer&lt;vtkFixedPointVolumeRayCastMapper&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span></div>
<div>        
vtkSmartPointer&lt;vtkOpenGLVolumeTextureMapper3D&gt; volume_mapper = 
vtkSmartPointer&lt;vtkOpenGLVolumeTextureMapper3D&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>//vtkSmartPointer&lt;vtkGPUVolumeRayCastMapper&gt; 
volume_mapper = vtkSmartPointer&lt;vtkGPUVolumeRayCastMapper&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>//vtkSmartPointer&lt;vtkOpenGLGPUVolumeRayCastMapper&gt; 
volume_mapper = 
vtkSmartPointer&lt;vtkOpenGLGPUVolumeRayCastMapper&gt;::New();</div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>//volume_mapper-&gt;SetVolumeRayCastFunction(composite_function);</div>
<div><span style="white-space:pre-wrap"></span>volume_mapper-&gt;SetInput(vtk_image);</div>
<div><span style="white-space:pre-wrap"></span>volume_mapper-&gt;SetBlendModeToComposite();</div>
<div><span style="white-space:pre-wrap"></span>//volume_mapper-&gt;SetBlendModeToMaximumIntensity();</div>
<div><span style="white-space:pre-wrap"></span>//volume_mapper-&gt;SetScalarMode(1);</div>
<div><span style="white-space:pre-wrap"></span>volume_mapper-&gt;SetSampleDistance(0.2);</div>
<div><span style="white-space:pre-wrap"></span></div>
<div> </div>
<div><span style="white-space:pre-wrap"></span>vtkSmartPointer&lt;vtkVolume&gt; volume = 
vtkSmartPointer&lt;vtkVolume&gt;::New();</div>
<div><span style="white-space:pre-wrap"></span>volume-&gt;SetMapper(volume_mapper);</div>
<div><span style="white-space:pre-wrap"></span>volume-&gt;SetProperty(volume_property);</div>
<div><span style="white-space:pre-wrap"></span>volume-&gt;Update();</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>render_window-&gt;Render();</div>
<div><span style="white-space:pre-wrap"></span>renderer-&gt;AddVolume(volume);</div>
<div><span style="white-space:pre-wrap"></span>renderer-&gt;ResetCamera();</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>render_window_interactor-&gt;Initialize();</div>
<div><span style="white-space:pre-wrap"></span>render_window-&gt;Render();</div>
<div><span style="white-space:pre-wrap"></span>render_window_interactor-&gt;Start();</div></div>
<div> </div>
<div> </div>
<div>Thanks,</div>
<div>Prathamesh</div></div>
</div></div><p>
</p><hr>
_____________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit 
other Kitware open-source projects 
at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers 
ITK Training Courses, for more information 
visit:<br><a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br><br>Please keep 
messages on-topic and check the ITK FAQ 
at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to 
subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br><p></p></div></div></div></div>
</blockquote></div><br></div></div>