If you make assumptions about the ordering of your points (say they are arranged in a clockwork order that they appear in the polygon) you could extrude the outline using the following example 'extrudeROI(x,y,d)' where d is the extrusion depth and x and y are the coordinates of your ordered point set:
function [pts,edges] = ROI2DtoPoly(x,y)
%ROI2DtoPoly converts an ordered set of points to a 2D polygon
% you can draw the set of points using the function [binaryMaskn1, x, y] = roipoly
pts = [x,y];
edges = [1:length(x);[2:length(x),1]]'; %the connectivity list of x and y should be ordered
end
function [pts,edges,tri] = extrudeROI(x,y,d)
%extrudeROI create an extruded 3D polygon of height d from an ROI drawn using: [binaryMaskn1, x, y] = roipoly
[bpts,bdg] = ROI2DtoPoly(x,y);
tpts = bpts;
tdg = bdg;
%add in third dimension
bpts3d = cat(2,tpts,zeros(length(x),1));
tpts3d = cat(2,bpts,ones(length(x),1)*d);
%create 3d points structure
pts = [bpts3d; tpts3d];
%fix the connectivity by offsetting one face's connectivity and adding side connector
tdg = tdg+length(x); %edges will be for points at the top
%define two triangulation edges, (v)ertical (d)iagonal [(b)ase is implied]
%vertical edges
sdgv = [1:length(x);(1:length(x))+length(x)]'; %connect the sides (extrude)
%diagonal edges
sdgd = [1:length(x);mod((1:length(x)),length(x))+length(x)+1]'; %construct connectivity list (diagonals, assumes closed poly)
%all edges
edges = [bdg; tdg; sdgv; sdgd]; %all edges, but not triangulation.
%triangulation
tri = [[sdgv,sdgd(:,2)];[sdgd,[2:length(x),1]']];%[lower triangles;upper triangles]
end