[Paraview-developers] Custom Paraview Application help
Charles Boivin
charles.boivin at mayahtt.com
Wed Sep 21 11:03:54 EDT 2016
Uktarsh,
Thanks again. That link was quite helpful to get me going!
Charles
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
Sent: Tuesday, September 20, 2016 9:46 PM
To: Charles Boivin
Cc: paraview-developers at paraview.org
Subject: Re: [Paraview-developers] Custom Paraview Application help
Look at this example: https://gitlab.kitware.com/paraview/paraview/blob/master/Qt/Core/Testing/Cxx/BasicApp.cxx
It shows a little more about how to create views, show data in those views, etc. Alas, there is no higher level architecture document for ParaView available yet. We do plan to put that together, but not sure when it'd happen. In the mean time, feel free to ask specific questions as you run into them.
On Tue, Sep 20, 2016 at 11:08 AM, Charles Boivin <charles.boivin at mayahtt.com<mailto:charles.boivin at mayahtt.com>> wrote:
Uktarsh,
That did the trick -- thank you very much. It seems the file is loaded... not that it is being displayed of course.
Where could I find more info on where to go next from here (like, say, actually displaying the data in that file I just loaded)? Is there something that documents the high-level architecture/overview for Paraview, in particular for people interested in custom applications? I have used VTK in the (distant) past, and I'm assuming that Paraview follows the same concepts (pipelines, etc), but not quite sure where to find that info.
Thanks,
Charles
-----Original Message-----
From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com<mailto:utkarsh.ayachit at kitware.com>]
Sent: Tuesday, September 20, 2016 9:56 AM
To: Charles Boivin
Cc: paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>
Subject: Re: [Paraview-developers] Custom Paraview Application help
Charles,
Try calling the following before the pqLoadDataReaction.
vtkSMReaderFactory* readerFactory =
vtkSMProxyManager::GetProxyManager()->GetReaderFactory();
readerFactory->UpdateAvailableReaders()
Does that help?
Utkarsh
Utkarsh
On Tue, Sep 20, 2016 at 9:05 AM, Charles Boivin <charles.boivin at mayahtt.com<mailto:charles.boivin at mayahtt.com>> wrote:
> Just trying to play around with creating custom Paraview-based applications.
> I have compiled the examples that come with Paraview itself. Focusing
> on the ‘DemoApp1’ project, this is what the constructor for the main
> window looks
> like:
>
>
>
> myMainWindow::myMainWindow(QWidget* parentObject,
>
> Qt::WindowFlags wflags) : Superclass(parentObject, wflags)
>
> {
>
> Ui::myMainWindow ui;
>
> ui.setupUi(this);
>
>
>
> // Make a connection to the builtin server
>
> pqApplicationCore* core = pqApplicationCore::instance();
>
>
> core->getObjectBuilder()->createServer(pqServerResource("builtin:"));
>
>
>
> // Create render view
>
> pqRenderView* view = qobject_cast<pqRenderView*>(
>
> pqApplicationCore::instance()->getObjectBuilder()->createView(
>
> pqRenderView::renderViewType(),
>
> pqActiveObjects::instance().activeServer()));
>
> pqActiveObjects::instance().setActiveView(view);
>
>
>
> // Set it as the central widget
>
> this->setCentralWidget(view->widget());
>
> }
>
>
>
> This strictly brings up a 3D render view in the window, no menus
> whatsoever, etc. That’s what I was looking for to start with. I wanted
> to hardcode loading a file next. Digging around a bit, I thought this
> would do the
> trick:
>
>
>
> // Load a file
>
> QStringList fileList;
>
> fileList.append("D:/data/my_datafile.vtu");
>
> pqLoadDataReaction::loadData(fileList);
>
>
>
> It seems to find the file alright but it cannot seem to find a proper
> reader for the file. It pops up a dialog with the readers it could use
> and the list is empty.
>
>
>
> So it seems I am clearly missing something… documentation for
> vtkSMReaderFactory suggests configuration through XML files. Not too
> sure how to go about that at this point… Is
> pqLoadDataReaction::loadData() too ‘high-level’ to use in something as
> barebones as this example? Is there a better alternative at that
> point? Or if it is appropriate to use, what else does it require to be set in order to properly load a file?
>
>
>
> Thanks in advance for your reply,
>
>
>
> Charles
>
>
> _______________________________________________
> Powered by www.kitware.com<http://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/20160921/f254288b/attachment-0001.html>
More information about the Paraview-developers
mailing list