Direct data loading
Within the MATLAB version one can use Mirone as an advantageous replacement of the ML image or imshow functions. This can be done using one of the three following modes:
- mirone file_name (this works with many different formats, as long as it possible to find out what is in "file_name")
- mirone(Z) Where Z is an array of any data type. Uint8 or logical arrays are treated as images. ‘Upper’ types (e.g. Int16, single, doubles) are scaled to uint8 to derive and image and the underlying data is stored in memory to be accessed when needed.
- mirone(Z, struc) Z as above and "struc" is a structure with coordinates information. The "struc" structure has optional and mandatory fields. Bellow is a description of those fields and what they should contain depending the cases of use.
- struc.geog -> = 1 (geog) or = 0 (other coords) (To inform if coordinates are geographical or other)
- struc.cmap -> contains a Matlab [Mx3] colormap (Color map)
- struc.name -> 'Whatever you like' (Figure name)
- struc.srsWKT -> a projection WKT string as the ones used by GDAL (If you know the projection in terms of a WKT (Well Known (by who?) Text).
(Related Note, the ogrproj MEX file lets you convert a Proj4 projection string into a WKT string example:
strWKT = ogrproj('+proj=merc')
- struc.head -> An header [1 x 9] array which contents are:
[x_min x_max y_min y_max z_min z_max 0 x_inc y_inc];
The zero (7th element) indicates that grid registration is used.
- struc.X and struc.Y - Where we have two cases:
- The input array is of type uint8 and contains an image, than:
struc.X = [x_min x_max]
struc.Y = [y_min y_max]
- The input array is of type int16 or float (single or double), than:
struc.X = linspace(x_min, x_max, n_columns)
struc.Y = linspace(y_min, y_max, n_rows)
Where [n_rows, n_columns] = size(Z);
Copyright © <2010>, <Joaquim Luis>
Created with the Freeware Edition of HelpNDoc: Easily create HTML Help documents