plantcv
plantcv copied to clipboard
New .hdr format for HSI images
Header file has many different keywords compared to those we expect to help with parsing the metadata needed to shape a hyperspectral image data cube. Also, styles of .hdr files have always contained brackets and either =
or :
symbols to separate keys from the metadata. Added functionality will be needed to handle this data format.
I attached hdr files here: HDR.zip
Originally posted by @ahmaduaf in https://github.com/danforthcenter/plantcv/issues/915#issuecomment-1203133334
This header file matches the terminology and format documented here: https://desktop.arcgis.com/en/arcmap/latest/manage-data/raster-and-images/bil-bip-and-bsq-raster-files.htm. They don't really give it a name (like ENVI) but just call it an ASCII text file. But anyhow, it's a format compatible with ArcGIS.
@HaleySchuhl I wanted to ask if it was possible to add functionality to handle the data format and if I could provide any additional files for checking the code? Thank you.
@ahmaduaf thanks for bringing this to my attention. Apologies for not getting back to you sooner. We talked over a few potential solutions but haven't done the testing necessary. We have also debated overhauling the HSI backend but we should be able to get you a solution in the meantime.
Correct me if I'm wrong, but I think @nfahlgren and I were leaning towards breaking up pcv.hypspectral.read_data
to use helper functions to read .hdr files. This would allow us to minimize code redundancy, and add functionality without risking unanticipated errors to the various formats that we already support.
@HaleySchuhl Thanks a lot, i look forward to the solution that let us able to use PlantCV for HSI image data analysis.
Plan of attack: Make alias entries in the header so that new keywords point to the synonymous with the ENVI keywords. Want the dictionary metadata format will be the same. Parse arc gis function would be able to hard code a dictionary to match them up. Add mode to read data, add _parse_arcgis and rename parse envi. ENVI datatype is analogous to NBITS but not equivalent?
Band gap shouldn't be a concern. What is byte order = I? --> Intel (other option would be M).
- assume uint rather than int, and gets determined from NBITS.
- What is CHROMATICCORRECTION True?