[Paraview] pvpython: assigning a 2D texture image to an object that has TCords

Grothausmann, Roman Dr. grothausmann.roman at mh-hannover.de
Mon Dec 7 11:50:49 EST 2015


Dear mailing list members,


Is it possible to assign a 2D texture image to an object that has TCords in python?
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:
http://www.paraview.org/pipermail/paraview/2012-March/024255.html
http://www.paraview.org/Bug/view.php?id=12953

I've tried:

     import paraview.simple as pvs


     reader = pvs.OpenDataFile("test.png)
     #reader.UpdatePipelineInformation()
     reader.UpdatePipeline()
     print reader.GetDataInformation().GetBounds() # needs UpdatePipeline

     obj = pvs.Plane()
     plane1Display = pvs.Show(obj)
     plane1Display.Texture = reader

     dp = pvs.GetDisplayProperties(obj)
     dp.Representation = 'Surface With Edges'

     dp.Texture = reader


but neither plane1Display.Texture nor dp.Texture seem to allow to set the 
texture (see error below)

Any help or hints are very much appreciated
Roman


RROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 390
vtkPVSessionCore (0x258c2e0): Object type: vtkGlyph3DRepresentation, could not 
find requested method: "SetTexture"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
   Argument 0 = vtk_object_pointer {vtkGlyph3DRepresentation (0x551b0a0)}
   Argument 1 = string_value {SetTexture}
   Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}


ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 391
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.

############ ABORT #############
ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, 
line 134
vtkSISourceProxy (0x551af30): Error pushing property state: Texture

global_id: 396
location: 21
[paraview_protobuf.ProxyState.property] {
   name: "Texture"
   value {
     type: INPUT
     proxy_global_id: 350
     port_number: 0
   }
}
ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 390
vtkPVSessionCore (0x258c2e0): Object type: vtkOutlineRepresentation, could not 
find requested method: "SetTexture"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
   Argument 0 = vtk_object_pointer {vtkOutlineRepresentation (0x5549800)}
   Argument 1 = string_value {SetTexture}
   Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}


ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 391
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.

############ ABORT #############
ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, 
line 134
vtkSISourceProxy (0x5549690): Error pushing property state: Texture

global_id: 407
location: 21
[paraview_protobuf.ProxyState.property] {
   name: "Texture"
   value {
     type: INPUT
     proxy_global_id: 350
     port_number: 0
   }
}
ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 390
vtkPVSessionCore (0x258c2e0): Object type: vtkGeometryRepresentationWithFaces, 
could not find requested method: "SetTexture"
or the method was called with incorrect arguments.

while processing
Message 0 = Invoke
   Argument 0 = vtk_object_pointer {vtkGeometryRepresentationWithFaces (0x59a6df0)}
   Argument 1 = string_value {SetTexture}
   Argument 2 = vtk_object_pointer {vtkImageFileSeriesReader (0x4f68190)}


ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkPVSessionCore.cxx, 
line 391
vtkPVSessionCore (0x258c2e0): Aborting execution for debugging purposes.

############ ABORT #############
ERROR: In 
/opt/compilation/paraview-git/ParaViewCore/ServerImplementation/Core/vtkSIProxy.cxx, 
line 134
vtkSISourceProxy (0x5afc8e0): Error pushing property state: Texture

global_id: 440
location: 21
[paraview_protobuf.ProxyState.property] {
   name: "Texture"
   value {
     type: INPUT
     proxy_global_id: 350
     port_number: 0
   }
}


-- 
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-2900


More information about the ParaView mailing list