function im=addRectIm(im,R,T,C)
% addRectIm <add rectangle to rgb images in of thickness T and color C>
% Usage:: out=addRectIm(in,rect,T[10],C[[1,1,1]])
% rect=[H0 V0 dH dV]; 
%

% revision history:
% 03/19/21 Mark D. Shattuck <mds> addRectIm.m

%% Parse Input
if(~exist('T','var') || isempty(T))
	T=10;
end

if(~exist('C','var') || isempty(C))
	C=[1,1,1];
end

%% Main

L1=R(1)+(0:R(3)-1); %1700
L2=R(2)+(0:R(4)-1);
tt=0:T-1;

% R
im(R(2)+tt,L1,1)=C(1);
im(L2,R(1)+tt,1)=C(1);
im(R(2)+R(4)-T+tt,L1,1)=C(1);
im(L2,R(1)+R(3)-T+tt,1)=C(1);

% G
im(R(2)+tt,L1,2)=C(2);
im(L2,R(1)+tt,2)=C(2);
im(R(2)+R(4)-T+tt,L1,2)=C(2);
im(L2,R(1)+R(3)-T+tt,2)=C(2);

% B
im(R(2)+tt,L1,3)=C(3);
im(L2,R(1)+tt,3)=C(3);
im(R(2)+R(4)-T+tt,L1,3)=C(3);
im(L2,R(1)+R(3)-T+tt,3)=C(3);



