I want to modify the colours of an EnviRaster created by a k-means clustering within IDL. I've noticed that the ENVIRasterMetaData within the classified image contains 'CLASS LOOKUP' and 'PALETTE_0' tags which contain byte arrays of [r,g,b] elements for each class.
My problem is that when I try to modify the data stored in 'CLASS LOOKUP' and 'PALETTE_0' using ENVIRasterMetaData.updateItem, the byte array data is stored as a 1-d array of strings. e.g.
byteArray = meta['PALETTE_0']
help, byteArray
BYTE = Array[3, 101]
; Do something to change byte array here
...
meta.updateItem, 'PALETTE_0', byteArray
help, meta['PALETTE_0']
STRING = Array[303]
Is there a way to change the colours of an ENVIRaster class file programmatically? Or is there a way to make my own EnviRaster class file according to my specifications (e.g. classes, colours, data)?
|