<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span>I was able to solve this problem. So, the example&nbsp;</span><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML" style="font-size: 12pt; ">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML</a>&nbsp;is quite wrong, because it shrinks the volume.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">I attached here the code, but it has some lights options, also, because I need them.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div><div>#include &lt;vtkVersion.h&gt;</div><div>#include &lt;vtkRenderer.h&gt;</div><div>#include &lt;vtkRenderWindow.h&gt;</div><div>#include &lt;vtkRenderWindowInteractor.h&gt;</div><div>#include
 &lt;vtkVRMLImporter.h&gt;</div><div>#include &lt;vtkDataSet.h&gt;</div><div>#include &lt;vtkActorCollection.h&gt;</div><div>#include &lt;vtkPolyData.h&gt;</div><div>#include &lt;vtkPolyDataMapper.h&gt;</div><div>#include &lt;vtkPolyDataNormals.h&gt;</div><div>#include &lt;vtkActor.h&gt;</div><div>#include &lt;vtkSmartPointer.h&gt;</div><div>#include &lt;vtkRendererCollection.h&gt;</div><div>#include &lt;vtkLight.h&gt;</div><div>&nbsp;</div><div>int main ( int argc, char *argv[])</div><div>{</div><div>&nbsp; if(argc != 2)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; std::cout &lt;&lt; "Required arguments: Filename" &lt;&lt; std::endl;</div><div>&nbsp; &nbsp; return EXIT_FAILURE;</div><div>&nbsp; &nbsp; }</div><div>&nbsp;</div><div>&nbsp; std::string filename = argv[1];</div><div>&nbsp; std::cout &lt;&lt; "Reading " &lt;&lt; filename &lt;&lt; std::endl;</div><div>&nbsp;</div><div>&nbsp;vtkSmartPointer&lt;vtkRenderer&gt; ren1=
 vtkSmartPointer&lt;vtkRenderer&gt;::New();</div><div>&nbsp;vtkSmartPointer&lt;vtkRenderWindow&gt; renderWindow = vtkSmartPointer&lt;vtkRenderWindow&gt;::New();</div><div>&nbsp;renderWindow-&gt;AddRenderer(ren1);</div><div><br></div><div>&nbsp;vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; renderWindowInteractor = vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();</div><div>&nbsp; renderWindowInteractor-&gt;SetRenderWindow(renderWindow);</div><div>&nbsp; // VRML Import</div><div>&nbsp; vtkSmartPointer&lt;vtkVRMLImporter&gt; importer = vtkSmartPointer&lt;vtkVRMLImporter&gt;::New();</div><div>&nbsp; importer-&gt;SetFileName ( filename.c_str() );</div><div>&nbsp; importer-&gt;Read();</div><div>&nbsp; importer-&gt;SetRenderWindow(renderWindow);</div><div>&nbsp; importer-&gt;Update();</div><div>&nbsp;</div><div>ren1=importer-&gt;GetRenderer();</div><div>vtkRendererCollection *renCollection=vtkRendererCollection::New();</div><div>renCollection =
 renderWindow-&gt;GetRenderers();</div><div>renCollection-&gt;InitTraversal();</div><div>vtkRenderer *ren= vtkRenderer::New();</div><div>ren = renCollection-&gt;GetNextItem();</div><div><br></div><div>ren-&gt;ResetCamera();</div><div>vtkLight *light1=vtkLight::New();</div><div>light1-&gt;SetLightTypeToCameraLight ();</div><div>ren-&gt;AddLight(light1);</div><div><br></div><div>vtkActorCollection *actorcol=vtkActorCollection::New();</div><div>actorcol=ren-&gt;GetActors();</div><div><br></div><div>vtkActor *actor=vtkActor::New();</div><div>actor=actorcol-&gt;GetLastActor();</div><div><br></div><div>vtkMapper *map=actor-&gt;GetMapper();</div><div>vtkDataSet *PolyData=map-&gt;GetInput();</div><div><br></div><div>ren-&gt;AddActor(actor);</div><div>renderWindow-&gt;Render();</div><div>renderWindowInteractor-&gt;Start();</div><div>&nbsp;</div><div>&nbsp; return EXIT_SUCCESS;</div><div>}</div></div>  <div style="font-family: 'times new roman', 'new york', times,
 serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Dora Szasz &lt;dora.szasz@yahoo.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> "insight-users@itk.org" &lt;insight-users@itk.org&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" &lt;vtkusers@vtk.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, August 17, 2012 1:19 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> VRML Importer Example Problem<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv818114951"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div>Hello all,</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; ">I have tried to load a .wrl volume using vtkVRMLImporter.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; ">Everything works fine, but the volume is shrinked. Can you tell me why? The other problem is that the color of the volume is not loaded.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color:
 transparent; font-style: normal; ">I have attached here 2 pictures: one with the volume loaded with a WRLViewer and the other with the volume loaded with VTK.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; ">Thank you,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times, serif; background-color: transparent; font-style: normal; ">Dora</div></div></div></div><meta http-equiv="x-dns-prefetch-control" content="on"><br><br> </div> </div>  </div></body></html>