[Paraview] Problems with Reader GUI

Adriano Gagliardi agagliardi at ara.co.uk
Mon Mar 8 10:32:43 EST 2010


Paul,

---
You don't need to put the xml file in a qrc file.  Instead you can add the
plugin as follows:

ADD_PARAVIEW_PLUGIN(
 ParaReader_GUIPlugin "1.0"
 GUI_RESOURCE_FILES Client.xml
)
---

This did the trick! Not sure why the qrc didn't work (I have other filters
that use the qrc file with no problems), but the reader is being registered
now and working (nearly) as expected. I can at least get down to finishing
it off now!

Cheers,

Adriano


===================================

Adriano Gagliardi MEng PhD
Project Scientist
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
Bedford

Tel: 01234 32 4644
E-mail: agagliardi at ara.co.uk
Url: www.ara.co.uk 
-----Original Message-----
From: Paul Edwards [mailto:paul.m.edwards at gmail.com] 
Sent: 08 March 2010 14:56
To: agagliardi at ara.co.uk
Cc: ParaView
Subject: Re: [Paraview] Problems with Reader GUI

Adriano,

You don't need to put the xml file in a qrc file.  Instead you can add the
plugin as follows:


ADD_PARAVIEW_PLUGIN(
 ParaReader_GUIPlugin "1.0"
 GUI_RESOURCE_FILES Client.xml
)


Also, in the xml file you don't want to dot in the ".mesh" for the
extensions attribute.

Regards,
Paul

On 8 March 2010 14:01, Adriano Gagliardi <agagliardi at ara.co.uk> wrote:
>
> Dear All,
>
> I've hit a brick wall trying to implement a reader. Although 
> everything compiles fine, when I try to import the plugin into 
> ParaView it doesn't appear (no file extension). I split the plugin 
> into SM and GUI components and ParaView says the GUI plugin is not a 
> valid ParaView plugin. I've spent most of today trying to find the 
> issue, including all the usual ones (inconsistent reader names, wrong
Client path) with no luck.
>
> Now can anyone see anything wrong with what I've done here? And, is it 
> possible that an error may appear in the GUI plugin due to some issues 
> in the C++ source file (even if it compiles fine)?
>
> Thanks in advance for any help whatsoever that can be provided here.
>
> Adriano
>
> -----------
> CMakeLists.txt:
> -----------
> FIND_PACKAGE(ParaView REQUIRED)
> INCLUDE(${PARAVIEW_USE_FILE})
> INCLUDE_DIRECTORIES ( "${CMAKE_CURRENT_SOURCE_DIR}/../" )
>
> ADD_PARAVIEW_PLUGIN(
>  ParaReader_SMPlugin
>  "1.0"
>
>  SERVER_MANAGER_XML
>    ${CMAKE_CURRENT_SOURCE_DIR}/XML/Server.xml
>  SERVER_MANAGER_SOURCES
>    ${CMAKE_CURRENT_SOURCE_DIR}/vtkParaReader.cxx
> )
>
> ADD_PARAVIEW_PLUGIN(
>  ParaReader_GUIPlugin
>  "1.0"
>
>  GUI_RESOURCES
>    ${CMAKE_CURRENT_SOURCE_DIR}/ParaReader.qrc
> )
>
> SET(INSTALL_PATH
> "${CMAKE_INSTALL_PREFIX}/lib/paraview-${PARAVIEW_VERSION_MAJOR}.${PARA
> VIEW_V
> ERSION_MINOR}")
>
> INSTALL (  TARGETS
>           ParaReader_SMPlugin
>           ParaReader_GUIPlugin
>           DESTINATION ${INSTALL_PATH}
>        )
> ----
> ParaReader.qrc:
> ----
> <RCC>
>  <qresource prefix="/ParaViewResources" >
>    <file>XML/Client.xml</file>
>  </qresource>
> </RCC>
>
> -----------
> Client.xml:
> -----------
> <ParaViewReaders>
>  <Reader name="ParaReader"
>         extensions=".mesh"
>         file_description="None.">
>  </Reader>
> </ParaViewReaders>
>
> -----------
> Server.xml:
> -----------
> <ServerManagerConfiguration>
>  <ProxyGroup name="sources">
>  <SourceProxy name="ParaReader" class="vtkParaReader">
>
>     <StringVectorProperty name="FileName" command="SetFileName"
> animateable="1" number_of_elements="1">
>      <FileListDomain name="files"/>
>     </StringVectorProperty>
>
>  </SourceProxy>
>  </ProxyGroup>
> </ServerManagerConfiguration>
>
> ===================================
>
> Adriano Gagliardi MEng PhD
> Project Scientist
> Computational Aerodynamics
> Aircraft Research Association Ltd.
> Manton Lane
> Bedford
>
> Tel: 01234 32 4644
> E-mail: agagliardi at ara.co.uk
> Url: www.ara.co.uk
>
>
> ---------------------------
> This email contains information that is private and confidential and is
intended only for the addressee.  If you are not the intended recipient
please delete it and notify us immediately by e-mailing the sender.
> Note: All email sent to or from this address may be accessed by someone
other than the recipient, for system management and security reasons.
> Aircraft Research Association Ltd.  Registered in England, 
> Registration No 503668 Registered Office: Manton Lane, Bedford MK41 
> 7PF England VAT No GB 196351245
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at: 
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


---------------------------
This email contains information that is private and confidential and is intended only for the addressee.  If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other than the recipient, for system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office: Manton Lane, Bedford MK41 7PF England VAT No GB 196351245




More information about the ParaView mailing list