This repository was archived by the owner on Feb 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,23 @@ def compute_placement_hints(
70
70
least one distance-related problem.
71
71
See distances.distance_to_meshes.report_distance_problems doc.
72
72
"""
73
- distances_info = atlas .compute_distances_to_layer_boundaries (
74
- direction_vectors ,
75
- flip_direction_vectors = flip_direction_vectors ,
76
- has_hemispheres = has_hemispheres ,
77
- thalamus_meshes_dir = thalamus_meshes_dir ,
78
- )
73
+
74
+ if thalamus_meshes_dir == "" :
75
+ # Use either the AbstractLayeredAtlas or VoxelBasedLayeredAtlas version if
76
+ # no meshes are provided
77
+ distances_info = atlas .compute_distances_to_layer_boundaries (
78
+ direction_vectors ,
79
+ flip_direction_vectors = flip_direction_vectors ,
80
+ has_hemispheres = has_hemispheres ,
81
+ )
82
+ else :
83
+ # Use the MeshBasedLayeredAtlas version if meshes are provided
84
+ distances_info = atlas .compute_distances_to_layer_boundaries (
85
+ direction_vectors ,
86
+ flip_direction_vectors = flip_direction_vectors ,
87
+ has_hemispheres = has_hemispheres ,
88
+ thalamus_meshes_dir = thalamus_meshes_dir ,
89
+ )
79
90
80
91
distances_to_meshes = distances_info ["distances_to_layer_boundaries" ]
81
92
tolerance = 2.0 * atlas .region .voxel_dimensions [0 ]
You can’t perform that action at this time.
0 commit comments