[IPython-User] IPython notebok: interactive manipulation of camera coordinates

Moritz Emanuel Beber moritz.beber@gmail....
Thu Jun 27 06:34:37 CDT 2013


On 06/06/2013 07:53 PM, Ondřej Čertík wrote:
> Hi,
>
> I am trying to figure out a way to use the ipython notebook for 3D
> visualization.
> I have compiled VTK 6 with offscreen rendering support + Python
> wrappers and it works excellent, here is a demo notebook:
>
> http://nbviewer.ipython.org/5723420
>
> if you scroll down, you'll see that the main problem now is some more
> interactive way to figure out optimal camera coordinates, which is
> quite hard to do if you can't see immediately how it looks like.
>
>
> The ideal solution would be to have interactive widgets, where I drag
> a slider and it would call my Python function that re-renders the
> scene with new camera coordinates. But my understanding is that this
> is on the plan for around the end of the year.
I believe traits do part of what you want 
(http://scipy-lectures.github.io/advanced/traits/index.html), if they 
integrate well with your setup, I do not know.
>
>
> The next best thing would be to just loop over let's say 10 different
> values of camera coordinates and show 10 images, and I would then pick
> the one I like.
>
> Is there some way to output 10 images as a cell output? I know how to
> output one image per cell using the Image class.
With an inline backend for pylab you can do the following in a cell:
for x in list:
plt.plot(x)
plt.show()
and it will output a number of separate plots. For loading mutiple 
images from files, I don't know, sorry.
>
> Do you have any other tips to improve my workflow? So far for quite
> simple things I prefer the ipython notebook workflow better than
> Paraview or Mayavi, because I can install the notebook easily without
> big hard dependencies like Qt. And I like that I have all the Python
> code there ready to be run & modified. One can also use Mayavi in the
> notebook as well, but so far I installed VTK 6 and Mayavi requires VTK
> < 6 at the moment.
>
> Ondrej
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
Best,
Moritz


More information about the IPython-User mailing list