% DRAWIDENT Draw overlay image highlighting identifiers of dataset subset % % DRAWIDENT(DATA,SUBSET) % % INPUT % DATA spectral image dataset % SUBSET subset of the image (dataset) to be highlighted % % DESCRIPTION % DRAWIDENT renders the spectral image dataset in a dip_image window. % Then, image pixels corresponding to the data samples in SUBSET dataset % are highlighted by overlaying with the image. % $Id: drawident.m,v 1.2 2005/02/10 15:24:07 pavel Exp $ % Copyright: Pavel Paclik, pavel@ph.tn.tudelft.nl % Faculty of Applied Physics, Delft University of Technology % P.O. Box 5046, 2600 GA Delft, The Netherlands function drawident(data,subset) % render the dataset as a dip image im=data2dip(data); % get idents id=subset.ident; id=[id{:}]; % create an overlay image z=dip_image(zeros(data.objsize),'bin'); % tag the points z(id)=1; % create overlay if length(size(im))==3 im=squeeze(im(:,:,1)); end out=overlay(im,z,[max(im) 0 0])