Skip to content

Commit 5cd7937

Browse files
committed
Contrast panel: fix update issues + new "Set range" button
1 parent 0eaace9 commit 5cd7937

File tree

5 files changed

+307
-199
lines changed

5 files changed

+307
-199
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ In this release, test coverage is 79%.
66

77
💥 New features / Enhancements:
88

9+
* Contrast adjustment panel:
10+
* New layout: the vertical toolbar (which was constrained in a small area on the
11+
right side of the panel) is now a horizontal toolbar at the top of the panel,
12+
beside the title
13+
* New "Set range" button: allows the user to set manually the minimum and maximum
14+
values of the histogram range
915
* New Z-axis logarithmic scale feature:
1016
* Added new tool `ZAxisLogTool` to toggle the Z-axis logarithmic scale
1117
* The tool is registered by default in the plot widget, like the `ColormapTool`
@@ -29,6 +35,16 @@ In this release, test coverage is 79%.
2935
* Added new tool `ReverseXAxisTool` to toggle the X-axis direction
3036
* The tool is registered by default in the plot widget, like its Y-axis counterpart
3137

38+
🛠️ Bug fixes:
39+
40+
* Contrast adjustment panel:
41+
* Fixed histogram update issues when no image was currently selected (even if the
42+
an image was displayed and was selected before)
43+
* Histogram range was not updated when either the minimum or maximum value was set
44+
using the "Minimum value" or "Maximum value" buttons (which have been renamed to
45+
"Min." and "Max." in this release)
46+
* Histogram range was not updated when the "Set full range" button was clicked
47+
3248
🧹 API cleanup:
3349

3450
* Deprecated `AnnotationParam.update_annotation` method: use `update_item` instead
209 Bytes
Binary file not shown.

plotpy/locale/fr/LC_MESSAGES/plotpy.po

Lines changed: 95 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
9-
"POT-Creation-Date: 2024-06-26 11:11+0200\n"
9+
"POT-Creation-Date: 2024-06-26 14:54+0200\n"
1010
"PO-Revision-Date: 2019-02-20 14:42+0100\n"
1111
"Last-Translator: \n"
1212
"Language-Team: \n"
@@ -29,7 +29,7 @@ msgstr "Annotation"
2929
#: plotpy\builder\curvemarker.py:446 plotpy\builder\curvemarker.py:568
3030
#: plotpy\builder\curvemarker.py:628 plotpy\items\curve\base.py:118
3131
#: plotpy\items\curve\base.py:282 plotpy\items\curve\errorbar.py:102
32-
#: plotpy\items\histogram.py:87 plotpy\panels\contrastadjustment.py:70
32+
#: plotpy\items\histogram.py:87 plotpy\panels\contrastadjustment.py:73
3333
#: plotpy\panels\csection\csplot.py:65
3434
msgid "Curve"
3535
msgstr "Courbe"
@@ -40,7 +40,7 @@ msgid "Error bars"
4040
msgstr "Barres d'erreur"
4141

4242
#: plotpy\builder\curvemarker.py:626 plotpy\items\histogram.py:90
43-
#: plotpy\panels\contrastadjustment.py:157 plotpy\styles\histogram.py:61
43+
#: plotpy\panels\contrastadjustment.py:160 plotpy\styles\histogram.py:61
4444
msgid "Histogram"
4545
msgstr "Histogramme"
4646

@@ -259,46 +259,65 @@ msgstr "Forme"
259259
msgid "Range"
260260
msgstr "Intervalle"
261261

262-
#: plotpy\panels\contrastadjustment.py:388
263-
#: plotpy\panels\contrastadjustment.py:515
262+
#: plotpy\panels\contrastadjustment.py:404
264263
msgid "Eliminate outliers"
265264
msgstr "Éliminer les bords"
266265

267-
#: plotpy\panels\contrastadjustment.py:401
268-
msgid "Contrast adjustment tool"
269-
msgstr "Outil de réglage du contraste"
266+
#: plotpy\panels\contrastadjustment.py:417
267+
msgid "Contrast"
268+
msgstr "Contraste"
270269

271-
#: plotpy\panels\contrastadjustment.py:472
272-
msgid "Minimum level"
273-
msgstr "Niveau minimum"
270+
#: plotpy\panels\contrastadjustment.py:490
271+
msgid "Min."
272+
msgstr "Min."
274273

275-
#: plotpy\panels\contrastadjustment.py:475
274+
#: plotpy\panels\contrastadjustment.py:493
276275
msgid "Select minimum level on image"
277276
msgstr "Sélectionne le niveau minimum de l'image"
278277

279-
#: plotpy\panels\contrastadjustment.py:482
280-
msgid "Maximum level"
281-
msgstr "Niveau maximum"
278+
#: plotpy\panels\contrastadjustment.py:500
279+
msgid "Max."
280+
msgstr "Max."
282281

283-
#: plotpy\panels\contrastadjustment.py:485
282+
#: plotpy\panels\contrastadjustment.py:503
284283
msgid "Select maximum level on image"
285284
msgstr "Sélectionne le niveau maximum de l'image"
286285

287-
#: plotpy\panels\contrastadjustment.py:508
286+
#: plotpy\panels\contrastadjustment.py:526
288287
msgid "Full range"
289288
msgstr "Pleine échelle"
290289

291-
#: plotpy\panels\contrastadjustment.py:511
290+
#: plotpy\panels\contrastadjustment.py:529
292291
msgid "Scale the image's display range according to data range"
293292
msgstr "Adapte l'échelle d'affichage des niveaux de l'image aux données"
294293

295-
#: plotpy\panels\contrastadjustment.py:518
294+
#: plotpy\panels\contrastadjustment.py:533
295+
msgid "Eliminate %"
296+
msgstr "Éliminer %"
297+
298+
#: plotpy\panels\contrastadjustment.py:536
296299
msgid ""
297-
"Eliminate levels histogram outliers and scale the image's display range "
298-
"accordingly"
300+
"Eliminate outliers from the image's display range, based on a percentage of "
301+
"the data range"
299302
msgstr ""
300-
"Supprime les bords (pourcentage choisi) de l'histogramme des niveaux de "
301-
"l'image, puis affiche l'image résultante"
303+
"Elimine les bords de l'histogramme des niveaux de l'image, en fonction d'un "
304+
"pourcentage de la dynamique"
305+
306+
#: plotpy\panels\contrastadjustment.py:543
307+
msgid "Set range"
308+
msgstr "Définir l'échelle"
309+
310+
#: plotpy\panels\contrastadjustment.py:546
311+
msgid "Set the image's display range manually"
312+
msgstr "Définit manuellement l'échelle d'affichage des niveaux de l'image"
313+
314+
#: plotpy\panels\contrastadjustment.py:569
315+
msgid "Min. level"
316+
msgstr "Niveau min."
317+
318+
#: plotpy\panels\contrastadjustment.py:570
319+
msgid "Max. level"
320+
msgstr "Niveau max."
302321

303322
#: plotpy\panels\csection\csitem.py:386 plotpy\panels\csection\csitem.py:418
304323
#: plotpy\panels\csection\csplot.py:40 plotpy\tools\cross_section.py:29
@@ -426,23 +445,23 @@ msgstr "Souhaitez-vous vraiment supprimer les objets sélectionnés ?"
426445
msgid "Item list"
427446
msgstr "Liste des objets"
428447

429-
#: plotpy\plot\base.py:361 plotpy\styles\image.py:556 plotpy\styles\label.py:82
430-
#: plotpy\styles\label.py:148
448+
#: plotpy\plot\base.py:361 plotpy\styles\image.py:556 plotpy\styles\label.py:81
449+
#: plotpy\styles\label.py:147
431450
msgid "Left"
432451
msgstr "Gauche"
433452

