DCS-LCSR / CeleST

CeleST - C. elegans Swim Test
4 stars 1 forks source link

Error when Opening 2D Histogram with Sample with no worms #32

Open ch576 opened 8 years ago

ch576 commented 8 years ago

2D Histogram button throws an error when a user tries to plot/calculate 2D histograms if the sample has no worms.

Tested with a one video sample. Video had 4 worms found. All worms were labeled rejected leading to no worms in sample. Adding a video with positive non-rejected worms to the sample caused the error to not appear.

  1. Not Tested for multiple video samples with no worms in the sample (via rejection or no worms)
  2. Not Tested for single or multiple video samples with no worms found during segmentation
ch576 commented 8 years ago

Case 2. Not Tested for single or multiple video samples with no worms found during segmentation: Tested and Resolved - Videos with no worms due to segmentation can no longer have their measures computed in the Compute Measure window. They are thus not selectable in the Show Measures window where samples are chosen, and can't be part of a sample being displayed in a 2D histogram

ch576 commented 8 years ago

Case 1. Tested - With no worms in the sample, attempting to show 2D histograms with this sample leads to an error.

In function show2D plot, called by measure2DSelected (callback for the 2D histogram button), error occurs on line 596 when attempting to assign an empty matrix to index 1 of minValue variable: minValue(1) = min(cell2mat(measures.(listOfMeasures{statToShow(1)}).min));

Presents Error: In an assignment A(I) = B, the number of elements in B and I must be the same.