[Paraview] problems getting ParaView to use my reader plugin
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Tue Sep 15 08:57:10 EDT 2009
Since 3.4, the qrc file is not needed unless you are adding qt
resources such as icons etc. to use in your custom code. The
ServerManager xml is almost always need when adding a new
filter/reader etc. The client-xml is only needed when adding readers,
writers or configuring where a new filter shows up in the filters
menu.
You might also want to refer to the plugin wiki page (
http://www.paraview.org/Wiki/Plugin_HowTo ).
Utkarsh
On Tue, Sep 15, 2009 at 5:34 AM, Christine Corbett Moran
<corbett at physik.uzh.ch> wrote:
> I believe that is another possible solution but I haven't tried it.
>
> I fixed my problem by adding 'prefix="/ParaViewResources" ' when specifying
> the qresource thanks to the help of another poster: <qresource
> prefix="/ParaViewResources" > I had previously inadvertently removed this
> specification from my code.
>
> But on that topic, when would I need the Qt resource file vs. when can I
> avoid it? The Paraview guide which I am following has the structure of two
> xml files, one for the server and one for the client and the qrc file for
> the client.
>
> Thanks
> Christine
>
>
> On Tue, Sep 15, 2009 at 11:23 AM, Paul Edwards <paul.m.edwards at gmail.com>
> wrote:
>>
>> 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
>>>
>>
>
>
> _______________________________________________
> 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
>
>
More information about the ParaView
mailing list