[Paraview-developers] How rendering of vtk object happens in Paraview

Chiranjib Sur sur.chiranjib at gmail.com
Thu Mar 19 10:02:02 EDT 2015


Hi Utkarsh,
Thanks for your reply. I can understand the amount of work it requires. But
once you publish this, that will be immensely helpful like the book you
have edited this year.

Let me be more specific to narrow down the answer I am looking for. Is
there any place where I can understand the philosophy behind the virtual
function "RequestData" which I can overload ? I think this might solve my
issues for the time being.
Thanks again,
Chiranjib

On Thu, Mar 19, 2015 at 5:58 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> Chiranjib,
>
> That's a painfully loaded question, I am afraid :). Here's a Wiki page
> that will hopefully give you some background [1]. I admit, we're
> woefully missing a good design document that describes the complete
> picture from proxies to views and representations. It's been on the
> TODO list for a while now.
>
> Utkarsh
>
>
> [1] http://www.paraview.org/ParaView/index.php/Views_And_Representations
>
> On Thu, Mar 19, 2015 at 7:53 AM, Chiranjib Sur <sur.chiranjib at gmail.com>
> wrote:
> > Hi All,
> > This might sound a naive question to the experienced Paraview users
> (which I
> > am not).
> >
> > I want to understand how the rendering happens in Paraview for any vtk
> > object. For example, if I want to render a STL file in the paraview
> window,
> > how do I do it ?
> > The underlying vtkSTLreader is able to read the file (if I open the file
> > using File>Open menu and then press "Apply" button).
> > I am trying to understand the mechanism behind these operations so that i
> > can customise and develop my own piece of utiilty.
> >
> > The following vtk example creates a new visualization window but I want
> to
> > render the object in the paraview window.
> >
> > Thanks much for your help. Is there some place where I can browse/read to
> > bring up my understanding about the paraview infrastructure.
> >
> > Thanks,
> > Chiranjib
> >
> >
> > Here is the sample vtk code I am refering to (which creates a new viz
> window
> > - which I don't want to get)
> >
> > vtkSmartPointer<vtkSTLReader> reader =
> vtkSmartPointer<vtkSTLReader>::New();
> >        reader->SetFileName("filename.stl");
> >        reader->Update();
> >
> >        /*
> >        VTK rendering : a separate visualization windows Pops up
> >        */
> >
> >          vtkSmartPointer<vtkPolyDataMapper> mapper =
> > vtkSmartPointer<vtkPolyDataMapper>::New();
> >          mapper->SetInputConnection(reader->GetOutputPort());
> >
> >          vtkSmartPointer<vtkActor> actor =
> vtkSmartPointer<vtkActor>::New();
> >          actor->SetMapper(mapper);
> >
> >          vtkSmartPointer<vtkRenderer> renderer =
> > vtkSmartPointer<vtkRenderer>::New();
> >          vtkSmartPointer<vtkRenderWindow> renderWindow =
> > vtkSmartPointer<vtkRenderWindow>::New();
> >          renderWindow->AddRenderer(renderer);
> >
> >          vtkSmartPointer<vtkRenderWindowInteractor>
> renderWindowInteractor =
> > vtkSmartPointer<vtkRenderWindowInteractor>::New();
> >          renderWindowInteractor->SetRenderWindow(renderWindow);
> >
> >          renderer->AddActor(actor);
> >          renderer->SetBackground(.3, .6, .3); // Background color green
> >
> >          renderWindow->Render();
> >          renderWindowInteractor->Start();
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Search the list archives at:
> > http://markmail.org/search/?q=Paraview-developers
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview-developers
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20150319/849e8b70/attachment-0001.html>


More information about the Paraview-developers mailing list