mosta02 commited on
Commit
f2226ea
·
verified ·
1 Parent(s): 8d8435f

Upload centerline_extraction.py

Browse files
Files changed (1) hide show
  1. centerline_extraction.py +3 -3
centerline_extraction.py CHANGED
@@ -764,7 +764,7 @@ def extract_branch_centerline(branch_info, main_centerline_polydata, surface_pol
764
 
765
  # Clip full segmentation surface to a local region covering only the artery for faster processing during voronoi centerline extraction of that branch
766
  clipped_surface = clip_surface_around_points(surface_polydata, branch_endpoint, contact_point, radius_multiplier=1.25)
767
- clipped_surface = decimate_surface_for_voronoi(clipped_surface, target_points=15000)
768
 
769
  # Extract the branch centerline
770
  try:
@@ -843,11 +843,11 @@ def extract_centerline_data(centerlines, branch_junctions=None):
843
 
844
  # Adds segment fork points (segment diverges) to all_bifurcations, useful for When VMTK produces only few long cells that share the entire aorta which ruins polydata
845
  bifurcation_ids = {b['id'] for b in all_bifurcations}
846
- fork_pts = find_segment_fork_points(segments, point_to_segments)
847
  for fp in fork_pts:
848
  if fp['id'] not in bifurcation_ids and fp.get('radius', 0) >= 1.0:
849
  all_bifurcations.append({'id': fp['id'], 'x': fp['x'], 'y': fp['y'], 'z': fp['z'], 'radius': fp['radius']})
850
- bifurcation_ids.add(fp['id'])
851
 
852
  # Splits diverging segments at all bifurcations into smaller sub segments that can be modified independently
853
  segments, point_to_segments = split_segments_at_bifurcations(segments, bifurcation_ids)
 
764
 
765
  # Clip full segmentation surface to a local region covering only the artery for faster processing during voronoi centerline extraction of that branch
766
  clipped_surface = clip_surface_around_points(surface_polydata, branch_endpoint, contact_point, radius_multiplier=1.25)
767
+ #clipped_surface = decimate_surface_for_voronoi(clipped_surface, target_points=15000)
768
 
769
  # Extract the branch centerline
770
  try:
 
843
 
844
  # Adds segment fork points (segment diverges) to all_bifurcations, useful for When VMTK produces only few long cells that share the entire aorta which ruins polydata
845
  bifurcation_ids = {b['id'] for b in all_bifurcations}
846
+ """fork_pts = find_segment_fork_points(segments, point_to_segments)
847
  for fp in fork_pts:
848
  if fp['id'] not in bifurcation_ids and fp.get('radius', 0) >= 1.0:
849
  all_bifurcations.append({'id': fp['id'], 'x': fp['x'], 'y': fp['y'], 'z': fp['z'], 'radius': fp['radius']})
850
+ bifurcation_ids.add(fp['id'])"""
851
 
852
  # Splits diverging segments at all bifurcations into smaller sub segments that can be modified independently
853
  segments, point_to_segments = split_segments_at_bifurcations(segments, bifurcation_ids)