Paraview does not import the complete vtk python modules when you run that.  Try this:<br><br>import libvtkXdmfPython as xm<br>xm.vtkXdmfReader()<br><br>or try import vtkXdmfPython instead of libvtkXdmfPython, the name is different on different platforms and versions.<br>
<br>Pat<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 5:09 PM, Tim Gallagher <span dir="ltr">&lt;<a href="mailto:tim.gallagher@gatech.edu">tim.gallagher@gatech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">Maybe I&#39;m missing something, but if I <br><br>from paraview import vtk<br><br>there is no vtkXDMFReader in it. The only vtkX* is vtkXML related. It was even compiled with XDMF_WRAP_PYTHON turned on, so maybe it&#39;s there but called something else?<br>
<br>Tim<br><br><hr><b>From: </b>&quot;Tim Gallagher&quot; &lt;<a href="mailto:tim.gallagher@gatech.edu" target="_blank">tim.gallagher@gatech.edu</a>&gt;<br><b>To: </b><a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Sent: </b>Wednesday, February 9, 2011 4:59:16 PM<div><div></div><div class="h5"><br><b>Subject: </b>Re: [Paraview] Scripting and new VTK objects<br><br><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">
We had looked at the programmable source, but we didn&#39;t know how to access the XDMFReader. But, with what you pointed out, it looks like that isn&#39;t hard so I&#39;ll give it a shot.<br><br>Out of curiosity, what is wrong with the approach I was trying? Is it possible to completely copy information from one source in a pipeline into another source in a pipeline and delete the original source? Why does Fetch() show data inside the DataObjectGenerator but no filter can seem to access it?<br>
<br>Thanks for the help,<br><br>Tim<br><br><hr><b>From: </b>&quot;pat marion&quot; &lt;<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@kitware.com</a>&gt;<br><b>To: </b><a href="mailto:gtg085x@mail.gatech.edu" target="_blank">gtg085x@mail.gatech.edu</a><br>
<b>Cc: </b><a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br><b>Sent: </b>Wednesday, February 9, 2011 4:55:05 PM<br><b>Subject: </b>Re: [Paraview] Scripting and new VTK objects<br><br>Hi Tim,<br>
<br>Have you looked at the python programmable source?  With the python programmable source you can specify python code to run on the server side.  You won&#39;t be able to use paraview python api though.  Instead of<br>
<br>XDMFReader(FileName=...)<br><br>it would look like:<br><br>reader = vtkXDMFReader()<br>reader.SetFileName(...)<br>reader.Update()<br>data = reader.GetOutput()<br><br>You can find examples of the python programmable source:<br>

<br><a href="http://www.paraview.org/Wiki/Python_Programmable_Filter#Generating_Data_.28Programmable_Source.29" target="_blank">http://www.paraview.org/Wiki/Python_Programmable_Filter#Generating_Data_.28Programmable_Source.29</a><br>
<a href="http://www.paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters" target="_blank">http://www.paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters</a>.<br>
<br>Pat<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 4:20 PM, Tim Gallagher <span dir="ltr">&lt;<a href="mailto:tim.gallagher@gatech.edu" target="_blank">tim.gallagher@gatech.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi,<br>
<br>
I&#39;ve searched online at length for this and couldn&#39;t find the answer, so hopefully somebody here can help me.<br>
<br>
I am trying to create a new VTK object (vtkMultiBlockDataSet) composed of portions of manipulated data from some other VTK object (in this case, a vtkStructuredGrid). I then want to delete the vtkStructuredGrid object and visualize the new vtkMultiBlockDataSet.<br>


<br>
So, here&#39;s the general outline of what I do in a python script:<br>
<br>
newSource = DataGeneratorObject(Program=&quot;MB{}&quot;)<br>
newSource.UpdatePipeline()<br>
<br>
newData = servermanager.Fetch(newSource)<br>
newData.SetNumberOfBlocks(64)<br>
<br>
for n in range(0,64):<br>
    myData = XDMFReader(FileName=...)<br>
    myData.UpdatePipeline()<br>
<br>
    localData = servermanager.Fetch(myData)<br>
<br>
    &lt;manipulate the data&gt;<br>
<br>
    newData.SetBlock(n,vtk.vtkStructuredGrid())<br>
    newData.GetBlock(n).DeepCopy(localData)<br>
<br>
    Delete(localData)<br>
    Delete(myData)<br>
<br>
newData.DataHasBeenGenerated()<br>
newSource.UpdatePipelineInformation()<br>
newSource.UpdatePipeline()<br>
<br>
With all that done, if I try to apply a filter to newSource, it doesn&#39;t work. The data is definitely inside newData -- I can print it out and such, even after I delete the localData (which is why I used DeepCopy).<br>


<br>
But I don&#39;t know how to send that data back to the server. Or, maybe I don&#39;t need the DataObjectGenerator -- if that&#39;s the case, how do I create a local VTK object and then send it to the server to visualize?<br>


<br>
Hopefully that example is clear... I appreciate any help you guys can provide. It would be easiest if I could create my own custom reader, but I can&#39;t do that because we use Paraview on a lot of machines that we can&#39;t recompile to include the new plugin.<br>


<br>
Thanks,<br>
<br>
Tim<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</blockquote></div><br>
</div><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>