Commit Graph

80 Commits

Author SHA1 Message Date
KIU Shueng Chuan 2da769d6a5 unhide ImageView roi curves 2021-10-08 22:01:41 +08:00
magnium 6f4b6b1b88
Fix ImageView levelMode (#1974)
* fixes #1769

* Automatically set image to ImageView if imageItem is provided.
Added a test for correct initialization of ImageView with imageItem and levelMode.
2021-09-07 21:27:26 -07:00
KIU Shueng Chuan 11b4a1bb47 fix: ImageView calling deprecated QGraphicsItem.scale() 2021-08-14 14:05:18 +08:00
njessurun ef99d3fbf6 Adds EOF newline to files missing it.
Note: intentionally avoids files moved / already adjusted from #1919
2021-08-02 11:51:28 -04:00
Ogi Moore d396d33799
Remove the use of pyqtgraph.ptime (#1914)
* Remove the use of pyqtgraph.ptime

With us supporting python3.7+, we have no more need for the ptime module
and can instead safely use perf_counter for everything.

* Address small issues PR turned up

* Reword comment in ImageView
2021-07-22 20:57:50 -07:00
Martin Chase 1d40d50b89
push bullet lists over 2 spaces to get them to show up as such in the… (#1912)
* push bullet lists over 2 spaces to get them to show up as such in the docs

* separate the literal block from the bullet list
2021-07-21 07:12:35 -07:00
KIU Shueng Chuan 81baa182c5 add __all__ to various files 2021-06-25 21:19:33 +08:00
Ogi Moore cc081af528 New Template Files for PyQt6 6.1
Update PySide6 templates to Qt 6.1
2021-06-08 21:23:49 -07:00
Ogi Moore d455da9aec Use Qt6 Enum Namespace
This namespace appears to be valid in PySide2/PyQt5 5.12+ so we may as
well migrate to the newer namespace ourselves.
2021-06-08 21:23:49 -07:00
Ogi Moore a6971c768d Move and Update test-data repo into pyqtgraph repo
To reduce complexity, and make it easier to add more images and tests,
the images in the `test-data` repository should be merged with the main
repository.  Furthermore, we can remove a lot of the subprocess work in
the image_testing.py file, as we no longer need to have it interact with
git.

The images are not the same.  Images were regenerated with Qt6, and now
have proper big and little endian handling thanks to @pijyoi

Second commit is a slightly modified variant of
2e135ab282d6007b34a3854921be54d0e9efb241 authored by @pijyoi
it is to convert qimages to RGBA8888 for testing.  Image
files were regenerated images for the big/little handling

Fixed issue with bogus test from test_NonUniformImage and generated a
new image
2021-05-31 21:05:00 -07:00
Ogi Moore 03ea368454 Clean up Errors for CodeQL analyzer
CodeQL identified some errors and warnings, which this commit cleans up.
2021-04-23 22:44:29 -07:00
Ogi Moore 3ea92736b8 Do not use list comprehensions with any or all
python any and all are able to break early the moment they come across a
member of the iterable that meets the condition; but having a list
comprehension nested within breaks that ability to exit early, as the
list comprehension has to finish being constructed first before it can
be evaluated
2021-04-23 22:43:57 -07:00
Ogi Moore c4a1cf11a1 Use clip_array or clip_scalar instead of np.clip
Significant performance issues have been identified with np.clip
and thus clip_array was created to speed up the operation.  In addition
clip_scalar was created to clip a scalar value between two other values
this commit replaces many uses of np.clip from operating on scalars to
using clip_scalar instead
2021-04-23 11:53:00 -07:00
Ogi Moore 85c726e49a Replace uses of np.log on scalers with math.log 2021-04-23 11:53:00 -07:00
Nils Nemitz 2b1e24bf11 added cast to int 2021-03-26 18:47:38 +09:00
Kenneth Lyons f1999d9a2c Guard against key events when there's no time axis in ImageView 2021-02-05 20:23:15 -08:00
Ogi Moore b54aa3914d
Attempt i18n localization (#1513)
* Trying translate on exporter strings

* Try translate on other misc context menu strings

* First f-string and I screw it up...

* add more translation calls
2021-01-27 11:34:32 -08:00
KIU Shueng Chuan 5186cbd80b remove Qt4 generated template files 2021-01-23 12:12:20 +08:00
KIU Shueng Chuan 607db15949 call super() on virtual QWidget methods 2021-01-23 08:29:44 +08:00
KIU Shueng Chuan ab41c03358 generate _pyqt6.py files
VideoTemplate_pyside6.py : regenerate for cuda feature
2021-01-23 08:29:39 +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 3584736155 generate template files for pyside6 2021-01-15 08:25:07 +08:00
KIU Shueng Chuan 92016d3d5a add imports of _pyside6 files 2021-01-15 08:25:06 +08:00
KIU Shueng Chuan b0f7dda102 QFont.setWeight(75) is redundant
QFont.setBold(True) calls QFont.setWeight(QFont.Weight.Bold)

in Qt 5, QFont.Weight.Bold == 75
in Qt 6, QFont.Weight.Bold == 700

in PySide6, QFont.setWeight() no longer accepts an integer value.
2021-01-15 08:25:05 +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 8da208b914 flip pyside2 template line endings 2018-05-17 09:02:41 -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