vlt.image.stack2tile-writea3Dstackofimagestoa2Dtiledimageset[IM_OUT,STACK_COORDS_IN_TILE]=STACK2TILE(IM_IN,M,N)TakesastackofimagesofsizeXxYxZandcreatesasetoftiledimages.TheZplanesaredistributedfromlefttorightinthetiledimageandthentoptobottom,inanMrowsxNcolumnsarrangement.IftherearemoreZplanesthanM*N,thenadditionaltilesaremade.Thetilesarereturnedasacellarrayof2DmatrixesinIM_OUT.NotethatthetlearrangementorderisthesameastheMatlabSUBPLOTcommand.IfthestackdoesnotexactlycoverthelastMxNtiledimage,thenthatpartoftheimageisfilledwithzeros.STACK_COORDS_IN_TILEisamatrixofrowvectors.EachrowjcontainstheTILE_NUMBER,X_TOP,X_BOTTOM,Y_LEFT,Y_RIGHTcoordinatesofthestackinthetile.Example:IM_IN=zeros(3,4);IM_IN(:,:,2)=64*ones(3,4);IM_IN(:,:,3)=128*ones(3,4);IM_IN(:,:,4)=255*ones(3,4);IM_OUT=vlt.image.stack2tile(IM_IN,1,4);% compare with 2,2% creates a 1x4 tile of the images % compare with 2,2figure;image(IM_OUT{1});colormap(gray(256));