The convention for making a reader that accepts multiple files is to first
implement a pair of methods in the reader to add file names one at a time and
another method to reset the list of file names. Here is some example
declarations that would be in the reader's header file.
// Description:
// Adds names of files to be read. The files are read in the order
// they are added.
virtual void AddFileName(const char* fname);
// Description:
// Remove all file names.
virtual void RemoveAllFileNames();
Then in your reader xml file of the SourceProxy declare a StringVectorProperty
with a FileListDomain. Here is an example of that.
<StringVectorProperty animateable="0"
clean_command="RemoveAllFileNames"
command="AddFileName"
name="FileNames"
number_of_elements="0"
panel_visibility="never"
repeat_command="1">
<FileListDomain name="files" />
<Documentation>The list of files to be read by the
reader.</Documentation>
</StringVectorProperty>
-Ken
From: 庞庆源 <[email protected]<mailto:[email protected]>>
Date: Tuesday, September 17, 2013 5:23 AM
To: paraview <[email protected]<mailto:[email protected]>>
Subject: [EXTERNAL] [Paraview] How does paraview pass multiple filenames to
reader plugin?
I have read some source of paraview plugin.All of them define a char pointer
such as:
char *FileName;
and have two macro:
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
But paraview can choose multiple files once.And I would like to get the
filenames.So what should I do?Can someone give me a simple example?
--
庞庆源<mailto:[email protected]>
_______________________________________________
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