I wrote a program in C++ with VTK and I basically did this: Read volume, create
vtkImageCanvasSource2D, manually access each point and add that value to the
canvas, write the image using vtkPNGWriter.
I was unable to open any XDMF files using C++, so I changed to python. There
are now three problems:
1. The volume, when using the interactor, seems to be way off the origin
causing any roation I do to end in a huge swiping motion of the volume. I have
been unable to find any method to re-center the volume even though when I open
it in the Paraview application it works well and is centered.
2. What I am doing in the script is simply that I read the volume and Slice()
the reader. Then I want to store that slice to a subarea of a canvas that I
store as a PNG image file. I have been unable to find any canvas class, any
other storage class and I have not found a PNGwriter class. The only thing I
have found has been a screenshot writer, something I so not want. I simply want
to slice the volume n times along the Z axis and then save each slice to the
canvas which, in turn, is stored to disk.
3. Finally, this might be me being stupid, but I have been unable to find any
method to create a LUT filter and render those colours. I did try to "lut =
GetLookupTableForArray("Blue to Red Rainbow", 10);" and then add that to the
actors LookupTable as follows: r = Show(volume); r.LookupTable = lut; However,
this has not had any effect on the rendered image.
Below you can see in Paraview what I want in the python script.
http://puu.sh/ruIGf/c54f458415.png
Python I admit I am not too good with, but to add to that I am unable to
autocomplete properly and I am also unable to see things like documentation and
descriptions and open the class specifications using pvpython.exe. This causes
me to only be able to use what I find in the online documentation with minimal
help. Paraview's python interface is not up to the standard of the Paraview
client.
Thank you for your help.
Yours,
Magnus Elden
_______________________________________________
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