glue-viz / glue

Linked Data Visualizations Across Multiple Files
http://glueviz.org
Other
736 stars 153 forks source link

transforms for ROIs #129

Open ChrisBeaumont opened 12 years ago

ChrisBeaumont commented 12 years ago

Users draw ROIs as simple shapes like circles. However, these are drawn on distorted plots (e.g. spherically projected, log-log, etc) such that the ROIs are not simple shapes in data space.

Our current solution is to coerce all ROIs into polygon approximations with many points in data space (using the MPL transform objects to do this translation). This is both inexact and inefficient (testing for inclusion in a 40-point polygon is more expensive than the simple point-in-circle test, for example).

A better option would be to save the data->device transformation objects in the ROIs and specify the ROI in the coordinate system where it is simple. The transform object would be used to transform all subsequent inputs to roi.contains()

ChrisBeaumont commented 10 years ago

@astrofrog mentioned this again in #444

astrofrog commented 8 years ago

I've marked this as non-gui because once the ROI has been drawn in Qt (which works), the ROI is just a Python object and all subsequent transformations/applications of the ROIs is done outside of the GUI code.