;iddlmZmZmZeedZddlZddlZddlZddl Z ddl mZm Z ddl m Zddl mZdd lmZd gZdd ZGd d eZGd deZdS))QtCoreQtGui QtWidgets QOpenGLWidgetN)Qtdebug) functions)getConfigOption)GraphicsObject PlotCurveItemc|*tjtjd}t |dkr|d|Sd}t|tj r%tj |ddtd}}d}|s|dkr=tj |tj |z}tj |}|d kr|s||}||}nK|dkr|rd }n@|dd|d dz}n*|d vr&|s$tj|}||}||}|d krt |d z } || | rX| } |dd| dddf<|d d| dddf<|dd| ddd f<|d d| ddd f<n6|d kr{t |dz} || | rQ| } | d} |d| dz| dddf<|d| dz| ddd f<n|tj|} || | rp| } |dd|| dddf<|d d|| dddf<|dd|| ddd f<|d d|| ddd f<nd} || |S)NrrdtypearrayTfiniteallr )pairsrr)rr)r internalsPrimitiveArrayrQLineFlenresize isinstancenpndarrayasarrayboolisfiniterfn_compute_backfill_indicesreshape count_nonzero) xyconnect finiteCheckout connect_array all_finitemask backfill_idxnsegsmemorys YC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\pyqtgraph/graphicsItems/PlotCurveItem.pyarrayToLineSegmentsr4sZ {l))&-;; 1vvzz 1  M'2:&&O!#GCRCL!E!E!Eww J"g)){1~~ A.VD\\ % $A$A H    1GG!"IQRR0MM & & & 7==L,A,A%A  5  ![[]]FSbS6F111a4LQRR5F111a4LSbS6F111a4LQRR5F111a4L G  A!  5  )[[]]F^^G,,FZeaiZ=F111a4LZeaiZ=F111a4L  " // 5  0[[]]FSbS6-0F111a4LQRR5/F111a4LSbS6-0F111a4LQRR5/F111a4L 5 JcJeZdZdZejeZejeeZdZ d%dZ dZ d%dZ dZ dZd&d Zd Zd Zd ZdZdZdZdZdZdZdZdZedZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%e&j'd Z(d!Z)d"Z*d#Z+d$Z,dS)'rab Class representing a single plot curve. Instances of this class are created automatically as part of :class:`PlotDataItem `; these rarely need to be instantiated directly. Features: - Fast data update - Fill under curve - Mouse interaction ===================== =============================================== **Signals:** sigPlotChanged(self) Emitted when the data being plotted has changed sigClicked(self, ev) Emitted when the curve is clicked ===================== =============================================== ctj||dd|i|_ddddddt dddddt dd |_d |vrtjd |jd <| |d d|j |i|dS) a Forwards all arguments to :func:`setData `. Some extra arguments are accepted as well: ============== ======================================================= **Arguments:** parent The parent GraphicsObject (optional) clickable If `True`, the item will emit ``sigClicked`` when it is clicked on. Defaults to `False`. ============== ======================================================= parentNF antialiasrsegmentedLineMode) shadowPen fillLevel fillOutlinebrushstepModenamer9r* mouseWidthcompositionModeskipFiniteCheckr;penw clickable) r __init__getclearmetaDatar optsr$mkPen setClickablesetDataselfargskargss r3rHzPlotCurveItem.__init__us eii$&?&?@@@   (55#$!01D!E!E       !x}}DIe  %))K77888 d$e$$$$$r5Ncdg}||S||vS)NplotData)rQ interfaceintss r3 implementszPlotCurveItem.implementss|  KD  r5c8|jddS)NrA)rLrIrQs r3rAzPlotCurveItem.namesy}}VT***r5cL||_|||jd<d|_d|_dSdS)zSets whether the item responds to mouse clicks. The `width` argument specifies the width in pixels orthogonal to the curve that will respond to a mouse click. NrB)rGrL _mouseShape _boundingRect)rQswidths r3rNzPlotCurveItem.setClickables;   &+DIl ##D !%D     r5cB||jd<|dS)as Change the composition mode of the item. This is useful when overlaying multiple items. Parameters ---------- mode : ``QtGui.QPainter.CompositionMode`` Composition of the item, often used when overlaying items. Common options include: ``QPainter.CompositionMode.CompositionMode_SourceOver`` (Default) Image replaces the background if it is opaque. Otherwise, it uses the alpha channel to blend the image with the background. ``QPainter.CompositionMode.CompositionMode_Overlay`` Image color is mixed with the background color to reflect the lightness or darkness of the background ``QPainter.CompositionMode.CompositionMode_Plus`` Both the alpha and color of the image and background pixels are added together. ``QPainter.CompositionMode.CompositionMode_Plus`` The output is the image color multiplied by the background. See ``QPainter::CompositionMode`` in the Qt Documentation for more options and details rCN)rLupdaterQmodes r3setCompositionModez PlotCurveItem.setCompositionModes"8(, #$ r5c|j|jfSN)xDatayDatar[s r3getDatazPlotCurveItem.getDatasz4:%%r5?cD|j|}||d||fkr|dS|\}}|t|dkrdS|dkr|}|}n|dkr|}|}ntd|J||dk||dkz} |jdddkr | dd} || }t|dkrdS|dkr)t j5t jd ttj |ttj |f} dddn #1swxYwYtj| dstj| drstj|} || }t|dkrdSt|t|f} ny|d krt%d t'|ztj|} || }t|dkrdStj|d d|z zd d|zzg} |dkrk|jd dvr\tt!| d|jd tt#| d|jd f} |jd} |jd} | | sl| t.jjjkr@| d| dzz | d| dzzf} | | sl| t.jjjkr@| d| dzz | d| dzzf} ||f| g|j|<| S)Nrr )NNzInvalid axis valuer@centerrrkignorez0Value for parameter 'frac' must be > 0. (got %s)2r=)NenclosedrEr<ea?) _boundsCacherjr ValueErrorrLrIwarningscatch_warnings simplefilterfloatrnanminnanmaxmathisinfr#minmax Exceptionstr percentile isCosmeticstylerrPenStyleNoPenwidthF) rQaxfrac orthoRangecacher(r)dd2r/brEspens r3 dataBoundszPlotCurveItem.dataBoundss!"%  qdJ-?!?!?8OA 9A! < 77ABB 1WWABB122 2  !*Q-'B*Q-,?@Dy}}Z..(::CRCy$A q66Q;;< 3;;(** A A%h///BIaLL))51+>+>@ A A A A A A A A A A A A A A Az!A$ 74:ad#3#3 7{1~~dGq66Q;;'<AEEGGnneAEEGGnn6 S[[NQTUYQZQZZ[[ [;q>>D$A1vv{{#| a"D/2T?!CDDA 77ty-5GGGs1Q4;!788::s1Q4;!788::A iy% ?3>>#3#3? vyGYG_8_8_1 V++QqTCJJLL4G-GHA  DOO$5$5 $**,,&)J\Jb:b:b1 f,,adT[[]]65I.IJA"& !3Q 7"s4AEEEc|jd}|jd}d}|Z|rF|tjjjkr||dzz }|e|rQ|tjjjkr%t||dz}|j r!t||jddzdz}|S)NrEr<rrrrBrr ) rLrrrrrrrr~rG)rQrErrFs r3 pixelPaddingzPlotCurveItem.pixelPaddingsiy%  O 0 0OSYY[[FIDVD\5\5\ f$ $A   1 1 djjllfiFXF^6^6^At{{}}V+,,A > 7Aty.1A566Ar5cv|j+|d\}}||tjS|d\}}||tjSdx}}|}|dkry|\}} |dn|}n#t$rd}YnwxYw |dn|}n#t$rd}YnwxYw||z}||z}tj||z ||z d|z|z|z d|z|z|z |_|jS)Nr)rr ror)r^rrQRectFr pixelVectorslength OverflowError)rQxmnxmxymnymxpxpypxPads r3 boundingRectzPlotCurveItem.boundingRect)sw   %A..JS#{ck}&A..JS#{ck}&MB%%''Eqyy**,,B jbiikkBB$BBB jbiikkBB$BBBe e "(s2vs2v"cz#~PQRTPTVYzZ]~!^!^D !!s$B88 CC C$$ C32C3cV||dSrg)invalidateBoundsprepareGeometryChanger[s r3viewTransformChangedz"PlotCurveItem.viewTransformChangedIs,  ""$$$$$r5c&d|_ddg|_dSrg)r^rsr[s r3rzPlotCurveItem.invalidateBoundsps!!4Lr5c|r|d d|jd<ntj|i||jd<||dS)z#Set the pen used to draw the curve.rNrErLr$rMrrbrPs r3setPenzPlotCurveItem.setPents_  8DGO#DIe  !x777DIe   r5c|r|d d|jd<ntj|i||jd<||dS)z Set the shadow pen used to draw behind the primary pen. This pen must have a larger width than the primary pen to be visible. Arguments are passed to :func:`mkPen ` rNr<rrPs r3 setShadowPenzPlotCurveItem.setShadowPen}sa  >DGO%)DIk " "%'Xt%=u%=%=DIk "  r5c|r|d d|jd<ntj|i||jd<||dS)z Sets the brush used when filling the area under the curve. All arguments are passed to :func:`mkBrush `. rNr?)rLr$mkBrushrrbrPs r3setBrushzPlotCurveItem.setBrushsa  ` is allowed. shadowPen Pen for drawing behind the primary pen. Usually this is used to emphasize the curve by providing a high-contrast border. Any single argument accepted by :func:`mkPen ` is allowed. fillLevel (float or None) Fill the area under the curve to the specified value. fillOutline (bool) If True, an outline surrounding the `fillLevel` area is drawn. brush Brush to use when filling. Any single argument accepted by :func:`mkBrush ` is allowed. antialias (bool) Whether to use antialiasing when drawing. This is disabled by default because it decreases performance. stepMode (str or None) If 'center', a step is drawn using the `x` values as boundaries and the given `y` values are associated to the mid-points between the boundaries of each step. This is commonly used when drawing histograms. Note that in this case, ``len(x) == len(y) + 1`` If 'left' or 'right', the step is drawn assuming that the `y` value is associated to the left or right boundary, respectively. In this case ``len(x) == len(y)`` If not passed or an empty string or `None` is passed, the step mode is not enabled. connect Argument specifying how vertexes should be connected by line segments. | 'all' (default) indicates full connection. | 'pairs' draws one separate line segment for each two points given. | 'finite' omits segments attached to `NaN` or `Inf` values. | For any other connectivity, specify an array of boolean values. compositionMode See :func:`setCompositionMode `. skipFiniteCheck (bool, defaults to `False`) Optimization flag that can speed up plotting by not checking and compensating for `NaN` values. If set to `True`, and `NaN` values exist, the data may not be displayed or the plot may take a significant performance hit. =============== ================================================================= If non-keyword arguments are used, they will be interpreted as ``setData(y)`` for a single argument and ``setData(x, y)`` for two arguments. **Notes on performance:** Line widths greater than 1 pixel affect the performance as discussed in the documentation of :class:`PlotDataItem `. N) updateDatarPs r3rOzPlotCurveItem.setDatas"n ''''''r5ctj}d|vr||dt|dkr |d|d<n)t|dkr|d|d<|d|d<d|vs|dt jg|d<d|vs|d*t jt|d|d<dD]}||}t|trt j|}|||<t|tj r |j dkrtd|j j d krtd |d |dtj |_|dtj |_||||d d |vr|d |jd <|jd dvr|jd durt+jdt.dt|jt|jdzkr*td|jjd|jjdnD|jj|jjkr*td|jjd|jjdd|_d|_d|_d|_d|_d|vr|d|jd<d|vr|d|jd<d|vr||dd|vr||dd|vr| |dd|vr|d|jd<d|vr|!|dd |vr|d |jd <d!|vr|d!|jd!<|d"|"|d#|j#$||d$dS)%NrCr rr)rr()r(r)zPlot data must be 1D ndarray.cz Can not plot complex data types.z data checkscopyr@rmTTzjstepMode=True is deprecated and will result in an error after October 2022. Use stepMode="center" instead.r) stacklevelz1len(X) must be len(Y)+1 since stepMode=True (got z and )z+X and Y arrays must be the same shape--got .FrAr*rEr<r=r>r?r9rDsetrbemit)%r Profilerrerrrarangerlistr ndimrrkindviewrirhrrinformViewBoundsChangedrLruwarnDeprecationWarningshapepathrrr]_lineSegmentsRenderedrrrrrbsigPlotChangedr)rQrRrSprofilerkdatas r3rzPlotCurveItem.updateDatas>##  % %  # #E*;$< = = = t99>>aE#JJ YY!^^aE#JaE#J e  uSz1"E#J e  uSz13uSz??33E#J D DA8D$%% x~~adBJ// A49q== ?@@@z#%% BCCC& 3Z__RZ00 3Z__RZ00   ""$$$ $$&&&   $)*$5DIj ! 9Z $4 4 4y$,, A&14:#dj//!"333iaeakaqaqaqsws}tDtDtD!EFFF4z4:#333i[_[e[k[k[kmqmwm}m}m} ~  !%*" U?? %f DIf    #(#3DIi E>> KKe % % % %     eK0 1 1 1 %     eK0 1 1 1 E ! !',]';DIm $ e   MM%. ) ) ) %  %*;%7DIk "  % %+01B+CDI' (    &&&r5cH|dkrTtjt|dzdf|j}|ddtjf|dd<|d|d<n|dkrTtjt|dzdf|j}|ddtjf|dd<|d|d<n\|d vrFtjt|df|j}|ddtjf|dd<nt d |z|||jdd}tjt|df|j}|ddtjf|dd<||j}n||j}tjt|dzdf|j}|ddtjf|dd<||jdd}||ddg<||fS) Nrightr rrrleftrrzUnsupported stepMode %s)remptyrrnewaxisrtr&size)r@r(r)baselinex2y2s r3_generateStepModeDataz#PlotCurveItem._generateStepModeData8s w  3q66A:q/999B2: &BssGVBrFF   3q66A:q/999Bqqq"*}%BqrrFqEBqEE ) ) )3q66!*AG444Baaam$BqqqEE6ABB B   27##AbD)A3q66!*AG444Baaa lOBqqqE 27##AA 27##A3q66!8A,ag666B2:BqtH 27##AbD)A!Aq"gJ!t r5c|jdr2||jd|||jd\}}tj|||jd|jd S)Nr@r=rr*rD)r*r+)rLrr$ arrayToQPathrQr(r)s r3 generatePathzPlotCurveItem.generatePathVs 9Z  -- *%;/ .DAq Ii( I&788     r5c>|j|\}}|(t|dks|t|dkrtj|_n!|j||_d|_d|_d|_|jS)Nr) rrjrr QPainterPathrrrr]rs r3getPathzPlotCurveItem.getPathfs 9 ,,..CAayCFFaKK19A! !.00 -D-t||~~>  DM!%D #D yr5c|dvrtd|d||jd<||dS)a Sets the mode that decides whether or not lines are drawn as segmented lines. Drawing lines as segmented lines is more performant than the standard drawing method with continuous lines. Parameters ---------- mode : str ``'auto'`` (default) segmented lines are drawn if the pen's width > 1, pen style is a solid line, the pen color is opaque and anti-aliasing is not enabled. ``'on'`` lines are always drawn as segmented lines ``'off'`` lines are never drawn as segmented lines, i.e. the drawing method with continuous lines is used )autoonoffz5segmentedLineMode must be "auto", "on" or "off", got z insteadr;N)rtrLrrbrcs r3setSegmentedLineModez"PlotCurveItem.setSegmentedLineModess[" , , ,cUYcccdd d)- %&  r5cT|jd}|dvrdS|dvrdS|dkow|tjjjkoK|o7| dko |jd S)Nr;)rT)rFrkr9) rLrrrrr SolidLineisSolidcoloralphaF)rQrErds r3_shouldUseDrawLineSegmentsz(PlotCurveItem._shouldUseDrawLineSegmentssy,- 7??4 8  5 JJLL3  + vy1;; +  + ""$$+ +Ik** r5cf|js|\}}|jdr2||jd|||jd\}}t |||jd|jd |j|_d|_|jS)Nr@r=rr*rD)r*r+r,T)rrjrLrr4 _lineSegmentsdrawargsrs r3_getLineSegmentszPlotCurveItem._getLineSegmentss) .<<>>DAqy$ 11Ij)!Y{3 21"5 ), $ *; <<& """D *.D &!**,,,r5cg}|jddkr|S|jd}|\}}|ddg\}}|ddg\}}||kr*|tj|||||tj||||||kr*|tj|||||SNr=rqrr)rLrjappendrr) rQsegmentsrr(r)lxrxlyrys r3_getClosingSegmentsz!PlotCurveItem._getClosingSegmentss 9[ !Z / /O9[)||~~1Ar7BAr7B >> OOFM"b"h?? @ @ @ b(BAABBB >> OOFM"hB?? @ @ @r5c|j|jStj|}||_|jddkr|S|jd}|\}}|ddg\}}|ddg\}}||kr||||||||kr||||Sr)rrrrrLrjlineTo) rQrrr(r)rrrrs r3 _getFillPathzPlotCurveItem._getFillPaths = $= !$,,..11 9[ !Z / /K9[)||~~1Ar7BAr7B >> KKH % % % B!!! >> KKB    r5c|jd}t|to,|dko&t|jdttfS)Nr*rr=)rLrrintrx)rQr*s r3_shouldUseFillPathListz$PlotCurveItem._shouldUseFillPathListsM)I& w $ $ AE)9 A49[1C<@@  r5c|j|jS|\}}|jdr'||jd||d\}}|jdsMt j|t j|z}|s||}||}t|dkrgSt|tj sdnd}gx}|_d}t j |dzdf}|jd } |t|d z kr||||z} ||||z} t| } |d| dz} | | dd df<| | dd d f<| gd | d ddf<| | | dg| d dd f<|| d z z }tj | dddf| ddd fd }|||t|d z k|S)Nr@rrDrrpirrr=r )rrrF)r+)rrjrLrrr#rrrrrrr$_arrayToQPath_allr)rQwidgetr(r)r/ chunksizepathsoffsetxybufrsubxsubyrxyviewrs r3_getFillPathListzPlotCurveItem._getFillPathLists;   )% %||~~1 9Z  -- *% .DAqy*+ ;q>>BKNN2D88:: dGdG q66A::I)1HIISBBt %''")A+q)**9[)s1vvz!!VFY../DVFY../Dt99D7DF7^F!F3B36N!F3B36N!***-F2336N&$q':F2336N dQh F'qqq!t fQQQTlPUVVVD LL   s1vvz!! r5ctj}|jt|jdkrdSt dr:t r3t |tjr| |||dS|j dur|j dd}n |j d}| |jj||j d}||||j dduo|j ddu}|o |j d }|r{|r||} n|g} |d | D]#} || |j d$|d |j d Lt |j d t*jr|j d } nt/j|j d } | t4jjjkr|| || rF|j |!|r'| |"nQ|r(|#|n'|#|$|j d } t | t*jst/j| } || || rF|j |!|r'| |"nQ|r(|#|n'|#|$|ddS)NrenableExperimentalFr9TrCr?r=r>zgenerate fill pathzdraw fill pathr<rEdrawPath)%r rrhrr HAVE_OPENGLrrrpaintGL _exportOptsrIrL setRenderHint RenderHint Antialiasingrerr rrrQPenr$rMrrrrrrr drawLinesrrr r) rQpoptrraacmodedo_filldo_fill_outlinerrspcps r3paintzPlotCurveItem.paints>## : TZA!5!5 F / 0 0  z&)2IJJ  QV,,,  5 ( (!%%k488BB;'B  12666 +,    ' ' ')G$D0WTY{5KSW5W!>di &>  '**,, .--f55**,,- H) * * * 5 5 47!34444 H% & & & 9== % % 1$)-- 44ejAA 6Y{+Xdi 455xxzzVY/555 222663AK!6!6!8!899&@ D$<$<$>$>???&3 4#4#4#6#67777 4<<>>222 Yu "ej)) "B   * *2 . . + AK..00 1 1 8 D4466777 + 4,,..//// 4<<>>***r5c^|ddlm}tjdkr||j||d| | ddd||j tj |}|t!j|t j|}|x|||}||j||j|j|j|j||j||jdd||j|j |j |!d|"|j#|$|j%|&|'|(|&|'| z|(|&|'|(| z|&|'| z|(| z|&|'| z|(|&|'|(| z|)||j*|j*|j*|j*||j*|!d||j+dd |,\}} t!j-t]|dft j} || dddf<| | dddf<|/|j0 |1| tej3|j4d } |j5| 67| } | 8r| dkrd} |9| |:| |j;d ur|j;<d d } n |j4d } | ru||j=||j>|?|j@|jA|B|jC|jDn|E|j=|F|jGd| jHd|I|j0n#|I|j0wxYw |JdS#|JwxYw) Nrwin32ii?Brr rrEFr9T)KbeginNativePainting OpenGL.GLGLsysplatform glMatrixMode GL_PROJECTIONglLoadIdentityglOrthor`height GL_MODELVIEWr QMatrix4x4sceneTransform glLoadMatrixfrrrfloat32 getViewBox mapRectToItemrglEnableGL_STENCIL_TEST glColorMaskGL_FALSE glDepthMask glStencilFuncGL_NEVER glStencilOp GL_REPLACEGL_KEEP glStencilMaskglClearGL_STENCIL_BUFFER_BITglBegin GL_TRIANGLES glVertex2fr(r)glEndGL_TRUEGL_EQUALrjrrglEnableClientStateGL_VERTEX_ARRAYglVertexPointerfr$rMrL glColor4frgetRgbFr glPointSize glLineWidthrrIGL_LINE_SMOOTHGL_BLEND glBlendFunc GL_SRC_ALPHAGL_ONE_MINUS_SRC_ALPHAglHintGL_LINE_SMOOTH_HINT GL_NICEST glDisable glDrawArrays GL_LINE_STRIPrglDisableClientStateendNativePainting)rQrrrglmatrrectr(r)posrEr`rs r3rzPlotCurveItem.paintGLes  <7 " " OOB, - - -       JJq&,,..&--//1gv N N N OOBO , , ,"4#6#6#8#899C   RXchhjj CCC D D D    %%dD,=,=,?,?@@D KK* + + + NN2; R["+ N N N NN2; ' ' '   R[!T 2 2 2 NN2="*bj A A A   T " " " JJr/ 0 0 0 JJr ' ' ' MM$&&((DFFHH - - - MM$&&((4::<</ : : : MM$&&((DFFHHT[[]]$: ; ; ; MM$&&((4::<</$++--1G H H H MM$&&((4::<</ : : : MM$&&((DFFHHT[[]]$: ; ; ; HHJJJ NN2:rz2:rz J J J NN2: & & &   T " " "   R[!T 2 2 2! "<<>>DAq(CFFA;bj999CC!HC!H  " "2#5 6 6 6 <##C(((hty/00 ciikk113344 >>## Eu%%%u%%%#500)--k4@@BB;/B4KK 1222KK ,,,NN2?B4MNNNIIb4blCCCCLL!2333 0!SYq\BBB''(:;;;;''(:;;;;;   ! ! ! ! !A   ! ! ! !s&,A2\F&[ \ [<<\\,cd|_d|_d|_d|_d|_d|_d|_d|_d|_ddg|_ dS)NF) rhrirrrrrr] _mouseBoundsrsr[s r3rJzPlotCurveItem.clearsX  !%*"  ! !4Lr5c|j|}|tjStj}|}|||}||jd| |}| |||_|jS)zV Return a QPainterPath representing the clickable shape of the curve NrB) r]r1rrQPainterPathStrokerr mapToItemsetWidthrL createStroke mapFromItem)rQrstrokerr mousePaths r3 mouseShapezPlotCurveItem.mouseShapes   #??$$D|)+++/11G<<>>D>>$--D   TY|4 5 5 5,,T22I#//i@@D r5cD|jr,|tjjjkrdS||r1| |j ||dSdSrg) rGbuttonrr MouseButton LeftButtonrhcontainsr]accept sigClickedr)rQevs r3mouseClickEventzPlotCurveItem.mouseClickEvents~  0E0P!P!P F ??   % %bffhh / / + IIKKK O r * * * * * + +r5rg)rkN)-__name__ __module__ __qualname____doc__rSignalobjectrrorHrYrArNrerjrrrrrrrrrrrOr staticmethodrrrrrrrrrr r warnOnExceptionrrrJrhrqrVr5r3rr_st$#V]6**Nvv..J%%%%%%N!!!! +++ & & & &>&&&HHHHT   """@%%%N)))      >>>7(7(7(rUUUn\:     .   (---.(,   444l DDDLR"R"R"h ) ) )   "+++++r5c&eZdZdZddZdZdZdS) ROIPlotItemzNPlot curve that monitors an ROI and image for changes to automatically replot.rr Nc||_||_||_||_||_t |||j||j |j dS)N)r(r) roiroiDataroiImgaxesxValsrrH getRoiDatasigRegionChangedr*roiChangedEvent)rQr~rimgrrrs r3rHzROIPlotItem.__init__sn    tT__%6%6$*ERRR $$T%9:::::r5c|j|j|j|j}|dS|jdkr!|d}|jdk!|S)N)rr )axis)r~getArrayRegionrrrrmeanrQrs r3rzROIPlotItem.getRoiDatas\ H # #DL$+DI # N N 9 FfqjjAAfqjjr5cd|}|||jdSrg)rrrrs r3rzROIPlotItem.roiChangedEvents- OO   4:&&&&&r5)r|NN)rrrsrtrurHrrrVr5r3r{r{sLXX;;;;'''''r5r{rg)rrrrhasattrrr{r%runumpyrr r r$r r __all__r4rr{rVr5r3rs1))))))))))gi11 ******  KKKKZ} +} +} +} +} +N} +} +} +B'''''-'''''r5