434-
#: plotpy\plot\base.py:362 plotpy\styles\image.py:557 plotpy\styles\label.py:83
435-
#: plotpy\styles\label.py:149
453+
#: plotpy\plot\base.py:362 plotpy\styles\image.py:557 plotpy\styles\label.py:82
454+
#: plotpy\styles\label.py:148
436455
msgid "Right"
437456
msgstr "Droite"
438457

439-
#: plotpy\plot\base.py:363 plotpy\styles\image.py:559 plotpy\styles\label.py:85
440-
#: plotpy\styles\label.py:151
458+
#: plotpy\plot\base.py:363 plotpy\styles\image.py:559 plotpy\styles\label.py:84
459+
#: plotpy\styles\label.py:150
441460
msgid "Bottom"
442461
msgstr "Bas"
443462

444-
#: plotpy\plot\base.py:364 plotpy\styles\image.py:558 plotpy\styles\label.py:84
445-
#: plotpy\styles\label.py:150
463+
#: plotpy\plot\base.py:364 plotpy\styles\image.py:558 plotpy\styles\label.py:83
464+
#: plotpy\styles\label.py:149
446465
msgid "Top"
447466
msgstr "Haut"
448467

@@ -479,7 +498,7 @@ msgstr ""
479498

480499
#: plotpy\styles\axes.py:35 plotpy\styles\curve.py:37
481500
#: plotpy\styles\histogram.py:61 plotpy\styles\image.py:505
482-
#: plotpy\styles\label.py:42 plotpy\styles\label.py:234
501+
#: plotpy\styles\label.py:41 plotpy\styles\label.py:233
483502
#: plotpy\styles\polygonmap.py:20 plotpy\styles\shape.py:143
484503
#: plotpy\styles\shape.py:311 plotpy\tests\widgets\test_simple_dialog.py:25
485504
#: plotpy\tests\widgets\test_simple_window.py:45
@@ -754,13 +773,13 @@ msgstr "Style"
754773
msgid "Size"
755774
msgstr "Taille"
756775

757-
#: plotpy\styles\base.py:359 plotpy\styles\label.py:61
776+
#: plotpy\styles\base.py:359 plotpy\styles\label.py:60
758777
msgid "Border"
759778
msgstr "Bordure"
760779

761780
#: plotpy\styles\base.py:360 plotpy\styles\base.py:527
762781
#: plotpy\styles\base.py:565 plotpy\styles\histogram.py:95
763-
#: plotpy\styles\image.py:279 plotpy\styles\label.py:67
782+
#: plotpy\styles\image.py:279 plotpy\styles\label.py:66
764783
msgid "Background color"
765784
msgstr "Couleur du fond"
766785

@@ -794,7 +813,7 @@ msgstr "sy"
794813
msgid "Font"
795814
msgstr "Police"
796815

797-
#: plotpy\styles\base.py:526 plotpy\styles\label.py:66
816+
#: plotpy\styles\base.py:526 plotpy\styles\label.py:65
798817
msgid "Text color"
799818
msgstr "Couleur du texte"
800819

@@ -815,7 +834,7 @@ msgstr "Trait"
815834
msgid "Minor grid"
816835
msgstr "Quadrillage secondaire"
817836

818-
#: plotpy\styles\curve.py:41 plotpy\styles\label.py:56
837+
#: plotpy\styles\curve.py:41 plotpy\styles\label.py:55
819838
#: plotpy\styles\shape.py:60 plotpy\styles\shape.py:63
820839
#: plotpy\styles\shape.py:151 plotpy\styles\shape.py:154
821840
#: plotpy\styles\shape.py:407 plotpy\styles\shape.py:410
@@ -1081,8 +1100,8 @@ msgid "Lock position"
10811100
msgstr "Verrouiller la position"
10821101

