From 51e862d1411be2741d306b5d02d441c5fdd02d37 Mon Sep 17 00:00:00 2001 From: Roman Stoklasa Date: Wed, 15 Dec 2021 15:43:04 +0100 Subject: [PATCH 1/3] Added .gitignore and ignoring *.user (project and CMake) files --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d7a4d4d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/*.user From 59283ab186aef75e718ba8234f4229c2b4473f67 Mon Sep 17 00:00:00 2001 From: Roman Stoklasa Date: Wed, 15 Dec 2021 15:44:28 +0100 Subject: [PATCH 2/3] Added new toolbar icons -- for selecting the color mode. Added icons to color actions. --- artwork/icon-bgr.svg | 50 +++++++++ artwork/icon-colormap.svg | 61 +++++++++++ artwork/icon-greyscale.svg | 54 ++++++++++ artwork/icon-rgb.svg | 50 +++++++++ icons.qrc | 4 + mainwindow.ui | 202 ++++++++++++++++++++----------------- 6 files changed, 331 insertions(+), 90 deletions(-) create mode 100644 artwork/icon-bgr.svg create mode 100644 artwork/icon-colormap.svg create mode 100644 artwork/icon-greyscale.svg create mode 100644 artwork/icon-rgb.svg diff --git a/artwork/icon-bgr.svg b/artwork/icon-bgr.svg new file mode 100644 index 0000000..6bb3386 --- /dev/null +++ b/artwork/icon-bgr.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/icon-colormap.svg b/artwork/icon-colormap.svg new file mode 100644 index 0000000..1f89d64 --- /dev/null +++ b/artwork/icon-colormap.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/icon-greyscale.svg b/artwork/icon-greyscale.svg new file mode 100644 index 0000000..437c0de --- /dev/null +++ b/artwork/icon-greyscale.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/icon-rgb.svg b/artwork/icon-rgb.svg new file mode 100644 index 0000000..b821653 --- /dev/null +++ b/artwork/icon-rgb.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icons.qrc b/icons.qrc index ae54111..b89e90d 100644 --- a/icons.qrc +++ b/icons.qrc @@ -5,5 +5,9 @@ artwork/document-save.svg artwork/histogram.svg artwork/icon.svg + artwork/icon-rgb.svg + artwork/icon-bgr.svg + artwork/icon-colormap.svg + artwork/icon-greyscale.svg diff --git a/mainwindow.ui b/mainwindow.ui index e82e253..2b22e6b 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -19,43 +19,43 @@ - - - - Batch index (n) - - - - - - - false - - - true - - - false - - - QGraphicsView::NoDrag - - - - - - - false - - - 1 - - - Qt::Horizontal - - - - + + + + Batch index (n) + + + + + + + false + + + true + + + false + + + QGraphicsView::NoDrag + + + + + + + false + + + 1 + + + Qt::Horizontal + + + + false @@ -80,10 +80,10 @@ - - - - Channel (c) + + + + Channel (c) @@ -95,7 +95,7 @@ 0 0 599 - 22 + 21 @@ -116,7 +116,7 @@ - + @@ -127,16 +127,16 @@ - - - Contrast stretch - - - - + + + Contrast stretch + + + + - + @@ -173,6 +173,12 @@ + + + + + + @@ -250,10 +256,10 @@ true - (N*C*H*W) + (N*C*H*W) - - Ctrl+Z + + Ctrl+Z @@ -261,16 +267,20 @@ true - (N*H*W*C) + (N*H*W*C) - - Ctrl+X + + Ctrl+X true + + + :/artwork/icon-colormap.svg:/artwork/icon-colormap.svg + Colormap @@ -282,6 +292,10 @@ true + + + :/artwork/icon-rgb.svg:/artwork/icon-rgb.svg + RGB @@ -293,6 +307,10 @@ true + + + :/artwork/icon-bgr.svg:/artwork/icon-bgr.svg + BGR @@ -304,6 +322,10 @@ true + + + :/artwork/icon-greyscale.svg:/artwork/icon-greyscale.svg + Grayscale @@ -311,39 +333,39 @@ Ctrl+1 - - - true - - - Automatic - - - Ctrl+A - - - - - true - - - Complete array - - - Ctrl+, - - - - - true - - - Over current canvas - - - Ctrl+. - - + + + true + + + Automatic + + + Ctrl+A + + + + + true + + + Complete array + + + Ctrl+, + + + + + true + + + Over current canvas + + + Ctrl+. + + From b979511636bb5ee0695285c15dbf7f6d6e5e18d7 Mon Sep 17 00:00:00 2001 From: Roman Stoklasa Date: Wed, 15 Dec 2021 16:48:28 +0100 Subject: [PATCH 3/3] Added description of the Horizontal Scroll feature and scrolling through the slices. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 0582064..d849663 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,17 @@ Then, the appropriate array will be loaded and all features can then be used. ![npz](https://raw.githubusercontent.com/ArendJanKramer/Numpyviewer/master/artwork/Screenshot%20npz.png) + +## Scrolling through the slices -- "horizontal scroll" +The numpy viewer supports fast and easy scrolling through slices using a Horizontal Scroll. This may be very useful to review 3D images, or to quickly scan through various examples in your batch or dataset. + +For scrolling through the slices, you can either use your hardware `horizontal scroll` mouse wheel, or a combination of `Alt`+`scroll wheel` *(the standard one)*. + +The default scrolling speed is 1 slice *"per step"*, in order to be able to reach any slice you want. However, this may be too slow and tedious if you want to find some particular slide far away from the begining -- and that's why there is also a "Fast mode". Just hold down the `Shift` key while you are scrolling and you will scroll 3x faster. + + + + ## Contributes Three functions were kindly borrowed from K. Dijkstra's DDSL.