viewerstretch¶
Module that contains ViewerStretch and StretchRule classes
- class tuiview.viewerstretch.StretchRule(comp, value, ctband, stretch)[source]¶
Class that represents a ‘rule’ and a stretch to be applied when that rule matches. The rule contains information about number of bands in a dataset and how to compare, plus if a dataset has a colour table in a particular band
- class tuiview.viewerstretch.ViewerStretch[source]¶
Class that represents the stretch. Use the methods here to set the type of stretch you want and the bands used
- static deleteFromGDAL(gdaldataset)[source]¶
Remove the stretch entry from this dataset assumed the dataset opened with GA_Update
- static fromGDALFileWithLUT(fname)[source]¶
For reading a GDAL file with stretch and LUT saved. The stretch is read out and setLUTFromGDAL called with this file also
- static fromString(string)[source]¶
Create a ViewerStretch instance from a json encoded string created by toString()
- static fromTextFileWithLUT(fname)[source]¶
For reading a .stretch file. The stretch is read out of the first line and setLUTFromText called with this file also since .stretch files contain both
- static readFromGDAL(gdaldataset)[source]¶
See if there is an entry in the GDAL metadata, and return a ViewerStretch instance, otherwise None
- setAttributeTableSize(size)[source]¶
set with size of attribute table if one exists LUT will then be created with this size set to None for default behaviour