pyqtgraph/documentation/build/html/graphicsItems/roi.html
2012-03-01 21:55:32 -05:00

185 lines
8.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ROI &mdash; pyqtgraph v1.8 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '1.8',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="pyqtgraph v1.8 documentation" href="../index.html" />
<link rel="up" title="Pyqtgraphs Graphics Items" href="index.html" />
<link rel="next" title="GraphicsLayout" href="graphicslayout.html" />
<link rel="prev" title="InfiniteLine" href="infiniteline.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="graphicslayout.html" title="GraphicsLayout"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="infiniteline.html" title="InfiniteLine"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">pyqtgraph v1.8 documentation</a> &raquo;</li>
<li><a href="../apireference.html" >API Reference</a> &raquo;</li>
<li><a href="index.html" accesskey="U">Pyqtgraph&#8217;s Graphics Items</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="roi">
<h1>ROI<a class="headerlink" href="#roi" title="Permalink to this headline"></a></h1>
<dl class="class">
<dt id="pyqtgraph.ROI">
<em class="property">class </em><tt class="descclassname">pyqtgraph.</tt><tt class="descname">ROI</tt><big>(</big><em>pos</em>, <em>size=Point(1.000000</em>, <em>1.000000)</em>, <em>angle=0.0</em>, <em>invertible=False</em>, <em>maxBounds=None</em>, <em>snapSize=1.0</em>, <em>scaleSnap=False</em>, <em>translateSnap=False</em>, <em>rotateSnap=False</em>, <em>parent=None</em>, <em>pen=None</em>, <em>movable=True</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI" title="Permalink to this definition"></a></dt>
<dd><p>Generic region-of-interest widget.
Can be used for implementing many types of selection box with rotate/translate/scale handles.</p>
<dl class="method">
<dt id="pyqtgraph.ROI.__init__">
<tt class="descname">__init__</tt><big>(</big><em>pos</em>, <em>size=Point(1.000000</em>, <em>1.000000)</em>, <em>angle=0.0</em>, <em>invertible=False</em>, <em>maxBounds=None</em>, <em>snapSize=1.0</em>, <em>scaleSnap=False</em>, <em>translateSnap=False</em>, <em>rotateSnap=False</em>, <em>parent=None</em>, <em>pen=None</em>, <em>movable=True</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.getArrayRegion">
<tt class="descname">getArrayRegion</tt><big>(</big><em>data</em>, <em>img</em>, <em>axes=(0</em>, <em>1)</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.getArrayRegion" title="Permalink to this definition"></a></dt>
<dd><p>Use the position of this ROI relative to an imageItem to pull a slice from an array.</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.getArraySlice">
<tt class="descname">getArraySlice</tt><big>(</big><em>data</em>, <em>img</em>, <em>axes=(0</em>, <em>1)</em>, <em>returnSlice=True</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.getArraySlice" title="Permalink to this definition"></a></dt>
<dd><p>Return a tuple of slice objects that can be used to slice the region from data covered by this ROI.
Also returns the transform which maps the ROI into data coordinates.</p>
<p>If returnSlice is set to False, the function returns a pair of tuples with the values that would have
been used to generate the slice objects. ((ax0Start, ax0Stop), (ax1Start, ax1Stop))</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.getGlobalTransform">
<tt class="descname">getGlobalTransform</tt><big>(</big><em>relativeTo=None</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.getGlobalTransform" title="Permalink to this definition"></a></dt>
<dd><p>Return global transformation (rotation angle+translation) required to move from relative state to current state. If relative state isn&#8217;t specified,
then we use the state of the ROI when mouse is pressed.</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.getLocalHandlePositions">
<tt class="descname">getLocalHandlePositions</tt><big>(</big><em>index=None</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.getLocalHandlePositions" title="Permalink to this definition"></a></dt>
<dd><p>Returns the position of a handle in ROI coordinates</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.handleChange">
<tt class="descname">handleChange</tt><big>(</big><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.handleChange" title="Permalink to this definition"></a></dt>
<dd><p>The state of the ROI has changed; redraw if needed.</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.saveState">
<tt class="descname">saveState</tt><big>(</big><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.saveState" title="Permalink to this definition"></a></dt>
<dd><p>Return the state of the widget in a format suitable for storing to disk.</p>
</dd></dl>
<dl class="method">
<dt id="pyqtgraph.ROI.translate">
<tt class="descname">translate</tt><big>(</big><em>*args</em>, <em>**kargs</em><big>)</big><a class="headerlink" href="#pyqtgraph.ROI.translate" title="Permalink to this definition"></a></dt>
<dd><p>accepts either (x, y, snap) or ([x,y], snap) as arguments</p>
<dl class="docutils">
<dt>snap can be:</dt>
<dd>None (default): use self.translateSnap and self.snapSize to determine whether/how to snap
False: do no snap
Point(w,h) snap to rectangular grid with spacing (w,h)
True: snap using self.snapSize (and ignoring self.translateSnap)</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="infiniteline.html"
title="previous chapter">InfiniteLine</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="graphicslayout.html"
title="next chapter">GraphicsLayout</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/graphicsItems/roi.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="graphicslayout.html" title="GraphicsLayout"
>next</a> |</li>
<li class="right" >
<a href="infiniteline.html" title="InfiniteLine"
>previous</a> |</li>
<li><a href="../index.html">pyqtgraph v1.8 documentation</a> &raquo;</li>
<li><a href="../apireference.html" >API Reference</a> &raquo;</li>
<li><a href="index.html" >Pyqtgraph&#8217;s Graphics Items</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011, Luke Campagnola.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
</div>
</body>
</html>