[Paraview] problems getting ParaView to use my reader plugin

Paul Edwards paul.m.edwards at gmail.com
Tue Sep 15 05:23:53 EDT 2009


I don't think you need the qrc file - try this instead for your GUI plugin

ADD_PARAVIEW_PLUGIN(TxtReaderGUIPlugin "1.0"
    GUI_RESOURCE_FILES TxtReaderGUI.xml)

Regards,
Paul


2009/9/15 Christine Corbett Moran <corbett at physik.uzh.ch>

> Hi,
>
> I am having some basic problems getting Paraview to use my simple reader
> plugin. After loading the two plugins (one  for the server side and one for
> the client side) in my GUI, if I try to open a new file with my new
> extension (txt or txts) it neither recognizes the extension, nor displays my
> new reader as a choice among the selection of possible readers for
> unrecognized extensions.
>
> I followed the process for writing a reader plugin  in chapter 19.4 of the
> Paraview guide, creating the files TxtReader.qrc, TxtReaderGUI.xml, and
> TxtReaderSM.xml along with the code vtkTxtReader.cxx and vtkTxtReader.h
> (which are identical to vtkSimplePointsReader with the only the class name
> changed). The both client and server side build without problems. I then
> load both the server side plugin and the client side plugin, in that order,
> in my Paraview GUI, which also goes without problems or errors. But after
> all this neither my new file extension nor my new reader are displayed when
> I go to open a sample .txt file.
>
> Any ideas how to debug? Below I have included my .qrc, .xml, and
> CMakeLists.txt files
>
> Thanks,
> Christine
>
> CMakeLists.txt:
> cmake_minimum_required(VERSION 2.4)
> FIND_PACKAGE(ParaView REQUIRED)
> INCLUDE(${PARAVIEW_USE_FILE})
> #define the server-side portion of the reader plugin
> ADD_PARAVIEW_PLUGIN(TxtReaderSMPlugin "1.0"
>         SERVER_MANAGER_SOURCES vtkTxtReader.cxx
>         SERVER_MANAGER_XML  TxtReaderSM.xml)
> #define the client-side portion of the reader plugin
> ADD_PARAVIEW_PLUGIN(TxtReaderGUIPlugin "1.0"
>         GUI_RESOURCES TxtReader.qrc)
>
>  TxtReader.qrc:
> <RCC>
>         <qresource>
>                 <file>TxtReaderGUI.xml</file>
>         </qresource>
> </RCC>
>
> TxtReaderSM.xml:
> <ServerManagerConfiguration>
>         <ProxyGroup name="sources">
>                 <SourceProxy name="TxtReader" class="vtkTxtReader">
>                         <StringVectorProperty
>                                 name="FileName"
>                                 command="SetFileName"
>                                 number_of_elements="1">
>                                 <FileListDomain name="files"/>
>                                 <Documentation>
>                                         Reads in points from ascii file.
>                                 </Documentation>
>                         </StringVectorProperty>
>                 </SourceProxy>
>         </ProxyGroup>
> </ServerManagerConfiguration>
>
> TxtReaderGUI.xml:
> <ParaViewReaders>
>         <Reader name="TxtReader"
>                         extensions="txt txts"
>                         file_description="reads in ascii, one point per
> line">
>         </Reader>
> <ParaViewReaders>
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090915/651d8bcb/attachment.htm>


More information about the ParaView mailing list