mango.application.cylinder_fit.cylinder_fit_multi_res

mango.application.cylinder_fit.cylinder_fit_multi_res(input, numcyl, retcylimg=False, resolutions=[128, 256, 1024], metric=None, radius_range_percent=(50.0, 100.0), centre_range_percent=(-8.0, 8.0), metricThreshRelTol=0.25)[source]

Multi-resolution version of cylinder_fit().

Parameters:
  • input (mango.Dds) – Search for cylinder boundaries in the gradient-vector image of this input image.
  • numcyl (mango.Dds) – Number of cylinders to find.
  • retcylimg (bool) – If True, additionally returns a segmented image with the boundary of the cylinder fits labeled from 0 to numcyl-1.
  • resolutions (sequence of int) – The sequence of image shapes for each cylinder fit resolution. Exhaustive search and refinement is performed at the lowest resolution, just refinement at the higher resolutions.
  • metric (CylinderFitGradientMetric) – Metric object used to identify cylinder parameters which indicate the presence of a cylindrical boundary in the input image.
  • radius_range_percent (2 or 3 sequence of float) – Indicates the cylinder-radius exhaustive search grid as (min_percent, max_percent, percent_step). This is a percentage of the minimum input.shape component (i.e. numpy.min(input.shape)). If the percent step size is omitted, then a percent equivalent of 2-voxels is chosen as the step-size.
  • centre_range_percent (2 or 3 sequence of float) – Indicates the cylinder-centre exhaustive search grid as (min_percent, max_percent, percent_step). This is a percentage of the minimum input.shape component (i.e. numpy.min(input.shape)). If the percent step size is omitted, then a percent equivalent of 2-voxels is chosen as the step-size.
  • metricThreshRelTol (float) – Relative tolerance for truncating the exhaustive search metric values. Ignore exhaustive search parameters which give metric values that have relative difference greater than metricThreshRelTol of the best (lowest) metric value in the entire search.
Return type:

list of [metricVal, cylinderParameters] pairs

Returns:

List of pairs pairList = [[metricVal0, cylPrms0], [metricVal1, cylPrms1], ...] where cylPrms0=[[centrez0, centrey0, centrex0], radius0, axisLength0, [axisz0, axisy0, axisx0]], cylPrms1=[[centrez1, centrey1, centrex1], radius1, axisLength1, [axisz1, axisy1, axisx1]], etc. If retcylimg is True, additionally returns segmented mango.Dds image labeled with cylinder boundaries (i.e. returns pairList, segDds).

Previous topic

mango.application.cylinder_fit.cylinder_fit

This Page