Skip to content
Snippets Groups Projects
Commit 092de48f authored by Eric Wait's avatar Eric Wait
Browse files

Making polygons will be more intelligent about 2D data

parent e21b8ee9
Branches
No related tags found
No related merge requests found
......@@ -25,6 +25,19 @@ if (~exist('quiet','var') || isempty(quiet))
quiet = false;
end
if (size(pixelList_xy,2)==3)
is3D = true;
else
% this is done because the view must be a 3D kymograph
frames = vertcat(...
repmat(frame-0.5,size(pixelList_xy,1),1),...
repmat(frame+0.5,size(pixelList_xy,1),1));
pixelList_xy = repmat(pixelList_xy,2,1);
pixelList_xy = horzcat(pixelList_xy,frames);
frame = 1;
is3D = false;
end
%reductions = [1,1,1];
polygon = D3d.Polygon.MakeEmptyStruct();
......@@ -65,6 +78,12 @@ end
% center the vert in the middle of the voxel
verts_xy = v_xy + 0.5;
if (~is3D)
minVal = min(verts_xy(:,3));
minMask = verts_xy(:,3)==minVal;
verts_xy(minMask,3) = verts_xy(minMask,3) + 0.45;
verts_xy(~minMask,3) = verts_xy(~minMask,3) - 0.45;
end
com = rp.Centroid + startPadded -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment