[Paraview] Python Programmable Filter Time Series Source

Bane Sullivan banesulli at gmail.com
Sat Dec 2 17:43:01 EST 2017


Here is an example of a programmable filter vis XML that I want to simply
print off the various file names or give me and ability to read the file
series. I have this python programmable filter set up to work when I click
File->Open in ParaView. I have the ability to then chose file series from
the file prompt. How might I make a programmable filter via XML attributes
so that it can handle file series.

<ServerManagerConfiguration>
  <ProxyGroup name="sources">
    <SourceProxy name="ListSeries" class="vtkPythonProgrammableFilter"
label="List Series">
      <Documentation
        long_help=""
        short_help="">
      </Documentation>
      <Hints>
        <ShowInMenu category=“File Series Readers" />
      </Hints>
      <Hints>
        <ReaderFactory extensions="dat txt"
          file_description="list series" />
      </Hints>

      <!-- Output data type: "vtkImageData" -->
      <IntVectorProperty command="SetOutputDataSetType"
                         default_values="6"
                         name="OutputDataSetType"
                         number_of_elements="1"
                         panel_visibility="never">
        <Documentation>The value of this property determines the dataset
type
        for the output of the programmable filter.</Documentation>
      </IntVectorProperty>



      <StringVectorProperty
        panel_visibility="default"
        name="FileName"
        label="FileName"
        initial_string="FileName"
        command="SetParameter"
        animateable="1"
        default_values="absolute path"
        number_of_elements="1">
        <FileListDomain name="files"/>
        <Documentation></Documentation>
      </StringVectorProperty>

      <StringVectorProperty
        panel_visibility="default"
        name="files"
        label="files"
        initial_string="files"
        command="SetParameter"
        animateable="1"
        default_values="abs path"
        number_of_elements="1">
        <Documentation></Documentation>
      </StringVectorProperty>

      <StringVectorProperty
        name="Script"
        command="SetScript"
        number_of_elements="1"
        default_values="print(FileName)&#xA;print(files)&#xA;"
        panel_visibility="advanced">
        <Hints>
          <Widget type="multi_line" syntax="python"/>
        </Hints>
        <Documentation>This property contains the text of a python program
that
        the programmable source runs.</Documentation>
        </StringVectorProperty>

      <StringVectorProperty
        name="InformationScript"
        label="RequestInformation Script"
        command="SetInformationScript"
        number_of_elements="1"
        default_values="print(FileName)&#xA;print(files)&#xA;"
        panel_visibility="advanced">
        <Hints>
          <Widget type="multi_line" syntax="python"/>
        </Hints>
        <Documentation>This property is a python script that is executed
during
        the RequestInformation pipeline pass. Use this to provide
information
        such as WHOLE_EXTENT to the pipeline downstream.</Documentation>
      </StringVectorProperty>

    </SourceProxy>
 </ProxyGroup>
</ServerManagerConfiguration>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20171202/3af5b42e/attachment.html>


More information about the ParaView mailing list