<div dir="ltr">Roman,<div><br></div><div>I am copying your solution from your other thread here for posterity.</div><div><br></div><div><span style="font-size:12.8px">import paraview.simple as pvs</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">plane1 = pvs.Plane(guiName="xz-plane")</span><br style="font-size:12.8px"><span style="font-size:12.8px">dp = pvs.GetDisplayProperties(plane</span><span style="font-size:12.8px">1)</span><br style="font-size:12.8px"><span style="font-size:12.8px">dp.Representation = 'Surface With Edges'</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">texProxy = pvs.servermanager.CreateProxy(</span><span style="font-size:12.8px">"textures", "ImageTexture")</span><br style="font-size:12.8px"><span style="font-size:12.8px">texProxy.GetProperty("FileName</span><span style="font-size:12.8px">").SetElement(0, "texture.png")</span><br style="font-size:12.8px"><span style="font-size:12.8px">texProxy.UpdateVTKObjects()</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">dp.Texture= texProxy</span><br style="font-size:12.8px"><span style="font-size:12.8px">print dp.Texture</span><br style="font-size:12.8px"><span style="font-size:12.8px">pvs.Render()</span><br></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">- Cory</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 11:50 AM, Grothausmann, Roman Dr. <span dir="ltr"><<a href="mailto:grothausmann.roman@mh-hannover.de" target="_blank">grothausmann.roman@mh-hannover.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear mailing list members,<br>
<br>
<br>
Is it possible to assign a 2D texture image to an object that has TCords in python?<br>
I found quite a few people trying and reporting that it does not work nor does the Trace Option under paraview tell what happens if a texture is assigned in the GUI:<br>
<a href="http://www.paraview.org/pipermail/paraview/2012-March/024255.html" rel="noreferrer" target="_blank">http://www.paraview.org/pipermail/paraview/2012-March/024255.html</a><br>
<a href="http://www.paraview.org/Bug/view.php?id=12953" rel="noreferrer" target="_blank">http://www.paraview.org/Bug/view.php?id=12953</a><br>
<br>
I've tried:<br>
<br>
import paraview.simple as pvs<br>
<br>
<br>
reader = pvs.OpenDataFile("test.png)<br>
#reader.UpdatePipelineInformation()<br>
reader.UpdatePipeline()<br>
print reader.GetDataInformation().GetBounds() # needs UpdatePipeline<br>
<br>
obj = pvs.Plane()<br>
plane1Display = pvs.Show(obj)<br>
plane1Display.Texture = reader<br>
<br>
dp = pvs.GetDisplayProperties(obj)<br>
dp.Representation = 'Surface With Edges'<br>
<br>
dp.Texture = reader<br>
<br>
<br>
but neither plane1Display.Texture nor dp.Texture seem to allow to set the texture (see error below)<br>
<br>
Any help or hints are very much appreciated<br>
Roman<br>
<br>
<br>
RROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 390<br>
vtkPVSessionCore (0x258c2e0): Object type: vtkGlyph3DRepresentation, could not find requested method: "SetTexture"<br>
or the method was called with incorrect arguments.<br>
<br>
while processing<br>
Message 0 = Invoke<br>
Argument 0 = vtk_object_pointer {vtkGlyph3DRepresentation (0x551b0a0)}<br>
Argument 1 = string_value {SetTexture}<br>
Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}<br>
<br>
<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 391<br>
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.<br>
<br>
############ ABORT #############<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, line 134<br>
vtkSISourceProxy (0x551af30): Error pushing property state: Texture<br>
<br>
global_id: 396<br>
location: 21<br>
[paraview_protobuf.ProxyState.property] {<br>
name: "Texture"<br>
value {<br>
type: INPUT<br>
proxy_global_id: 350<br>
port_number: 0<br>
}<br>
}<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 390<br>
vtkPVSessionCore (0x258c2e0): Object type: vtkOutlineRepresentation, could not find requested method: "SetTexture"<br>
or the method was called with incorrect arguments.<br>
<br>
while processing<br>
Message 0 = Invoke<br>
Argument 0 = vtk_object_pointer {vtkOutlineRepresentation (0x5549800)}<br>
Argument 1 = string_value {SetTexture}<br>
Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}<br>
<br>
<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 391<br>
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.<br>
<br>
############ ABORT #############<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, line 134<br>
vtkSISourceProxy (0x5549690): Error pushing property state: Texture<br>
<br>
global_id: 407<br>
location: 21<br>
[paraview_protobuf.ProxyState.property] {<br>
name: "Texture"<br>
value {<br>
type: INPUT<br>
proxy_global_id: 350<br>
port_number: 0<br>
}<br>
}<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 390<br>
vtkPVSessionCore (0x258c2e0): Object type: vtkGeometryRepresentationWithFaces, could not find requested method: "SetTexture"<br>
or the method was called with incorrect arguments.<br>
<br>
while processing<br>
Message 0 = Invoke<br>
Argument 0 = vtk_object_pointer {vtkGeometryRepresentationWithFaces (0x59a6df0)}<br>
Argument 1 = string_value {SetTexture}<br>
Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}<br>
<br>
<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, line 391<br>
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.<br>
<br>
############ ABORT #############<br>
ERROR: In /opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, line 134<br>
vtkSISourceProxy (0x5afc8e0): Error pushing property state: Texture<br>
<br>
global_id: 440<br>
location: 21<br>
[paraview_protobuf.ProxyState.property] {<br>
name: "Texture"<br>
value {<br>
type: INPUT<br>
proxy_global_id: 350<br>
port_number: 0<br>
}<br>
}<br>
<br>
<br>
-- <br>
Dr. Roman Grothausmann<br>
<br>
Tomographie und Digitale Bildverarbeitung<br>
Tomography and Digital Image Analysis<br>
<br>
Institut für Funktionelle und Angewandte Anatomie, OE 4120<br>
Medizinische Hochschule Hannover<br>
Carl-Neuberg-Str. 1<br>
D-30625 Hannover<br>
<br>
Tel. <a href="tel:%2B49%20511%20532-2900" value="+495115322900" target="_blank">+49 511 532-2900</a><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>