Closed prkyprky closed 6 years ago
There are two ways you can go about modifying a file:
load
method of the BiPFile
object to load the image data into and ndarray
, edit the array, then call envi.save_image.open_memmap
method (pass writable=True
) to return a writable memmap, which acts just like a numpy
array and will write your edits to disk.
Hi everyone,
Could you please help me? I wanna open hyperspectral image as ENVI file (.hdr + .dat) and rewrite some bands. after that save file in same format. Most of the problems I solved, but now. I have problem with this "TypeError: 'BipFile' object does not support item assignment" I've got this response when I wanna use rewriting of the band or if I wanna change the file. Do you know some solution or some advice which help me, please?
Thank you so much. ;-)