I haven't tried adding it to readers.xml. I want to distribute this to
other users, and it would be best if they didn't have to recompile -
just use the plugin.
The good news is that the reader isn't mine; it already exists. It is
the UNC Meta Image reader (vtkMetaImageReader). It reads .mha & .mhd
files. I'm simply trying to extend it to read time series. I've
attached the .xml file that I've written.
It appears to select the original reader rather than the file series
reader for these files. I _think_ I've set all of the properties
correctly. I wonder if I need to tell it to override the file
extensions somehow?
Thanks,
Sean
Quoting Berk Geveci <[email protected]>:
Hmmm. It should work. Are you saying that it works if you add it to
readers.xml but not as a plugin? Can you share your xml and maybe the
reader code with the guts taken out?
-berk
On Thu, Jan 22, 2009 at 5:13 PM, Sean Ziegeler
<[email protected]> wrote:
I'd like my new FileSeriesReaderProxy to be a run-time loaded plugin.
I've created the necessary XML tags as per the discussion below, and put
it in a .xml file. It loads fine with the Plugin Manager, but the files
still aren't recognized as a series.
Is this because run-time loading of a FileSeriesReaderProxy isn't
supported? Has anyone else tried it this way (as opposed to adding it
to the readers.xml file and recompiling)?
Thanks,
Sean
Sean Ziegeler wrote:
Ken,
Yes, that's correct. The "Meta" (.mha, .mhd) reader exists in ParaView
(actually in VTK) and I want to load in a file series. And that answers my
question, i.e., ParaView will load files of the same extension
using the new
plugin reader instead of the original one.
The reason I asked was that I seem to recall earlier versions of ParaView
always using the _first_ reader for a given file extension if the extension
conflicted with another reader. I assume that has been changed recently.
Anyway, thanks for the answer. I didn't want to spend time on this if
there was no hope of it working.
-Sean
Moreland, Kenneth wrote:
Sean,
I am a little confused. Are you saying that there exists a reader in
ParaView that you want to use to load in a file series? And the issue is
that because the reader already exists in ParaView in the "sources" group
and you cannot move it to "internal_sources" or some other naming
conflict?
If this is the case, I don't think there is anything special you have to
do. Just make a new <FileSeriesReaderProxy> tag in the "sources" group.
The Reader subproxy can be in any group; it does not mater if it
also came
from "sources". The FileSeriesReaderProxy can also co-exist with
the single
file reader so long as they have unique names. You can also make your
reader read files with the same file extension; ParaView will use
the plugin
reader instead of the one defined in ParaView.
-Ken
On 1/8/09 12:19 PM, "Sean Ziegeler" <[email protected]>
wrote:
I'd like to write a plugin that makes the Meta format time-aware.
I've
looked at: http://www.vtk.org/Wiki/Animating_legacy_VTK_file_series .
From that, I see that I can modify
VTK/Servers/ServerManager/Resources/reader.xml, but I'd prefer it to
be
plugin that I can send to someone else with requiring a complete
rebuild
of Paraview/VTK. It should be possible to write a .xml file that gets
loaded as a plugin and that wraps the Meta reader in a
vtkFileSeriesReader.
However, if I do it without modifying readers.xml, the original Meta
reader does not get moved to a different ProxyGroup. Does that mean
my
new Meta Series reader won't ever be used? Is there some other way to
do it that doesn't require a rebuild of Paraview?
Thanks,
Sean
_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview
**** Kenneth Moreland
*** Sandia National Laboratories
*********** *** *** *** email: [email protected]
** *** ** phone: (505) 844-8919
*** web: http://www.cs.unm.edu/~kmorel
_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview
_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview
<ProxyGroup name="sources">
<FileSeriesReaderProxy name="MetaFileSeriesReader"
class="vtkFileSeriesReader"
label="Meta Series Reader"
file_name_method="SetFileName">
<Documentation
short_help="Read UNC meta image data (series version)."
long_help="Read binary UNC meta image data (in a time series of files).">
This reader is a replacement plugin adding time series reading from multiple
files.
</Documentation>
<SubProxy>
<Proxy name="Reader"
proxygroup="sources" proxyname="Meta Image Reader">
</Proxy>
</SubProxy>
<StringVectorProperty
name="FileNames"
clean_command="RemoveAllFileNames"
command="AddFileName"
animateable="0"
number_of_elements="0"
repeat_command="1">
<FileListDomain name="files"/>
<Documentation>
The list of files to be read by the reader. If more than 1 file is specified,
the reader will switch to file series mode in which it will pretend that it
can support time and provide 1 file per time step.
</Documentation>
</StringVectorProperty>
<DoubleVectorProperty
name="TimestepValues"
repeatable="1"
information_only="1">
<TimeStepsInformationHelper/>
<Documentation>
Available timestep values.
</Documentation>
</DoubleVectorProperty>
</FileSeriesReaderProxy>
</ProxyGroup>
_______________________________________________
ParaView mailing list
[email protected]
http://www.paraview.org/mailman/listinfo/paraview