.. py:module:: scene The class Scene =============== The class :py:class:`Scene` is a container of items that can be `RImage`, `Surface` or `Volume`. `name`. .. py:class:: Scene() A container of objects (`RImage`, `Surface` or `Volume`) used within the interface of image_viewer. .. rubric:: Instance attribute .. py:attribute:: current_item Current item, the one being visualized or/and operated with. .. rubric:: Instance methods: .. py:method:: add_item(name) Adds an item to the scene. If the scene already has an item with that name, it modifies the name of the item adding to it the suffx _n where n is the number of items of the scene with the same name minus 1. .. py:method:: number_items(item_cat) Returns the number of items of the given category `item_cat` in the scene. .. py:method:: iter_cat() Returns an iterator over the classes of the items of the scene This class supports the following operations: +--------------------------+----------------------------------------------------+ | Operatiom | Result | +==========================+====================================================+ | ``s[name]`` | Returns the item of the scene `s` that has the | | | name `name`. | +--------------------------+----------------------------------------------------+ | ``name in s`` | Returns True if the scene has an item with name | | | `name`. | +--------------------------+----------------------------------------------------+ The class is iterable over items. The implementation of the class is given together other files in a zip file as described in :ref:`image_viewer`.