Share 
Follow 
AboutDownloadsDocumentsForumsIssuesNews
Date:
2022-06-15 19:04
Priority:
3
State:
Open
Submitted by:
Nobody
Assigned to:
Nobody (None)
Summary:
Pillmesh index error when cells go off edge of field of view

Detailed description
When calculating a pill mesh, it is possible for the calculation of the bounding box of a cell to go slightly below 1 or slightly above the size of the image matrix. This leads to an index error when extracting that bounding box from the larger image.

We fixed the error by changing the code in get_pillmesh_profile.m as follows:

%get bounding box of polygon
s = size(im_mat)
x_l=max(floor(min(X)), 1);
x_r=min(ceil(max(X)), s(2));

y_d=max(floor(min(Y)), 1);
y_u=min(ceil(max(Y)), s(1));


Let me know if there's a repository I can submit a pull request against and I would be happy to do so.

- Adam Strandberg
Fellow, Garner Lab

Add A Comment: Notepad

No Comments Have Been Posted

No Changes Have Been Made to This Item

Feedback