acardona/CATMAID — pull request #538 by tomka (2013-06-13 12:12:22+00:00)
Title: ROIs for the classification editor

The commits on this branch allows users to add regions of interests (ROIs) to a classification graph (and instantiation of an ontology). ROIs can be linked to particular class instances by clicking "Add region of interest" in its context menu. The RoiTool will be opened which allows the user to specify the ROIs position and extent as well as the stack it is positioned in.

If a class instance has a linked ROI a little camera icon is shown next to it. Hovering on this icon will bring up the ROI in a floating container. (see screenshot below) Celery and the cropping module is used to create those images. The display of those hover images can of course be disabled.

To store the ROIs, two new models are created: `RegionOfInterest` and `RegionOfInterestClassInstance`. The first one inherits `location` and the second one `relation_instance`, similar to what is done with the `treenode` relation/model. I didn't find anything matching for my case among the existing models.

![classification-editor-rois](https://f.cloud.github.com/assets/112226/648067/47eb90e2-d41e-11e2-8e0e-f90e9b73c161.png)