Changing layer properties.
Once you have opened a data file, by double-clicking on the pink canvas you can choose the option 'Customise'.
NB - this will fail if no dataset is open.
If you select this, you can see data summaries for all the layers of data, and for the raster layers as a set. Clicking the checkbox for any layer shows its details, which can be edited using the text boxes and menus provided. Altered values should be attached to the layer using the 'apply' button at the bottom. A selected layer can be deleted from the dataset using the 'Delete layer' button.
The colour shown in the square to the right is a default colour which has been assigned to this layer when it was read in, and which will be used to represent this data layer in various visualisations, such as animations. This colour can be edited & changed by double-clicking in the coloured square and using the colour chooser which appears.
The 'Options' menu button on the ReadRasterBean shows the various file reading, writing and manipulation which this bean can carry out. These are shown on the menu below.
Linear data scaling.
Data layers can also be scaled quite easily, using some of the other options on the ReadRasterBean. If you have, for example, a whole set of raster layers whose values range between 0 and 100, and want to scale them all to the same 0-1 range, use the 'Scale All'' button and specify the old and new range. Layers can be scaled one at a time, using 'Scale a layer' in the same way.
There are some particular scalings which are very common - for example, changing 0-255 data, from a bitmap, to 0-1 float values representing fractional fuzzy memberships. For this reason there are two extra buttons - '1.0 -> 255' and '255 -> 1.0'. When you pick these options, you can choose one or more data layers to scale.
If you scale one or more layers, and then look at their associated notes in the customiser panel, you will see that the details of the scaling procedure have been added to the notes.
Filtering data layers.
'Filter with kernel' requires a plain ASCII file showing the filter kernel, e.g.
where the first line just contains the filter window size (in this case, 3). You will first be prompted to choose the layers to filter, and then to choose the filter file.
Creating a mask layer.
A mask layer of 0s and 1s can be produced from any other layer, using the option 'Make a mask layer'. This prompts for the layer to be used, and the value in that layer which will be disregarded in the mask layer. For example, choosing this layer, and ignoring the value 255 (white areas) produces the mask below, which blocks out areas of sensor striping, as well as indicating that background pixels should be ignored.
A mask layer is very important where data do not form perfect rectangles. A
scatter plot based on the layers below would contain numerous points plotted at
zero on both axes, and bias any regression analysis, unless the background
points were ignored.
Entropy is a measure of noise which is useful in assessing fuzzy
classifications. The equation used to calculate scaled entropy is
H = -S p(x) log2 p(x) / -log2(1/n).
For any object which has a set of probabilities associated with it (p1, p2, .....), entropy can be calculated. Here, 'p' refers to probability values, but in the case of fuzzy classifications, the fuzzy memberships are used instead. Each pixel is considered in turn, and the entropy within that pixel calculated, giving a value between 0 and 1. High entropy indicates a high degree of mixing or confusion, (e.g. where a pixel has a membership of 0.1 in each of 10 different classes). Low entropy indicates certainty or homogeneity (e.g. a pixel membership of 1 in one class, and 0 in all the others). In a fuzzy classification, high entropy is not necessarily an indication of error; it may show that genuinely mixed areas have been accurately classified. The 'Calculate entropy layer' button allows the production of a new data layer which stores the entropy value calculated from a selected set of data layers.
When you click the button, you'll be prompted first for the type of layer to work on, and then to choose the individual layers. Here is an entropy layer calculated from the 5 fuzzy membership layers in the example data.
Data layers can be combined, pixel by pixel, to produce new layers, using addition, subtraction, multiplication or division. In each case, two data layers are chosen using dialogues, and each pixel value in the first is combined with each pixel value in the second. This can be useful for collapsing together data classes - (for example, adding together cover proportions of two types of vegetation) or for comparing a predicted set of proportions to the reality (e.g. subtracting a fuzzy membership layer from the corresponding verification layer).
You will be prompted to choose the first layer, the operator and the second layer. The resulting data layer will be appended to the end of the list on the pink canvas, and can be quickly viewed by clicking on it.
The data set you have read in contains several fuzzy membership layers. These can be rescaled from their existing values of 0-1 to 0-255. Scale a layer from 0-1 to 0-255, using the 'Scale 0-1-> 0-255' button, and then scale it back, using the 'Scale 0-255->0-1' button. When the layer details are viewed in the customiser, the layer statistics (mean, minimum and maximum) should be the same as the originals (allowing for rounding errors), but details of the two scaling procedures will have been added to the notes.
Entropy and layer arithmetic
To compare the genuine entropy of the scene, and the entropy of the fuzzy classification, produce two new entropy layers, using the 'Calculate Entropy layer' button.
The first should use all the verification layers (select 'Verification data' as the layer type, and check the 'All layers' button on the next dialogue). The second should use all the fuzzy membership layers. Once these new layers have been created, change their names for easy identification (to 'ver_entr' and 'fuz_entr'). Now scale both using the 'Scale a layer' button, so that they contain floating point values running between 0 and 1.0, and create a third layer which subtracts one from the other. This difference layer can be viewed in the next section of the tutorial.
NEXT - 2D surface visualisations