owned this note
owned this note
Published
Linked with GitHub
# sleap-roots
----
- Trait calculations involving the primary root filter for the max primary root length in case more than one primary root is detected
- Dicots vs monocots
- Dicots have very obvious primary root with lateral roots emanating from it
- Monocots (rice) have a primary root, crown roots and lateral/hair roots (not tracked)
- Sometimes, it is desirable to compute traits on the primary root
- Crown roots come from the seed
----
- `Series` class:
"""Data and predictions for a single image series.
Attributes:
`series_name`: Unique identifier for the series.
`h5_path`: Optional path to the HDF5-formatted image series.
`primary_path`: Optional path to the primary root predictions file. At least one
of the primary, lateral, or crown paths must be provided.
`lateral_path`: Optional path to the lateral root predictions file. At least one
of the primary, lateral, or crown paths must be provided.
`crown_path`: Optional path to the crown predictions file. At least one of the
primary, lateral, or crown paths must be provided.
`primary_labels`: Optional `sio.Labels` corresponding to the primary root predictions.
`lateral_labels`: Optional `sio.Labels` corresponding to the lateral root predictions.
`crown_labels`: Optional `sio.Labels` corresponding to the crown predictions.
`video`: Optional `sio.Video` corresponding to the image series.
`csv_path`: Optional path to the CSV file containing the expected plant count.
Methods:
`load`: Load a set of predictions for this series.
`__len__`: Length of the series (number of images).
`__getitem__`: Return labeled frames for predictions.
`__iter__`: Iterator for looping through predictions.
`get_frame`: Return labeled frames for predictions.
`plot`: Plot predictions on top of the image.
`get_primary_points`: Get primary root points.
`get_lateral_points`: Get lateral root points.
`get_crown_points`: Get crown root points.
Properties:
`expected_count`: Fetch the expected plant count for this series from the CSV.
`group`: Group name for the series from the CSV.
`qc_fail`: Flag to indicate if the series failed QC from the CSV.
"""
- `Series.load` classmethod:
"""Load a set of predictions for this series.
Args:
`series_name`: Unique identifier for the series.
`h5_path`: Optional path to the HDF5-formatted image series, which will be
used to load the video.
`primary_path`: Optional path to the primary root '.slp' predictions file.
`lateral_path`: Optional path to the lateral root '.slp' predictions file.
`crown_path`: Optional path to the crown '.slp' predictions file.
`csv_path`: Optional path to the CSV file containing the expected plant count.
Returns:
An instance of Series loaded with the specified predictions.
"""
----
- Needs multiple roots:
- convex hull
- area
- perimeter
- distances between hull vertices
- angles of hull simplices
- root counts
- root width(left index, right index)
- scanlines
- ellipse features
- semi-major axis
- semi-minor axis
- aspect ratio
- angle
- index of root from top
- Single root:
- base point
- x-coordinates
- y-coordinates
- tip point
- x-coordinates
- y-coordinates
- total length
- base-to-tip line length
- base-to-tip angle
- base to first node angle
- Problems for monocots:
- root widths
- bases
- index of root from top
----
# DicotPipeline
Metadata
- plant_name: series name
- frame: frame index, 72 frames in total, 0 to 71
Scalar traits (25)
- primary_angle_proximal: primary root angle with base node and proximal node
- primary_angle_distal: primary root angle with base node and distal node
- primary_distal_pt: the very distal point, if the last one is invisible, use the last second point
- primary_length: length of primary root
- primary_base_tip_dist: primary root base to tip distance
- lateral_count: number of lateral roots
- curve_index: primary root curvature index
- primary_tip_pt: the tip of the primary root, if invisible, curve_index should be nan
- base_length: top and deepest bases distance y-axis
- base_length_ratio: ratio of top-deep length to primary root length
- primary_tip_pt_y: tip of primary root in y axis
- base_median_ratio: ratio of median value in all lateral base points to tip of primary root in y axis
- base_ct_density: number of base points to maximum primary root length
- chull_perimeter: perimeter of convex hull
- chull_area: area of convex hull
- chull_max_width: maximum width of convex hull
- chull_max_height: maxinum height of convex hull
- ellipse_a: semi-major axis length of the fitted ellipse
- ellipse_b: semi-minor axis length of the fitted ellipse
- ellipse_ratio: ratio of the major to minor lengths
- network_length: total root length (primary + lateral)
- network_width_depth_ratio: width-to-depth ratio of bounding box for root network
- network_solidity: total root length divided by the convex hull area
- network_length_lower: total root length in the lower fraction (2/3)
- network_distribution_ratio: ratio of the root length in the lower fraction (2/3) over total root length
- scanline_first_ind: index of the first scanline that intersects with roots
- scanline_last_ind: index of the last scanline that intersects with roots
Non-scalar traits (10)
- lateral_angles_proximal: lateral root angle with proximal node among all lateral roots within one frame
- lateral_angles_distal: lateral root angle with distal node among all lateral roots within one frame
- lateral_lengths: lengths of lateral roots
- root_widths: array of root widths based on paired lateral root bases
- root_widths_inds: array of indices of matched base pairs for root width calculation (not included in csv)
- root_widths_left_bases: array of coordinates of left bases used for root widths calculation (not included in csv)
- root_widths_right_bases: array of coordinates of right bases used for root widths calculation (not included in csv)
- lateral_base_xs: x-coordinate of each lateral root base point
- lateral_base_ys: y-coordinate of each lateral root base point
- lateral_tip_xs: x-coordinate of each lateral root tip point
- lateral_tip_ys: y-coordinate of each lateral root tip point
- chull_line_lengths: lengths of lines connecting any two vertices on the convex hull
- scanline_intersection_counts: number of intersection with the roots at each scanline
Summary functions (9)
- min
- max
- mean
- median
- std
- p5
- p25
- p75
- p95
25 + 10 * 9 = 115 traits (per frame)
115 * 9 = 1035 traits (per plant)
```mermaid
graph LR
primary_pts --> primary_max_length_pts
lateral_pts --> root_widths
lateral_pts --> lateral_count
lateral_pts --> lateral_proximal_node_inds
lateral_pts --> lateral_distal_node_inds
lateral_pts --> lateral_lengths
lateral_pts --> lateral_base_pts
lateral_pts --> lateral_tip_pts
lateral_pts --> pts_list
lateral_pts --> pts_all_array
lateral_pts --> lateral_angles_distal
lateral_pts --> lateral_angles_proximal
lateral_pts --> network_length_lower
pts_all_array --> ellipse
pts_all_array --> bounding_box
pts_all_array --> convex_hull
primary_max_length_pts --> pts_all_array
primary_max_length_pts --> primary_proximal_node_ind
primary_max_length_pts --> primary_angle_proximal
primary_max_length_pts --> primary_distal_node_ind
primary_max_length_pts --> primary_angle_distal
primary_max_length_pts --> primary_length
lateral_distal_node_inds --> lateral_angles_distal
lateral_proximal_node_inds --> lateral_angles_proximal
primary_max_length_pts --> primary_base_pt
primary_max_length_pts --> primary_tip_pt
primary_max_length_pts --> root_widths
primary_max_length_pts --> pts_list
primary_max_length_pts --> network_length_lower
lateral_base_pts --> lateral_base_xs
lateral_base_pts --> lateral_base_ys
lateral_base_pts --> base_ct_density
lateral_tip_pts --> lateral_tip_xs
lateral_tip_pts --> lateral_tip_ys
lateral_lengths --> network_distribution_ratio
lateral_lengths --> network_length
primary_proximal_node_ind --> primary_angle_proximal
primary_distal_node_ind --> primary_angle_distal
primary_base_pt --> primary_base_pt_y
primary_tip_pt --> primary_tip_pt_y
primary_base_pt --> primary_base_tip_dist
primary_tip_pt --> primary_base_tip_dist
ellipse --> ellipse_a
ellipse --> ellipse_b
bounding_box --> network_width_depth_ratio
bounding_box --> network_length_lower
convex_hull --> chull_perimeter
convex_hull --> chull_area
convex_hull --> chull_max_width
convex_hull --> chull_max_height
convex_hull --> chull_line_lengths
lateral_base_ys --> base_length
lateral_base_ys --> base_median_ratio
primary_length --> curve_index
primary_length --> base_length_ratio
primary_length --> base_ct_density
primary_length --> network_distribution_ratio
primary_length --> network_length
pts_list --> scanline_intersection_counts
primary_tip_pt_y --> base_median_ratio
primary_base_tip_dist --> curve_index
ellipse --> ellipse_ratio
scanline_intersection_counts --> scanline_last_ind
scanline_intersection_counts --> scanline_first_ind
chull_area --> network_solidity
network_length --> network_solidity
network_length_lower --> network_distribution_ratio
base_length --> base_length_ratio
```
----
# YoungerMonocotPipeline
- At 3 DAG the primary and crown roots are distinct. We train one model on primary roots and another for primary + crown roots--we will refer to this class as the `crown` roots for brevity.
Metadata
- plant_name: series name
- frame: frame index, 72 frames in total, 0 to 71
Scalar traits (21)
- primary_angle_proximal: primary root angle with base node and proximal node
- primary_angle_distal: primary root angle with base node and distal node
- primary_distal_pt: the very distal point, if the last one is invisible, use the last second point
- primary_length: length of primary root
- primary_base_tip_dist: primary root base to tip distances
- crown_count: number of crown roots
- curve_index: primary root curvature index
- primary_tip_pt: the tip of the primary root, if invisible, curve_index should be nan
- primary_tip_pt_y: tip of primary root in y axis
- chull_perimeter: perimeter of convex hull
- chull_area: area of convex hull
- chull_max_width: maximum width of convex hull
- chull_max_height: maxinum height of convex hull
- ellipse_a: semi-major axis length of the fitted ellipse
- ellipse_b: semi-minor axis length of the fitted ellipse
- ellipse_ratio: ratio of the major to minor lengths
- network_length: total root length (crown)
- network_width_depth_ratio: width-to-depth ratio of bounding box for root network
- network_solidity: total root length divided by the convex hull area
- network_length_lower: total root length in the lower fraction (2/3)
- network_distribution_ratio: ratio of the root length in the lower fraction (2/3) over total root length
- scanline_first_ind: index of the first scanline that intersects with roots
- scanline_last_ind: index of the last scanline that intersects with roots
Non-scalar traits (8)
- crown_angles_proximal: crown root angle with proximal node among all crown roots within one frame
- crown_angles_distal: crown root angle with distal node among all crown roots within one frame
- crown_lengths: lengths of crown roots
- crown_base_tip_dists: crown root base to tip distances
- crown_curve_indices: curvature index for each crown roots in a frame
- crown_tip_pt_xs: x-coordinate of each crown root tip point
- crown_tip_pt_ys: y-coordinate of each crown root tip point
- chull_line_lengths: lengths of lines connecting any two vertices on the convex hull
- scanline_intersection_counts: number of intersection with the roots at each scanline
Summary functions (9)
- min
- max
- mean
- median
- std
- p5
- p25
- p75
- p95
21 + 9 * 9 = 102 traits (per frame)
102 * 9 = 918 traits (per plant)
```mermaid
graph LR
primary_pts --> primary_max_length_pts
crown_pts --> crown_count
crown_pts --> crown_proximal_node_inds
crown_pts --> crown_distal_node_inds
crown_pts --> crown_lengths
crown_pts --> crown_base_pts
crown_pts --> crown_tip_pts
crown_pts --> scanline_intersection_counts
crown_pts --> pts_all_array
crown_pts --> crown_angles_distal
crown_pts --> crown_angles_proximal
crown_pts --> network_length_lower
pts_all_array --> ellipse
pts_all_array --> bounding_box
pts_all_array --> convex_hull
primary_max_length_pts --> primary_proximal_node_ind
primary_max_length_pts --> primary_angle_proximal
primary_max_length_pts --> primary_distal_node_ind
primary_max_length_pts --> primary_angle_distal
primary_max_length_pts --> primary_length
crown_distal_node_inds --> crown_angles_distal
crown_proximal_node_inds --> crown_angles_proximal
primary_max_length_pts --> primary_base_pt
primary_max_length_pts --> primary_tip_pt
primary_max_length_pts --> network_length_lower
crown_tip_pts --> crown_tip_xs
crown_tip_pts --> crown_tip_ys
crown_lengths --> network_distribution_ratio
crown_lengths --> network_length
crown_tip_pts --> crown_base_tip_dists
crown_base_pts --> crown_base_tip_dists
crown_lengths --> crown_curve_indices
crown_base_tip_dists --> crown_curve_indices
primary_proximal_node_ind --> primary_angle_proximal
primary_distal_node_ind --> primary_angle_distal
primary_tip_pt --> primary_tip_pt_y
primary_base_pt --> primary_base_tip_dist
primary_tip_pt --> primary_base_tip_dist
ellipse --> ellipse_a
ellipse --> ellipse_b
bounding_box --> network_width_depth_ratio
bounding_box --> network_length_lower
convex_hull --> chull_perimeter
convex_hull --> chull_area
convex_hull --> chull_max_width
convex_hull --> chull_max_height
convex_hull --> chull_line_lengths
primary_length --> curve_index
primary_base_tip_dist --> curve_index
ellipse --> ellipse_ratio
scanline_intersection_counts --> scanline_last_ind
scanline_intersection_counts --> scanline_first_ind
chull_area --> network_solidity
network_length --> network_solidity
network_length_lower --> network_distribution_ratio
```
----
# OlderMonocotPipeline
- At 10 DAG the primary and crown roots are very similar. We only use one root class to detect primary and crown roots at this age. We will refer to this class as the `crown` roots for brevity.
Metadata
- plant_name: series name
- frame: frame index, 72 frames in total, 0 to 71
Scalar traits (15)
- crown_count: number of crown roots
- chull_perimeter: perimeter of convex hull
- chull_area: area of convex hull
- chull_max_width: maximum width of convex hull
- chull_max_height: maximum height of convex hull
- ellipse_a: semi-major axis length of the fitted ellipse
- ellipse_b: semi-minor axis length of the fitted ellipse
- ellipse_ratio: ratio of the major to minor lengths
- network_length: sum of crown root lengths per frame
- network_width_depth_ratio: width-to-depth ratio of bounding box for root network
- network_solidity: total root length divided by the convex hull area
- network_length_lower: total root length in the lower fraction (2/3)
- network_distribution_ratio: ratio of the root length in the lower fraction (2/3) over total root length
- scanline_first_ind: index of the first scanline that intersects with roots
- scanline_last_ind: index of the last scanline that intersects with roots
- angle_chull_r1_left_intersection_vector: angle from gravity vector to vector made by r0 to r1 on the left side of a crown root system
- angle_chull_r1_right_intersection_vector: angle from gravity vector to vector made by r0 to r1 on the right side of a crown root system
- chull_area_above_r1_intersection
- chull_area_below_r1_intersection
Non-scalar traits (8)
- curve_indices: crown root curvature index for all crown roots in one frame
- crown_tip_pt: the tip of the crown root, if invisible, curve_index should be nan
- crown_angles_proximal: crown root angle with proximal node for all crown roots in one frame
- crown_angles_distal: crown root angle with distal node for all crown roots in one frame
- crown_lengths: lengths of crown roots
- crown_tip_xs: x-coordinate of each crown root tip point
- crown_tip_ys: y-coordinate of each crown root tip point
- chull_lengths: lengths of lines connecting any two vertices on the convex hull
- scanline_intersection_counts: number of intersection with the roots at each scanline
Summary functions (9)
- min
- max
- mean
- median
- std
- p5
- p25
- p75
- p95
15 + 10 * 9 = 225 traits (per frame)
216 * 9 = 2025 traits (per plant)
```mermaid
graph LR
crown_pts --> crown_count
crown_pts --> crown_proximal_node_inds
crown_pts --> crown_distal_node_inds
crown_pts --> crown_lengths
crown_pts --> crown_base_pts
crown_pts --> crown_tip_pts
crown_pts --> crown_angles_distal
crown_pts --> crown_angles_proximal
crown_pts --> network_length_lower
crown_pts --> crown_r1_pts
crown_pts --> chull_areas_r1_intersection
crown_pts --> scanline_intersection_counts
crown_pts --> ellipse
crown_pts --> bounding_box
crown_pts --> convex_hull
crown_pts --> chull_r1_intersection_vectors
crown_distal_node_inds --> crown_angles_distal
crown_proximal_node_inds --> crown_angles_proximal
crown_tip_pts --> crown_tip_xs
crown_tip_pts --> crown_tip_ys
crown_tip_pts --> crown_base_tip_dists
crown_lengths --> network_length
crown_base_pts --> crown_base_tip_dists
crown_lengths --> crown_curve_indices
crown_r1_pts --> chull_areas_r1_intersection
ellipse --> ellipse_a
ellipse --> ellipse_b
bounding_box --> network_width_depth_ratio
bounding_box --> network_length_lower
convex_hull --> chull_perimeter
convex_hull --> chull_area
convex_hull --> chull_max_width
convex_hull --> chull_max_height
convex_hull --> chull_line_lengths
convex_hull --> chull_areas_r1_intersection
ellipse --> ellipse_ratio
scanline_intersection_counts --> scanline_last_ind
scanline_intersection_counts --> scanline_first_ind
crown_r1_pts --> chull_r1_intersection_vectors
crown_base_pts --> chull_r1_intersection_vectors
network_length --> network_solidity
network_length --> network_distribution_ratio
crown_base_tip_dists --> crown_curve_indices
chull_area --> network_solidity
network_length_lower --> network_distribution_ratio
chull_areas_r1_intersection --> chull_area_above_r1_intersection
chull_areas_r1_intersection --> chull_area_below_r1_intersection
chull_r1_intersection_vectors --> chull_r1_left_intersection_vector
chull_r1_intersection_vectors --> chull_r1_right_intersection_vector
chull_r1_left_intersection_vector --> angle_chull_r1_left_intersection_vector
chull_r1_right_intersection_vector --> angle_chull_r1_right_intersection_vector
```
----
# MultipleDicotPipeline
This pipeline is meant to be used when the number of primary roots per image is known. This information is used to select the frames that have the correct number of primary roots only.
Metadata
- plant_name: series name
- frame: frame index, 72 frames in total, 0 to 71
Scalar traits (2)
- scanline_first_ind: index of the first scanline that intersects with roots for multiple plants
- scanline_last_ind: index of the last scanline that intersects with roots for multiple plants
Non-scalar traits (33)
- primary_angles_proximal: primary root angle with base node and proximal node
- primary_angles_distal: primary root angle with base node and distal node
- primary_distal_pts: the very distal point, if the last one is invisible, use the last second point
- primary_lengths: length of primary root
- primary_base_tip_dists: primary root base to tip distance
- lateral_counts: number of lateral roots
- curve_indices: primary root curvature index
- primary_tip_pts: the tip of the primary root, if invisible, curve_index should be nan
- base_lengths: top and deepest bases distance y-axis
- base_length_ratios: ratio of top-deep length to primary root length
- primary_tip_pt_ys: tip of primary root in y axis
- base_median_ratios: ratio of median value in all lateral base points to tip of primary root in y axis
- base_ct_densitys: number of base points to maximum primary root length
- chull_perimeters: perimeter of convex hull of individual plant
- chull_areas: area of convex hull of individual plant
- chull_max_widths: maximum width of convex hull of individual plant
- chull_max_heights: maximum height of convex hull of individual plant
- ellipse_as: semi-major axis length of the fitted ellipse of individual plant
- ellipse_bs: semi-minor axis length of the fitted ellipse of individual plant
- ellipse_ratios: ratio of the major to minor lengths of individual plant
- network_lengths: total root length (primary + lateral) of individual plant
- network_width_depth_ratios: width-to-depth ratio of bounding box for root network of individual plant
- network_solidities: total root length divided by the convex hull area of individual plant
- network_length_lowers: total root length in the lower fraction (2/3) of individual plant
- network_distribution_ratios: ratio of the root length in the lower fraction (2/3) over total root length of individual plant
- lateral_angles_proximal: lateral root angle with proximal node among all lateral roots within one frame
- lateral_angles_distal: lateral root angle with distal node among all lateral roots within one frame
- lateral_lengths: lengths of lateral roots
- lateral_base_xs: x-coordinate of each lateral root base point
- lateral_base_ys: y-coordinate of each lateral root base point
- lateral_tip_xs: x-coordinate of each lateral root tip point
- lateral_tip_ys: y-coordinate of each lateral root tip point
- chull_line_lengths: lengths of lines connecting any two vertices on the convex hull
- scanline_intersection_counts: number of intersection with the roots at each scanline for multiple plants
Summary functions (9)
- min
- max
- mean
- median
- std
- p5
- p25
- p75
- p95
25 + 10 * 2 = 45 traits (per frame)
45 * 9 = 405 traits (per plant)
```mermaid
graph LR
primary_pts --> primary_pts_no_nans
lateral_pts --> lateral_pts_no_nans
primary_pts_no_nans --> plantwise_associations
lateral_pts_no_nans --> plantwise_associations
plantwise_associations --> associated_primary_pts
plantwise_associations --> associated_lateral_pts
plantwise_associations --> plantwise_pts_arrays
associated_lateral_pts --> lateral_counts
associated_lateral_pts --> lateral_proximal_node_inds
associated_lateral_pts --> lateral_distal_node_inds
associated_lateral_pts --> lateral_lengths
associated_lateral_pts --> lateral_base_pts
associated_lateral_pts --> lateral_tip_pts
associated_lateral_pts --> scanline_intersection_counts
associated_lateral_pts --> lateral_angles_distal
associated_lateral_pts --> lateral_angles_proximal
associated_lateral_pts --> network_length_lower
associated_primary_pts --> primary_proximal_node_inds
associated_primary_pts --> primary_angles_proximal
associated_primary_pts --> primary_distal_node_inds
associated_primary_pts --> primary_angles_distal
associated_primary_pts --> primary_lengths
associated_primary_pts --> primary_base_pts
associated_primary_pts --> primary_tip_pts
associated_primary_pts --> scanline_intersection_counts
associated_primary_pts --> network_lengths_lower
plantwise_pts_arrays --> ellipses
plantwise_pts_arrays --> bounding_boxes
plantwise_pts_arrays --> convex_hulls
lateral_distal_node_inds --> lateral_angles_distal
lateral_proximal_node_inds --> lateral_angles_proximal
lateral_base_pts --> lateral_base_xs
lateral_base_pts --> lateral_base_ys
lateral_base_pts --> base_ct_densities
lateral_tip_pts --> lateral_tip_xs
lateral_tip_pts --> lateral_tip_ys
lateral_lengths --> network_distributions_ratio
lateral_lengths --> network_lengths
primary_proximal_node_inds --> primary_angles_proximal
primary_distal_node_inds --> primary_angles_distal
primary_base_pts --> primary_base_pt_ys
primary_tip_pts --> primary_tip_pt_ys
primary_base_pts --> primary_base_tip_dists
primary_tip_pts --> primary_base_tip_dists
ellipses --> ellipse_as
ellipses --> ellipse_bs
bounding_boxes --> network_width_depth_ratios
bounding_boxes --> network_lengths_lower
convex_hulls --> chull_perimeters
convex_hulls --> chull_areas
convex_hulls --> chull_max_widths
convex_hulls --> chull_max_heights
convex_hulls --> chull_line_lengths
lateral_base_ys --> base_lengths
lateral_base_ys --> base_median_ratios
primary_lengths --> curve_indices
primary_lengths --> base_length_ratios
primary_lengths --> base_ct_densities
primary_lengths --> network_distribution_ratios
primary_lengths --> network_lengths
primary_tip_pt_ys --> base_median_ratios
primary_base_tip_dists --> curve_indices
ellipses --> ellipse_ratios
scanline_intersection_counts --> scanline_last_inds
scanline_intersection_counts --> scanline_first_inds
chull_areas --> network_solidities
network_lengths --> network_solidities
network_length_lowers --> network_distribution_ratios
base_lengths --> base_length_ratios
```
----
# PrimaryRootPipeline
This pipeline is meant to be used when the number of primary roots per image is known. This information is used to select the frames that have the correct number of primary roots only.
Metadata
- plant_name: series name
- frame: frame index, 72 frames in total, 0 to 71
Scalar traits (2)
- scanline_first_ind: index of the first scanline that intersects with roots
- scanline_last_ind: index of the last scanline that intersects with roots
Non-scalar traits (8)
- primary_angles_proximal: primary root angle with base node and proximal node
- primary_angles_distal: primary root angle with base node and distal node
- primary_distal_pts: the very distal point, if the last one is invisible, use the last second point
- primary_lengths: length of primary root
- primary_base_tip_dists: primary root base to tip distance
- curve_indices: primary root curvature index
- primary_tip_pts: the tip of the primary root, if invisible, curve_index should be nan
- primary_tip_pt_ys: tip of primary root in y axis
- primary_base_pt_ys: tip of primary root in y axis
- scanline_intersection_counts: number of intersection with the roots at each scanline
```mermaid
graph LR
primary_pts --> filtered_primary_pts
filtered_primary_pts --> primary_proximal_node_inds
filtered_primary_pts --> primary_angles_proximal
filtered_primary_pts --> primary_distal_node_inds
filtered_primary_pts --> primary_angles_distal
filtered_primary_pts --> primary_lengths
filtered_primary_pts --> primary_base_pts
filtered_primary_pts --> primary_tip_pts
filtered_primary_pts --> scanline_intersection_counts
primary_proximal_node_inds --> primary_angles_proximal
primary_distal_node_inds --> primary_angles_distal
primary_base_pts --> primary_base_pt_ys
primary_tip_pts --> primary_tip_pt_ys
primary_base_pts --> primary_base_tip_dists
primary_tip_pts --> primary_base_tip_dists
primary_lengths --> curve_indices
primary_base_tip_dists --> curve_indices
scanline_intersection_counts --> scanline_last_inds
scanline_intersection_counts --> scanline_first_inds
```
----