Sequential display of bands for fast inspection
Besides the false color, I miss a sequential display of individual bands, best if moving a bar in the spectrum of a given pixel, but could also just be a bar at the top of the canvas. This is very convenient for a first inspection of the images.
Comments (31)
-
-
reporter - edited description
-
reporter You just move the bar and get the given band displayed in grey scale according to a previously defined stretching
-
reporter Like the RGB bars in the Spectral Plot, but for a single grey or pseudo color band?
Yes!
-
Alright, yes, the single band bar in the plot is still missing. Do you like the RGB version so far?
-
reporter Cannot find the newer RGB selection of bands, all I find is the classic, inconvenient qgis menu
-
Ah sorry, that isn’t released yet. Install this dev version if you want to try it:
https://bitbucket.org/hu-geomatics/enmap-box/downloads/enmapboxplugin.3.10.20211220T125256.develop.zip -
The proposed slider in the map view is a good idea, but it is not really fitting the concept of having multiple raster layer in a single map view.
I would propose to have a new panel, where you can easily change the renderer bands of the current layer, where the current layer is the layer that was selected last in the Data Views panel:
This new panel could also be aware of wavelength information, so that you can easily jump to red, green, blue, nir, red-edge, swir, etc bands.
In case of RGB renderer, this panel could let you choose predefined band combinations like TrueColor, ColoredInfrared, etc. -
Similar functionality can be found in the new Color Space Explorer dialog:
The Color Space Explorer is currently limited to RGB renderer and not useful for single band exploration.
Also, having such functionality available in a panel that is visible in the main GUI would make exploration much quicker.
-
reporter But can use it. Tge RGB bands are just perfect. Perhaps what I’m saying would be solved just by having the current “Renderer Bnads” renamed to “Color Renderer Bands” and adding a “Grey Renderer Band” which would have just one single grey vertical bar.
-
reporter see last comment in
#837 -
Grey Band bar is now available:
-
Regarding the original request of this issue for having a slider for the gray band, see this follow-up issue here:
https://bitbucket.org/hu-geomatics/enmap-box/issues/895/add-a-new-waveband-locator-panel-for -
- changed status to resolved
-
reporter Any way you could make a dev version that would include this feature?
-
But note that so far only the Gray renderer is working:
-
-
reporter it works! Testing waveband Locator now…
-
reporter I get an error in the Spectral Library display:
An error has occurred while executing Python code:
TypeError: type NoneType doesn't define __round__ method
Traceback (most recent call last): File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py", line 3616, in onRendererBarChanged bandNo = min(max(round(bandNo), 1), self.mRendererBandsLayer.currentLayer().bandCount()) TypeError: type NoneType doesn't define __round__ method
Python version: 3.9.5 (default, Nov 18 2021, 16:00:48) [GCC 10.3.0]
QGIS version: 3.22.2-Białowieża Białowieża, 1601ec46d0Python Path:
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/apps/ensomap
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LAStools
- /usr/share/qgis/python
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins
- /usr/share/qgis/python/plugins
- /home/alobo/OTB/OTB-7.3.0-Linux64/lib/python
- /usr/lib/python39.zip
- /usr/lib/python3.9
- /usr/lib/python3.9/lib-dynload
- /home/alobo/.local/lib/python3.9/site-packages
- /usr/local/lib/python3.9/dist-packages
- /usr/lib/python3/dist-packages
- /usr/lib/python3.9/dist-packages
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python
- .
- /home/alobo/.local/lib/python3.9/site-packages/IPython/extensions
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/site-packages
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/externals
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/site-packages
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/coreapps
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ee_plugin/extlibs_linux
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/timeseriesviewerplugin/eotimeseriesviewer
- /home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/apps
-
Can this be reproduced using the testdata? What steps?
-
reporter Why am I having a greyscale display in this case?
-
reporter Using enmap_berlin.bsq
Open Spectral Library
Select Layer enmap_berl.bsq
Immediately:
2022-01-18T11:11:14 WARNING warning:/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py:3665: DeprecationWarning:
an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
traceback: File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py", line 3583, in onRendererLayerChanged
mBand.setBand(bandNo)
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py", line 3665, in onRendererBandChanged
vmin, vmax = layer.dataProvider().cumulativeCut(
File "/usr/lib/python3.9/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno,Move Red bar, display not updated, get:
2022-01-18T11:12:46 WARNING warning:/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py:3665: DeprecationWarning:
an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
traceback: File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/externals/pyqtgraph/widgets/GraphicsView.py", line 350, in mouseReleaseEvent
super().mouseReleaseEvent(ev)
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/externals/pyqtgraph/GraphicsScene/GraphicsScene.py", line 233, in mouseReleaseEvent
if self.sendDragEvent(ev, final=True):
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/externals/pyqtgraph/GraphicsScene/GraphicsScene.py", line 353, in sendDragEvent
self.dragItem.mouseDragEvent(event)
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/externals/pyqtgraph/graphicsItems/InfiniteLine.py", line 403, in mouseDragEvent
self.sigPositionChangeFinished.emit(self)
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py", line 3620, in onRendererBarChanged
self.mRendererRedBand.setBand(bandNo)
File "/home/alobo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/enmapboxplugin/enmapbox/externals/qps/speclib/gui/spectrallibraryplotwidget.py", line 3665, in onRendererBandChanged
vmin, vmax = layer.dataProvider().cumulativeCut(
File "/usr/lib/python3.9/warnings.py", line 109, in _showwarnmsg
sw(msg.message, msg.category, msg.filename, msg.lineno, -
Why am I having a greyscale display in this case?
Confirmed, a bug. Renderer is updating now after moving the RGB bars.
-
I get an error in the Spectral Library display:
An error has occurred while executing Python code:
TypeError: type NoneType doesn't define __round__ method
Can this be reproduced with the testdata as well? What steps?
-
reporter It happens erratically with hires_berlin2.tif
I observe that if the Data Source is closed, it is still listed in SpectralLibrary/Layer (not sure this is related but is is weird)
-
reporter Could reproduce it: the TypeError occurs if I drag and drop hires_berlin2.tif on the SpectralLibray window. This is obviously a wrong user action,
but a more user-friendly error message should come up.
Surprisingly, this error does not occur if I drag and drop hires_berlin.bsq or enmap_berlin-bsq
-
Yes, when closing a layer that is still selected in the SpectralView, I also get an error (not the same though). I fixed that, maybe it also fixes your problem.
-
Could reproduce it: the TypeError occurs if I drag and drop hires_berlin2.tif on the SpectralLibray window. This is obviously a wrong user action,
Is hires_berlin2.tif a raster you created? If so, please share it for testing.
but a more user-friendly error message should come up.
Yes.
-
reporter Is hires_berlin2.tif a raster you created? If so, please share it for testing.
did I? I don’t remember, it is the same date than the rest. Here I put it anyway:
https://www.dropbox.com/s/q0jyittwsq787ti/hires_berlin2.tif?dl=0
https://www.dropbox.com/s/7vmhmr3mg8h8kf8/hires_berlin2.hdr?dl=0
-
did I? I don’t remember, it is the same date than the rest.
I think so
Anyway, I can confirm, see follow-up issue: https://bitbucket.org/hu-geomatics/enmap-box/issues/928/dropping-raster-layer-on-spectral-view
-
reporter ok. Could you generate a new development version?
- Log in to comment
Not quite sure what you mean with “a sequential display of individual bands”?
Like the RGB bars in the Spectral Plot, but for a single grey or pseudo color band?