The instructions I gave are for if you are programming your own reader for a 
ParaView plugin. If you are using an existing reader and cannot or do not want 
to change the software, the easiest thing to do is probably to load in the 
group as you are to get those 10 objects in the Pipeline Browser. Then select 
all of those objects and apply the Group Datasets filter. You can then apply 
further filters to that group an it will be applied to all data.

-Ken

From: 庞庆源 <[email protected]<mailto:[email protected]>>
Date: Tuesday, September 17, 2013 7:26 PM
To: Kenneth Moreland <[email protected]<mailto:[email protected]>>
Subject: [EXTERNAL] Re: [Paraview] How does paraview pass multiple filenames to 
reader plugin?

If I have 10 files,all of which render a sphere with different radius.Now I 
want to render all of them into a object,so that I can apply a filter for all 
of them.
Suppose my files' name are 
f1.sd<http://f1.sd>,f2.sd<http://f2.sd>,...,f10.sd<http://f10.sd>,paraview will 
combine them as one f..sd.If I unfold f..sd and choose all of the 
files,paraview will render ten objects showed on the Pipeline Browser.I can 
only apply a filter for just one of the objects.If I don't unfold f..sd but 
choose it,paraview will only render the first file,f1.sd<http://f1.sd>.
This is my real problem.


2013/9/17 Moreland, Kenneth <[email protected]<mailto:[email protected]>>
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]>



--
庞庆源<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

Reply via email to