10831102
#: plotpy\styles\image.py:337 plotpy\styles\image.py:548
1084-
#: plotpy\styles\label.py:71 plotpy\styles\label.py:142
1085-
#: plotpy\styles\label.py:163
1103+
#: plotpy\styles\label.py:70 plotpy\styles\label.py:141
1104+
#: plotpy\styles\label.py:162
10861105
msgid "Position"
10871106
msgstr "Position"
10881107

@@ -1191,116 +1210,116 @@ msgstr "Symétrie verticale"
11911210
msgid "θ (°)"
11921211
msgstr "θ (°)"
11931212

1194-
#: plotpy\styles\label.py:48 plotpy\styles\label.py:52
1213+
#: plotpy\styles\label.py:47 plotpy\styles\label.py:51
11951214
msgid "Contents"
11961215
msgstr "Contenu"
11971216

1198-
#: plotpy\styles\label.py:61
1217+
#: plotpy\styles\label.py:60
11991218
msgid "set width to 0 to disable"
12001219
msgstr "entrer 0 pour désactiver"
12011220

1202-
#: plotpy\styles\label.py:64 plotpy\styles\label.py:69
1221+
#: plotpy\styles\label.py:63 plotpy\styles\label.py:68
12031222
#: plotpy\styles\shape.py:65 plotpy\styles\shape.py:68
12041223
msgid "Text"
12051224
msgstr "Texte"
12061225

1207-
#: plotpy\styles\label.py:65
1226+
#: plotpy\styles\label.py:64
12081227
msgid "Text font"
12091228
msgstr "Police du texte"
12101229

1211-
#: plotpy\styles\label.py:68
1230+
#: plotpy\styles\label.py:67
12121231
msgid "Background transparency"
12131232
msgstr "Opacité du fond"
12141233

1215-
#: plotpy\styles\label.py:72
1234+
#: plotpy\styles\label.py:71
12161235
msgid "Position relative to anchor"
12171236
msgstr "Position de l'étiquette par rapport au point d'ancrage"
12181237

1219-
#: plotpy\styles\label.py:76
1238+
#: plotpy\styles\label.py:75
12201239
msgid "Corner"
12211240
msgstr "Coin"
12221241

1223-
#: plotpy\styles\label.py:78 plotpy\styles\label.py:144
1242+
#: plotpy\styles\label.py:77 plotpy\styles\label.py:143
12241243
msgid "Top left"
12251244
msgstr "En haut à gauche"
12261245

1227-
#: plotpy\styles\label.py:79 plotpy\styles\label.py:145
1246+
#: plotpy\styles\label.py:78 plotpy\styles\label.py:144
12281247
msgid "Top right"
12291248
msgstr "En haut à droite"
12301249

1231-
#: plotpy\styles\label.py:80 plotpy\styles\label.py:146
1250+
#: plotpy\styles\label.py:79 plotpy\styles\label.py:145
12321251
msgid "Bottom left"
12331252
msgstr "En bas à gauche"
12341253

1235-
#: plotpy\styles\label.py:81 plotpy\styles\label.py:147
1254+
#: plotpy\styles\label.py:80 plotpy\styles\label.py:146
12361255
msgid "Bottom right"
12371256
msgstr "En bas à droite"
12381257

1239-
#: plotpy\styles\label.py:86 plotpy\styles\label.py:152
1258+
#: plotpy\styles\label.py:85 plotpy\styles\label.py:151
12401259
msgid "Center"
12411260
msgstr "Centre"
12421261

1243-
#: plotpy\styles\label.py:89
1262+
#: plotpy\styles\label.py:88
12441263
msgid "Label position relative to anchor point"
12451264
msgstr "Position de l'étiquette par rapport au point d'ancrage"
12461265

1247-
#: plotpy\styles\label.py:92
1266+
#: plotpy\styles\label.py:91
12481267
msgid "ΔX"
12491268
msgstr "ΔX"
12501269

