<div>Hi All,</div><div><br></div><div>Since vtk 5.6 is out, we have some trouble using vtkVolumeTextureMapper3D. </div><div><br></div><div>With VTK 5.4 rendering a volume of 512x512x366 consumes around 500 Mo and needs one or two seconds to load. The interactivity is good (20 fps)</div>

<div>With VTK 5.6, rendering the same volume consumes 1700 Mo and needs more than 30 seconds to load. And the interactivity is unusable. (~1 fps)</div><div>Test done on an intel i7 870 cpu, with an nvidia gtx 260, Ubuntu Linux 64 bits (same result on windows 7).</div>

<div><br></div><div>After some investigation, it appears that the pb, is the use of MAX_3D_TEXTURE_SIZE in the file vtkOpenGLVolumeTextureMapper3D.cxx instead of an harcoded max texture size (128*256*256) as it used to be in vtk 5.4. In the documentation <a href="http://www.vtk.org/doc/nightly/html/classvtkVolumeTextureMapper3D.html#_details">it is said</a> that all the volume will be resampled to a 128*256*256 volume, but it&#39;s no longer true in &gt; 5.4.</div>

<div><br></div><div>As a rough hack, if we changed the code around line 1970 of the file vtkOpenGLVolumeTextureMapper3D.cxx :</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><div>

<i>int vtkOpenGLVolumeTextureMapper3D::IsTextureSizeSupported(int size[3], components)</i></div><div><i>{</i></div><div><i>  GLint maxSize;</i></div><div><i>  glGetIntegerv(vtkgl::MAX_3D_TEXTURE_SIZE,&amp;maxSize);</i></div>

<div><i><br></i></div><div><i>  if(size[0]&gt;maxSize || size[1]&gt;maxSize || size[2]&gt;maxSize)</i></div><div><i>    {</i></div><div><i>    return 0;</i></div><div><i>    }</i></div></div>
<div><br></div><div>... into ...</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><i>int vtkOpenGLVolumeTextureMapper3D::IsTextureSizeSupported(int size[3], components)</i></div>

<div><i>{</i></div><div><i>  GLint maxSize;</i></div><div><i>  glGetIntegerv(vtkgl::MAX_3D_TEXTURE_SIZE,&amp;maxSize);</i></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><i>  maxSize = 256;</i></div>

<div><i><br></i></div><div><i>  if(size[0]&gt;maxSize || size[1]&gt;maxSize || size[2]&gt;maxSize)</i></div><div><i>    {</i></div><div><i>    return 0;</i></div><div><i>    }</i></div></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><br>

</div><div>... we get back the good old behavior of this 3D volume mapper.</div><div><br></div><div>Maybe this can be set as an option, something like mapper-&gt;Max3DTextureSizeOn(), to prevent that problem.</div><div><br>

</div><div><br></div><div>Thanks for listening, and thanks a lot for VTK.</div><div><br></div><div>-Simon</div><div><br></div><div><br>-- <br>------------------------------------------------------------------<br>Simon Esneault - Therenva<br>

Centre d&#39;Innovation Technologique<br>Centre Cardio-Pneumologique<br>
CHU Pontchaillou<br>Rennes, France<br>Tel : +33 (0)6 64 61 30 94<br>Mail : <a href="mailto:simon.esneault@therenva.com" target="_blank">simon.esneault@therenva.com</a><br>------------------------------------------------------------------<br>



</div>