File Exchange

image thumbnail

hyperspectral image cube slicer

version 1.4 (245 KB) by

Image slicer to visualize multi-channel image data.



View License

Implementation of an image cube slicer for multi-channel images (eg. hyperspectral-, MRI-, satelite- or any other kind of image data with more than 1 band).

The image cube slicer contains of an image band screen in the left panel, where an image plane is illustrated (either using imshow() or imagesc()). The image plane is selected using a slider tool located below the image plane.
Further, a draggable rectangle area is placed in the center of the image. The right panel illustrates the average data values (as a 1D-plot) for each band of the data cube that correspond to the currently selected rectangle area. Four different rectangle areas can be selected.
In case of hyperspectral images, the right panel plot corresponds to the (average) spectral signal of the current selection.

For machines with low RAM, the image data can optionally be resized to speed up the slicer.

NOTE: if you get the following error:
??? Error using ==> im_cube_slicer at 81
This hg object does not fire this event

Then your Matlab Version is not compatible with the im_cube_slicer.

Comments and Ratings (6)

lucas turrian

Very good tool

Very useful tool. Definitely a must if you work with spectral images in matlab. Something like this was missing in the image processing toolbox.

Timo Eckhard

@Prasad and others wondering: The error results from using Matlab < R2011a, and missing functionalities in this version that I would not know how to omit otherwise. Sorry for that...

Eva M. Valero

Very useful tool for visualizing hyperspectral images

Prasad Kalane

When I run the code(MATLAB 7.8/R2009a) following error comes

??? Error using ==> im_cube_slicer at 81
This hg object does not fire this event

Error in ==> im_cube_slicer_demo at 27
fh = im_cube_slicer(im_norm,lambda,s_factor,'fixed');

how to solve this error...?


Jia (view profile)



previous version was slow. Performance increased. Button for 'no average' in spectral view added to toolbar.


-> zoom in view added.
-> method='cropped' added.
-> toolbar changed.


29.01.2013: initial version
15.02.2013: added the missing description of the input parameter 'lambda' to the function header.

MATLAB Release
MATLAB 7.12 (R2011a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video