[Paraview] incorrect python tutorial: http://www.paraview.org/Wiki/ParaView/Python/Screenshot ?

Anton Shterenlikht mexas at bristol.ac.uk
Mon Mar 18 07:29:48 EDT 2013


I tried to reproduce this tutorial with pvpython
(paraview 3.10), only I have a *raw file:

$ pvpython
Python 2.7.3 (default, Jan 15 2013, 08:46:05) 
[GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> from paraview.simple import *
paraview version 3.10.1, Date: 2011-01-28
>>> import time
>>> reader=ImageReader(FilePrefix="z.raw")
>>> reader.DataByteOrder=1
>>> reader.DataExtent=[1,40,1,40,1,40]
>>> reader.DataScalarType=6
>>> view = GetActiveView()
>>> view.CameraViewUp = [0, 0, 1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'CameraViewUp'
>>> view.CameraFocalPoint = [0, 0, 0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'CameraFocalPoint'
>>> view.CameraViewAngle = 45
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'CameraViewAngle'
>>> view.CameraPosition = [5,0,0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'CameraPosition'
>>>  
... 

Please advise

Thanks

Anton




More information about the ParaView mailing list