Skip to content

Commit 9520421

Browse files
feat(cross section): add in_place option
1 parent 47adf00 commit 9520421

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kimimaro/utility.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def cross_sectional_area(
4545
anisotropy:np.ndarray = np.array([1,1,1], dtype=np.float32),
4646
smoothing_window:int = 1,
4747
progress:bool = False,
48+
in_place:bool = False,
4849
) -> Union[Dict[int,Skeleton],List[Skeleton],Skeleton]:
4950
"""
5051
Given a set of skeletons, find the cross sectional area
@@ -72,7 +73,8 @@ def cross_sectional_area(
7273
else:
7374
total = len(skeletons)
7475

75-
all_labels, remapping = fastremap.renumber(all_labels, in_place=True)
76+
all_labels, remapping = fastremap.renumber(all_labels, in_place=in_place)
77+
all_labels = fastremap.refit(all_labels)
7678
all_slices = find_objects(all_labels)
7779

7880
for skel in tqdm(iterator, desc="Labels", disable=(not progress), total=total):

0 commit comments

Comments
 (0)