Hello everyone Many thanks for Paraview.
I have a Python script that processes a series of volumetric data files and exports simple binary files of three dimensional data of intermediate stages of computation just for me to check that things are proceeding as intended. The "problem" is that to load a volume I have to do lots of clicks (specify the spacing, the dimensions, the data type, the endianess, etc) and this is getting tiring after a few times so I decided to automate this by writing a script. The script is dead simple and looks roughly like this: from paraview.simple import * Q = OpenDataFile("someFile.raw") Q.SetPropertyWithName("DataScalarType","double") Q.SetPropertyWithName("DataByteOrder","LittleEndian") Q.SetPropertyWithName("DataSpacing",(1,2,2)) Q.SetPropertyWithName("DataExtent",(0,31,0,31,0,31)) Show() #Find the object name, possibly this can be done in a better way proxyID = Q.GetGlobalIDAsString() objectName = filter(lambda x:x[1]==proxyID,GetSources().keys())[0] GetRepresentation(FindSource(objectName[0])).SetPropertyWithName(" Representation","Volume") At that last step, paraview is crashing. Previously, I simply had it as GetRepresentation(something).Representation = "Volume" and it was still crashing. I would appreciate your help with the following: 1) What is the best practice way to change the representation to Volume? 2) To get the representation, I first allow paraview to create the object and then look for it via its ID. Is there a way to retrieve it by name? Looking forward to hearing from you AA
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview