<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>You probably need to do something like<br> reader->GetOutput()->GetBounds() or <span>reader->GetOutput()->GetCenter()</span><br></div><div><div><br></div><div><br></div><div class="ydpce9ff536signature"><div style="font-size:16px;font-family:Helvetica, Arial, sans-serif;"><div>Todd Martin, PhD.<br></div><div><i>Freelance Engineer/Software Architect.</i></div><br></div></div></div>
        <div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_1025026498" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, July 2, 2018, 11:30:42 PM GMT+12, shayan moradkhani <shayan.moradkhani@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">int main(int, char *[])<br clear="none">{<br clear="none">    std::string filename = "Part3.obj";<br clear="none">    vtkSmartPointer<vtkOBJReader> reader =<br clear="none">vtkSmartPointer<vtkOBJReader>::New();<br clear="none">    reader->SetFileName(filename.c_str());<br clear="none">    reader->Update();<br clear="none">    // Visualize<br clear="none">    vtkSmartPointer<vtkPolyDataMapper> mapper =<br clear="none">        vtkSmartPointer<vtkPolyDataMapper>::New();<br clear="none">    mapper->SetInputConnection(reader->GetOutputPort());<br clear="none">    <br clear="none">    vtkSmartPointer<vtkActor> actor =<br clear="none">        vtkSmartPointer<vtkActor>::New();<br clear="none">    actor->SetMapper(mapper);<br clear="none">    actor->GetProperty()->SetColor(1.0000, 0.3882, 0.2784);<br clear="none">    <br clear="none"><br clear="none">    vtkSmartPointer<vtkRenderer> renderer =<br clear="none">        vtkSmartPointer<vtkRenderer>::New();<br clear="none">    renderer->AddActor(actor);<br clear="none">    renderer->SetBackground(.1, .3, .3); // Background color green    <br clear="none">    // Zoom in a little by accessing the camera and invoking its "Zoom" method.<br clear="none">    renderer->ResetCamera();<br clear="none">    //renderer->GetActiveCamera()->Zoom(1.5);<br clear="none"><br clear="none">    vtkSmartPointer<vtkRenderWindow> renderWindow =<br clear="none">        vtkSmartPointer<vtkRenderWindow>::New();<br clear="none">    renderWindow->SetSize(800, 600);<br clear="none">    renderWindow->AddRenderer(renderer);<br clear="none"><br clear="none">    vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =<br clear="none">        vtkSmartPointer<vtkRenderWindowInteractor>::New();<br clear="none">    renderWindowInteractor->SetRenderWindow(renderWindow);<br clear="none"><br clear="none"><br clear="none"><br clear="none">    renderWindowInteractor->Start();<br clear="none"><br clear="none">    return EXIT_SUCCESS;<br clear="none">}<br clear="none"><br clear="none">this is what i have. however, when i load in vtk, i have no idead where the<br clear="none">model is loaded (with respect to the global coordinate system). if i could<br clear="none">get its center, it would be easier i guess to apply transformation on the<div class="yqt0428315723" id="yqtfd88611"><br clear="none">object<br clear="none"><br clear="none"><br clear="none"><br clear="none">--<br clear="none">Sent from: <a shape="rect" href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html</a><br clear="none">_______________________________________________<br clear="none">Powered by www.kitware.com<br clear="none"><br clear="none">Visit other Kitware open-source projects at <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none"><br clear="none">Please keep messages on-topic and check the VTK FAQ at: <a shape="rect" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br clear="none"><br clear="none">Search the list archives at: <a shape="rect" href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br clear="none"><br clear="none">Follow this link to subscribe/unsubscribe:<br clear="none"><a shape="rect" href="https://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br clear="none"></div></div></div>
            </div>
        </div></div></body></html>