spectralpython / spectral

Python module for hyperspectral image processing
MIT License
571 stars 139 forks source link

how do i display the number of bands in my .hdr file ? #77

Closed BlcaKHat closed 6 years ago

BlcaKHat commented 6 years ago

I want o see all the bands present in my .hdr file. and I want to open it individually. I know it's like a direct question but I am not able to do it.

tboggs commented 6 years ago

If there is band information in the header then it will be in the bands attribute of the opened file (e.g., image.bands). The bands attribute is an instance of a BandInfo object.

If you want to read an entire band, use image.read_band. You can pass the result of that to imshow.