neuron_morphology.snap_polygons.types

Module Contents

Functions

ensure_polygon(candidate: PolyType) → Polygon Convert from one of many polygon representations to Polygon
ensure_linestring(candidate: LineType) → LineString Convert from one of many line representations to LineString
ensure_path(candidate: PathType, num_dims: int = 2) → NicePathType Ensure that an input path, which might be a “x,y,x,y” string, is
split_pathstring(pathstring: str, num_dims: int = 2, sep: str = ‘,’) → NicePathType Converts a pathstring (“x,y,x,y…”) to a num_points X num_dims
neuron_morphology.snap_polygons.types.NicePathType
neuron_morphology.snap_polygons.types.PathType
neuron_morphology.snap_polygons.types.PathsType
neuron_morphology.snap_polygons.types.PolyType
neuron_morphology.snap_polygons.types.LineType
neuron_morphology.snap_polygons.types.TransformType
neuron_morphology.snap_polygons.types.MultiPolygonResolverType
neuron_morphology.snap_polygons.types.MultiSurfaceResolvertype
neuron_morphology.snap_polygons.types.ensure_polygon(candidate: PolyType) → Polygon

Convert from one of many polygon representations to Polygon

neuron_morphology.snap_polygons.types.ensure_linestring(candidate: LineType) → LineString

Convert from one of many line representations to LineString

neuron_morphology.snap_polygons.types.ensure_path(candidate: PathType, num_dims: int = 2) → NicePathType

Ensure that an input path, which might be a “x,y,x,y” string, is represented as a list of lists instead.

Parameters:
candidate : input coordinate sequence
num_dims : how manu elements define a coordinate
Returns:
Contents of inputs, with each coordinate a list of float
neuron_morphology.snap_polygons.types.split_pathstring(pathstring: str, num_dims: int = 2, sep: str = ', ') → NicePathType

Converts a pathstring (“x,y,x,y…”) to a num_points X num_dims list of lists of float

Parameters:
pathstring : input coordinate sequence
num_dims : how manu elements define a coordinate
sep : character separating elements
Returns:
Contents of pathstring, with each coordinate a list of float