[Chimera-users] Saving images of all scenes in session?

Tom Goddard goddard at sonic.net
Fri Oct 2 14:45:46 PDT 2015

Saving an image of each scene would be a nice feature.  The scene support in Chimera 1 is limited, not everything gets saved in a scene.  In Chimera 2 scenes will be handled with the same code that saves sessions so they should handle everything that session saving will handle.  And we will add your suggestion to save images for each scene in Chimera 2.  But we won’t have scene support in our initial Chimera 2 release at the end of this year though.


> On Sep 28, 2015, at 7:30 AM, Oliver Clarke <olibclarke at gmail.com> wrote:
> OK, sort of figured out the second part of this - here is a basic extension that will iterate over each scene and take an image at each with the defined parameters - I still think it would be very handy if something similar were to be incorporated into the image saving part of the GUI though:
> from Midas.midas_text import addCommand
> def cmd_scenesnap(scenesnap,args):
>  from Midas.midas_text import doExtensionFunc
>  def scenesnap(rootname):
>    from chimera import runCommand
>    from Animate import Scenes
>    scene_list=Scenes.scenes.dispnames()
>    mkdir_cmd="cd ~; system mkdir chimera_tmp; cd chimera_tmp; system mkdir {0}; cd {0}".format(rootname)
>    runCommand(mkdir_cmd)
>    for scene in scene_list:
>      runCommand("scene {} reset".format(scene))
>      img_name=str(rootname)+"_"+str(scene)
>      runCommand("copy file {} png width 2000 supersample 4".format(img_name))
>  doExtensionFunc(scenesnap,args)
> addCommand("scenesnap", cmd_scenesnap, help=False)
>> On Sep 27, 2015, at 11:01 AM, Oliver Clarke <olibclarke at gmail.com> wrote:
>> Hi all,
>> Apologies for yet another post and thank you for your patience! :-)
>> Feature suggestion (or maybe this exists already?): I would like a way to iterate over all scenes in a session and save an image at each scene, with the same display settings (e.g keep background or make transparent, image format, wall-eye/cross-eye stereo, etc).
>> This would be really very helpful when making, remaking and updating figures. Most of the time, I will have a session, say “Fig1.py”, within which I will have a bunch of scenes corresponding to each panel. It would be really advantageous to be able to take images of each scene all at once, saving each as (for example) Fig1_scene_name.jpg, Fig1_scene_name2.jpg etc. This could work in the same way as saving series of maps or models does now - just have a checkbox in the Save Image dialog for “save images for all scenes in session”, or something similar.
>> It can take quite a while to save each image when on a slow computer, or when using graphics intensive settings such as silhouettes and shadows, so being able to save matched sets of images (e.g. low and hi-res versions, stereo versions, etc) with a couple of clicks would save a lot of time, particularly for example if you realize that the versions you saved the first time were all too low res and you want to go back and save a higher res version of every panel.
>> I realize you guys might not have time to implement this for Chimera 1, as development of Chimera 2 is top priority, so maybe I can write a script to do this in the meantime? Is there any way to return a list of scene names using one of the built in python functions? I guess something in Animate.Scenes ought to do this, but not being much of a python programmer I can’t quite figure it out - any tips much appreciated.
>> Cheers,
>> Oli.
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

More information about the Chimera-users mailing list