BUNPC / psoct_vessel_graphing

Suite of tools for segmenting vessels from PS-OCT images and then converting the segments to a graph.
1 stars 6 forks source link

vesGraphValidate - unverifiedIdx is not updated #6

Closed mjhyman closed 1 year ago

mjhyman commented 1 year ago

The variable Data.Graph.segInfo.unverifiedIdx is initialized when calling Update Branch Info. When it is initialized, it creates an array of zeros with a length equal to the number of segments (see below).

if ~isfield(Data.Graph,'verifiedSegments') Data.Graph.verifiedSegments = zeros(size(Data.Graph.segInfo.segLen)); end idx = find(Data.Graph.verifiedSegments == 0); Data.Graph.segInfo.unverifiedIdx = idx;

After running "Update Branch Info," I then select a segment to delete and click the two subsequent pop-up windows to add it to the list of segments to delete. When I then click "Trash Deleted Segments," the code breaks in the function "verification_deleteSelectedSegments_Callback" on the line: Data.Graph.segInfo.unverifiedIdx = segMap(Data.Graph.segInfo.unverifiedIdx);

The array "unverifiedIdx" has a length equal to the number of segments. However, the segMap has a smaller length. It appears that the array unverifiedIdx is not updated to reflect the true number of unverified indices.

It is unclear where and how the array unverifiedIdx is supposed to be updated to match the size of segMap.

This bug is blocking the ability to delete segments.

mjhyman commented 1 year ago

This fork will contain the resolution to this issue and issue #2 .

For this reason, this issue is being closed and merged into #2