function pixelcontrol = pixelcontrolstruct(in1,in2,in3,in4,in5)
% pixelcontrolstruct
% returns pixel control structure
% if no inputs are passed in, send out a default value
% if 5 inputs are passed in, use those as the struct values

%#codegen



narginchk(0,5);

% default
pixelcontrol = struct('hStart',true,'hEnd',false,...
                      'vStart',true,'vEnd',false,...
                      'valid',true); 
coder.cstructname(pixelcontrol,'pixelcontrol');

if nargin > 0
    pixelcontrol.hStart = logical(in1);
end
if nargin > 1
    pixelcontrol.hEnd = logical(in2);
end
if nargin > 2
    pixelcontrol.vStart = logical(in3);
end
if nargin > 3
    pixelcontrol.vEnd = logical(in4);
end
if nargin > 4
    pixelcontrol.valid = logical(in5);
end


end % pixelcontrolstruct
