Microscopy Image Browser  1.233
All Classes Files Functions Variables Pages
ib_calcCurveLength.m File Reference

Calculate length of the curve objects in the slice. More...

Functions

function STATS = ib_calcCurveLength (slice, pixSize, CC)
 Calculate length of the curve objects in the slice. More...
 

Detailed Description

Calculate length of the curve objects in the slice.

Function Documentation

function STATS = ib_calcCurveLength (   slice,
  pixSize,
  CC 
)

Calculate length of the curve objects in the slice.

It is possible to measure the length of both closed and non-closed curves. The images are subject to thinning, so that the curves have width of 1 pixel.

Parameters
slicea 2D slice [1:height, 1:width], class uint8 with drawn curves.
pixSize[optional] a structure with pixel sizes. The required fields .x and .y; can be empty
CC[optional] a structure with detected labels, returned by regionprops function
Return values
STATSa structure with CurveLengthInPixels or CurveLengthInUnits field that has the length of the curve segment and the PixelIdxList field with indeces of pixels in each segment.
Required fields of CC:
Required fields of pixSize:

Referenced by MaskStatsDlg>runStatAnalysis_Callback().

Here is the caller graph for this function: