Commit Graph

51 Commits

Author SHA1 Message Date
KIU Shueng Chuan 607db15949 call super() on virtual QWidget methods 2021-01-23 08:29:44 +08:00
KIU Shueng Chuan 966ae7a3df import template files using importlib
this lets us support the various bindings w/o having to add binding
specific code.

it breaks PyQt4 support since PyQt4 template files are suffixed as
"_pyqt" rather than "_pyqt4"
2021-01-15 08:25:08 +08:00
KIU Shueng Chuan 92016d3d5a add imports of _pyside6 files 2021-01-15 08:25:06 +08:00
Kenneth Lyons 6052ba7668 Get ImageView ROI working with both row and col major data 2020-07-04 23:14:08 -07:00
Karl Georg Bedrich 1666407a89
ImageView.Timeline better visibility and fixed (#400)
* make imageView-timeline unmovable

* imageview.timeline now visible over white background

* activate splitter when roi visible

* Re-add roiCurves

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-22 22:48:54 -07:00
Ogi Moore e1f6c08365
Merge pull request #551 from bensondaled/develop
added fps class variable to ImageView to enable consistent playback f…
2020-06-12 21:55:46 -07:00
Ogi Moore ffc271d6c7
Merge pull request #1203 from meganbkratz/imageAxisOrder_bugfix
Image axis order bugfix
2020-06-05 21:36:00 -07:00
Ogi c0b9bfa040 Remove commented out line 2020-06-05 21:00:18 -07:00
Adam Strzelecki 983cc1695e
Patch/window handling (#468)
* Do not wrap PlotView/ImageView

There is no need to wrap PlotView/ImageView into QMainWindow, since
only purpose of the QMainWindow is some default menu toolbar & menu
handling, that is not used by PyQtGraph anyway.

Moreover, every parent-less Qt widget can become window, so this
change just use PlotView/ImageView as windows, removing extra
complexity, eg. method forwarding, self.win property.

Another benefit of this change, it that these windows get initial
dimensions and titles as they were designed in .ui file.

* Properly cleanup on ImageView.close()

We should not close explicitly child widgets or clear scene, otherwise
Qt will deallocate children views, and cause "wrapped C/C++ object of
type ImageItem has been deleted" error next time we call close()
and/or some other methods.

All children, including self.ui.roiPlot, self.ui.graphicsView will be
closed together with its parent, so there is no need to close them
explicitly.

So the purpose of close it to reclaim the memory, but not to make the existing ImageView object dysfunctional.

* Remove references to plot & image windows after close

PyQtGraph images and plots module list variables are currently holding
references to all plots and image windows returned directly from main
module. This does not seem to be documented however, and causes the Qt
windows to be not released from memory, even if user releases all own
references.

This change removes the references from images/plots list once window
is closed, so when there is no other reference, window and all related
memory is reclaimed.

* Change all UI forms title from Form to PyQtGraph

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2020-06-01 11:23:18 -07:00
Megan Kratz ca2e5849c2 better conditional handling so as not to break something that was working before 2020-05-19 15:25:15 -06:00
Megan Kratz 360bcad47b fix for mismatched axis exception when imageAxisOrder='row-major' 2020-05-19 15:12:09 -06:00
Megan Kratz c349c3665b fix for roi getting wrong data when imageAxisOrder='row-major' 2020-05-19 15:11:11 -06:00
Ogi Moore 273757fa4b
Merge pull request #1016 from 2xB/fix-862
Fix: ImageView sigTimeChanged was only emitted on mouse interaction
2019-08-16 20:28:02 -07:00
2xB 8d2c16901b Merge master into develop (#981)
* Information is spelled with an r, even in comments
2019-08-16 20:16:01 -07:00
2xB 4e6629f352 Fix: ImageView sigTimeChanged was only emitted on mouse interaction 2019-08-08 17:39:11 +02:00
Kenneth Lyons 55d9e8888b Allow last image in stack to be selected by slider in ImageView 2019-06-25 16:46:01 -07:00
dschoni 42fd5614d0 Fix deprecation warning of multi-dimension tuples 2019-05-21 13:38:34 +02:00
Luke Campagnola 08349351da Fix QString handling 2018-06-22 17:31:58 -07:00
Luke Campagnola 3fd56eb195 Handle Qt4/5 API difference in filedialog 2018-06-22 17:26:31 -07:00
Luke Campagnola 66dcfc7c67 Merge branch 'develop' into pyside2 2018-05-22 15:22:54 -07:00
Luke Campagnola 0c1cda4973 Gracefully handle case where image data has size==0 2018-04-25 16:11:25 -07:00
Luke Campagnola 82afad8366 Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
Luke Campagnola 46f10f24f8 Merge branch 'develop' of https://github.com/maxpeng/pyqtgraph into maxpeng-develop 2018-02-15 18:30:12 -08:00
Luke Campagnola 6562dfc892 minor doc fix 2018-02-13 17:29:33 -08:00
Luke Campagnola 8ea3add281
Merge pull request #616 from gram526/patch-1
Play image along 't' axis instead of first axis
2018-01-29 18:59:54 -08:00
Girish Ramlugun 035b5a6c31
Play image along 't' axis instead of first axis 2018-01-09 14:30:59 +13:00
Luke Campagnola 4a4a7383bc ImageView: add support for RGB levels mode 2017-09-26 08:33:34 -07:00
Ben Deverett 3fc6eff76f added fps class variable to ImageView to enable consistent playback frame rate 2017-09-06 23:30:55 -04:00
Max Peng 8bdc19be75 update to support pyside2 2016-09-25 00:16:36 +08:00
Luke Campagnola 4b9f1a20a4 Merge pull request #370 from campagnola/image-alignment
Image alignment
2016-09-07 23:18:51 -07:00
Luke Campagnola db07a16913 Test update and more bugfixes 2016-08-31 15:15:44 -07:00
Luke Campagnola bee5878915 Added imageAxisOrder config option
Added global config documentation
ROIs don't exactly work yet..
2016-08-23 09:06:43 -07:00
Luke Campagnola dffc2d4e3e Merge pull request #300 from ericdill/graphics-view-inheritance
MNT: Call close() up the inheritance chain
2016-04-21 00:33:27 -07:00
Eric Dill 90d6c9589c MNT: Call close on the mro for ImageView 2016-03-28 08:18:09 -04:00
Megan Kratz 0e679edcf3 some documentation improvements 2016-03-25 12:36:49 -04:00
Megan Kratz 240cdb1a41 changed setPredefinedGradient docstring to reference GradientEditorItem.loadPreset 2016-02-18 15:29:57 -05:00
Megan Kratz 74fad9e29a added setPredefinedGradient function to ImageView, and added documentation to GradientEditorItem.loadPreset 2016-02-15 17:17:09 -05:00
Megan Kratz 3a50f65120 added setColorMap method to ImageView 2016-02-15 16:58:13 -05:00
Luke Campagnola 1fe5976e19 Merge branch 'pyqt5' into develop
Conflicts:
	examples/parametertree.py
	pyqtgraph/Qt.py
	pyqtgraph/graphicsItems/FillBetweenItem.py
	pyqtgraph/graphicsItems/InfiniteLine.py
	pyqtgraph/imageview/ImageView.py
2015-02-28 11:46:41 -05:00
Luke Campagnola 52d7f2142c Fix line width in a few examples 2015-02-28 11:26:45 -05:00
Luke Campagnola 753ac9b4c4 Squashed commit of the following:
commit ca3fbe2ff9
Author: Luke Campagnola <luke.campagnola@gmail.com>
Date:   Thu Aug 7 08:41:30 2014 -0400

    Merged numerous updates from acq4:
    * Added HDF5 exporter
    * CSV exporter gets (x,y,y,y) export mode
    * Updates to SVG, Matplotlib exporter
    * Console can filter exceptions by string
    * Added tick context menu to GradientEditorItem
    * Added export feature to imageview
    * Parameter trees:
        - Option to save only user-editable values
        - Option to set visible title of parameters separately from name
        - Added experimental ParameterSystem for handling large systems of
            interdependent parameters
        - Auto-select editable portion of spinbox when editing
    * Added Vector.__abs__
    * Added replacement garbage collector for avoiding crashes on multithreaded Qt
    * Fixed "illegal instruction" caused by closing file handle 7 on OSX
    * configfile now reloads QtCore objects, Point, ColorMap, numpy arrays
    * Avoid triggering recursion issues in exception handler
    * Various bugfies and performance enhancements
2014-08-07 09:03:26 -04:00
Luke Campagnola 1729416914 Updated ImageView and ViewBox documentation 2014-04-29 17:17:05 -04:00
Pietro Zambelli dad5d8f733 Detect range of the image using bottleneck if available 2014-03-04 16:56:56 +00:00
Luke Campagnola 210d07027e ImageView updates to improve subclassing flexibility:
- Allow non-ndarray image data
 - Make quickMinMax a normal method
2014-02-12 11:31:58 -05:00
Luke Campagnola 95dd56bdb6 Bugfixes:
- fixed PlotCurveItem generating exceptions when data has length=0
- fixed ImageView.setImage only working once
2014-01-01 20:22:13 -05:00
Luke Campagnola 50df2b2def dockarea, imageview, metaarray 2013-12-23 10:06:26 -05:00
Antony Lee f136b33033 Profilers controllable via PYQTGRAPHPROFILE.
A new function profiling system is implemented.  Most importantly, this
allows one to profile various internal functions directly by setting the
`PYQTGRAPHPROFILE` environment variable to a comma separated list of
function and method names, e.g.

    PYQTGRAPHPROFILE=functions.makeARGB,ImageItem.render \
        python -mexamples

Specifically, items in `PYQTGRAPHPROFILE` must be of the form
`classname.methodname` or `dotted_module_name.functionname`, with the
initial "pyqtgraph." stripped from the dotted module name.

Moreover, the overhead of inactive profilers has been kept minimal: an
introspective check of the caller's name (only if `PYQTGRAPHPROFILE` is
set) and a trivial function (not method) call per profiler call.

The new profilers rely on `sys._getframe` to find the caller's name,
although the previous system (passing the caller's name explicitely)
could certainly have been kept instead.

Finally the API of profilers has been changed: register a
profiling point simply by calling the profiler, and profilers are
automatically flushed on garbage collection.  See the docstring of
`pyqtgraph.debug.Profiler` for more details.
2013-11-27 09:57:46 -08:00
Luke Campagnola 59bbe0127e ImageView cleanups
- fixed auto-levelling when normalization options change
- added autoHistogramRange argument to setImage
2013-05-30 09:33:09 -04:00
Luke Campagnola 09b16baed1 python3 fixes
imageview fix
2013-05-13 08:51:59 -04:00
Luke Campagnola 86861b5a06 Fixed dock dragging on pyside
Added imageview.setImage argument documentation
2013-02-15 15:22:05 -05:00