<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>Yes, I have tried to mantain the perspective. Yes, it is </span><span style="font-size: 12pt; ">"squished" in only one direction.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; "><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; ">Yes, if I add </span><span style="font-size: 12pt; "> </span><span style="font-size: 12pt; ">importer->SetRenderWindow(renderWindow); in that place works fine.</span></div><div
style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; ">I don't have the rights to correct it.</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; "><br></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; ">Basically, remains this codes that works perfect:</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span style="font-size: 12pt; "><br></span></div><div style="background-color: transparent;
"><span><div style="background-color: transparent; ">#include <vtkVersion.h></div><div style="background-color: transparent; ">#include <vtkRenderer.h></div><div style="background-color: transparent; ">#include <vtkRenderWindow.h></div><div style="background-color: transparent; ">#include <vtkRenderWindowInteractor.h></div><div style="background-color: transparent; ">#include <vtkVRMLImporter.h></div><div style="background-color: transparent; ">#include <vtkDataSet.h></div><div style="background-color: transparent; ">#include <vtkActorCollection.h></div><div style="background-color: transparent; ">#include <vtkPolyData.h></div><div style="background-color: transparent; ">#include <vtkPolyDataMapper.h></div><div style="background-color: transparent; ">#include <vtkPolyDataNormals.h></div><div style="background-color: transparent; ">#include <vtkActor.h></div><div style="background-color:
transparent; ">#include <vtkSmartPointer.h></div><div style="background-color: transparent; "> </div><div style="background-color: transparent; ">int main ( int argc, char *argv[])</div><div style="background-color: transparent; ">{</div><div style="background-color: transparent; "> if(argc != 2)</div><div style="background-color: transparent; "> {</div><div style="background-color: transparent; "> std::cout << "Required arguments: Filename" << std::endl;</div><div style="background-color: transparent; "> return EXIT_FAILURE;</div><div style="background-color: transparent; "> }</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; "> std::string filename = argv[1];</div><div style="background-color: transparent; "> std::cout << "Reading " << filename << std::endl;</div><div
style="background-color: transparent; "><br></div><div style="background-color: transparent; "> vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div><div style="background-color: transparent; "> vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();</div><div style="background-color: transparent; "> renderWindow->AddRenderer(renderer);</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; "> vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::New();</div><div style="background-color: transparent; "> renderWindowInteractor->SetRenderWindow(renderWindow);</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; "> // VRML Import</div><div
style="background-color: transparent; "> vtkSmartPointer<vtkVRMLImporter> importer = </div><div style="background-color: transparent; "> vtkSmartPointer<vtkVRMLImporter>::New();</div><div style="background-color: transparent; "> importer->SetFileName ( filename.c_str() );</div><div style="background-color: transparent; "> importer->Read();</div><div style="background-color: transparent; "> importer->SetRenderWindow(renderWindow);</div><div style="background-color: transparent; "> importer->Update();</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; "> renderWindow->Render();</div><div style="background-color: transparent; "> renderWindowInteractor->Start();</div><div style="background-color: transparent; "> </div><div style="background-color: transparent; "> return EXIT_SUCCESS;</div><div
style="background-color: transparent; ">}</div></span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></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> David Doria <daviddoria@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Dora Szasz <dora.szasz@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "vtkusers@vtk.org" <vtkusers@vtk.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, August 17, 2012 2:59 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] VRML Importer Example Problem<br> </font> </div> <br>
On Fri, Aug 17, 2012 at 8:53 AM, Dora Szasz <<a ymailto="mailto:dora.szasz@yahoo.com" href="mailto:dora.szasz@yahoo.com">dora.szasz@yahoo.com</a>> wrote:<br>> Yes, I sent another email previously to that who solves the problem, in<br>> which I have attached two images, for demonstration.<br>> There is one picture with the volume loaded with a ordinary wrl viewer and<br>> the other one obtained by loading the volume using the example from:<br>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/VRML.<br>><br>> I attached them again, to be able to see the differences, even if in vtk<br>> list will appear later due to moderator acceptance.<br>><br>> I attached also a picture after the correction I made: correct_with_VTK.tif<br>><br>> I hope that it is clear now.<br>><br>> Dora<br><br>Weird - I'm assuming those screenshots are all from the same<br>perspective? I.e. it seems to be "squished" in only one
dimension?<br><br>I see now the addition of<br><br> importer->SetRenderWindow(renderWindow);<br><br>between the Read() and Update() calls - was that the change that fixed<br>it? If so, can you please correct it on the wiki?<br><br>Thanks!<br><br>David<br><br><br> </div> </div> </div></body></html>