Code covered by the BSD License  

Highlights from
STATMASK: Overlay image with coloured statistical mask

5.0

5.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 2.62 KB File ID: #40103
image thumbnail

STATMASK: Overlay image with coloured statistical mask

by

 

Overlay an image with a thresholded statistical mask. The mask values are not rescaled.

| Watch this File

File Information
Description

 Overlays a mask of statistics on an image. By default the
   currently displayed figure is overlain.

 First, the underlay is converted to RGB. The statistical overlay
   is upscaled if necessary (using nearest neighbour sampling) to
   match the size of the underlay. Then the RGB data is overlain
   with the statmask, without rescaling of the stat values. This
   allows for inspection of mask values with the data cursor.
 
 The function returns a handle to the overlay mask if requested.

 Notes: Requires freezeColors from the file exchange
        Consider using getclim to help set your colormap limits

 Usage:
   hOv = statmask(stats, [thresh, cmap, clim, cbOpt, hAx])

     stats: matrix representing mask values
    thresh: scalar value of threshold for transparency (default 0)
      cmap: colour-map to use. default flipud(autumn(256))
      clim: limits for color display of stats overlay (default min/max of stats)
     cbOpt: colorbar display: 'on', 'onwest', or 'hidden', else off (default 'on')
       hAx: handle to axes on which to operate (default current axes)

       hOv: handle to overlay image is returned

 Example:
   I = peaks(200);
   bwMask = eye(25).*rand(25);
   figure;
   imshow(I, [], 'Colormap', bone(256), 'InitialMag', 200);
   statmask(bwMask);

Acknowledgements

Freeze Colors / Unfreeze Colors inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
04 Feb 2014 Tim  

Contact us