1251-
#: plotpy\styles\label.py:94
1270+
#: plotpy\styles\label.py:93
12521271
msgid "Horizontal offset (pixels) relative to anchor point"
12531272
msgstr "Décalage horizontal (pixels) par rapport au point d'ancrage"
12541273

1255-
#: plotpy\styles\label.py:98
1274+
#: plotpy\styles\label.py:97
12561275
msgid "ΔY"
12571276
msgstr "ΔY"
12581277

1259-
#: plotpy\styles\label.py:100
1278+
#: plotpy\styles\label.py:99
12601279
msgid "Vertical offset (pixels) relative to anchor point"
12611280
msgstr "Décalage vertical (pixels) par rapport au point d'ancrage"
12621281

1263-
#: plotpy\styles\label.py:105 plotpy\styles\label.py:113
1282+
#: plotpy\styles\label.py:104 plotpy\styles\label.py:112
12641283
msgid "Anchor"
12651284
msgstr "Ancre"
12661285

1267-
#: plotpy\styles\label.py:108 plotpy\styles\label.py:160
1286+
#: plotpy\styles\label.py:107 plotpy\styles\label.py:159
12681287
msgid "Anchor position"
12691288
msgstr "Position du point d'ancrage"
12701289

1271-
#: plotpy\styles\label.py:113
1290+
#: plotpy\styles\label.py:112
12721291
msgid "Attach to canvas"
12731292
msgstr "Attacher au canevas"
12741293

1275-
#: plotpy\styles\label.py:118
1294+
#: plotpy\styles\label.py:117
12761295
msgid "X"
12771296
msgstr "X"
12781297

1279-
#: plotpy\styles\label.py:118
1298+
#: plotpy\styles\label.py:117
12801299
msgid "X-axis position in canvas coordinates"
12811300
msgstr "Abscisse en coordonnées du canevas"
12821301

1283-
#: plotpy\styles\label.py:123
1302+
#: plotpy\styles\label.py:122
12841303
msgid "Y"
12851304
msgstr "Y"
12861305

1287-
#: plotpy\styles\label.py:123
1306+
#: plotpy\styles\label.py:122
12881307
msgid "Y-axis position in canvas coordinates"
12891308
msgstr "Ordonnée en coordonnées du canevas"
12901309

1291-
#: plotpy\styles\label.py:130
1310+
#: plotpy\styles\label.py:129
12921311
msgid "Interact"
12931312
msgstr "Interaction"
12941313

1295-
#: plotpy\styles\label.py:132
1314+
#: plotpy\styles\label.py:131
12961315
msgid "moving object changes anchor position"
12971316
msgstr "déplacer l'objet modifie le point d'ancrage"
12981317

1299-
#: plotpy\styles\label.py:133
1318+
#: plotpy\styles\label.py:132
13001319
msgid "moving object changes label position"
13011320
msgstr "déplacer l'objet modifie la position de l'étiquette"
13021321

1303-
#: plotpy\styles\label.py:155
1322+
#: plotpy\styles\label.py:154
13041323
msgid "Absolute position on canvas"
13051324
msgstr "Position absolue sur le canevas"
13061325

@@ -2304,3 +2323,13 @@ msgstr "Rotation et rognage"
23042323
#: plotpy\widgets\rotatecrop.py:220
23052324
msgid "Show cropping rectangle"
23062325
msgstr "Afficher le rectangle de rognage"
2326+
2327+
#~ msgid "Contrast adjustment tool"
2328+
#~ msgstr "Outil de réglage du contraste"
2329+
2330+
#~ msgid ""
2331+
#~ "Eliminate levels histogram outliers and scale the image's display range "
2332+
#~ "accordingly"
2333+
#~ msgstr ""
2334+
#~ "Supprime les bords (pourcentage choisi) de l'histogramme des niveaux de "
2335+
#~ "l'image, puis affiche l'image résultante"

0 commit comments

Comments
 (0)