<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>Hi All,</div><div><br></div><div>Since vtk 5.6 is out, we have some trouble using <span class="il" style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(169, 218, 146); color: rgb(34, 34, 34); background-position: initial initial; background-repeat: initial initial; ">vtkVolumeTextureMapper3D</span>. </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" target="_blank" style="color: rgb(51, 51, 204); ">it is said</a> that all the volume will be resampled to a 128*256*256 volume, but it's no longer true in > 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><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,&maxSize);</i></div><div><i><br></i></div><div><i> if(size[0]>maxSize || size[1]>maxSize || size[2]>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><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,&maxSize);</i></div><div><i> maxSize = 256;</i></div><div><i><br></i></div><div><i> if(size[0]>maxSize || size[1]>maxSize || size[2]>maxSize)</i></div>
<div><i> {</i></div><div><i> return 0;</i></div><div><i> }</i></div></div><div><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->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></span><br>-- <br>------------------------------------------------------------------<br>
Simon Esneault - Therenva<br>Centre d'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>