docs(tutorials): update notebooks and atlas example to current API - #149
Conversation
- tutorial_Nifty: compute_crop_slice/apply_crop_slice → compute_crop/apply_crop - tutorial_POI: rename calc_centroids_from_subreg_vert → calc_poi_from_subreg_vert, calc_centroids params vert_id/subreg_id → first_stage/second_stage, calc_centroids_labeled_buffered → calc_poi_labeled_buffered - tutorial_Dataset_processing: drop deprecated c_val=0 from ridged_points_from_poi - atlas_poi_transfer_leg example.ipynb/example.py: use run_vibeseg (was run_totalvibeseg), import prep_Atlas/Register_Point_Atlas from atlas_poi_transfer_leg_ct, adapt prep_Atlas to new (seg, ct, out_atlas, ct_atlas, atlas_centroids, atlas_left) signature Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012aiNSCPxTnizYuyTJVScLV
Benchmark comparisonSpeed (wall time per call)baseline Showing the 5 most-changed measurements per case; the rest are collapsed. Rows with a baseline below 3 ms are tagged
|
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
nii_rescale_seg |
3.09 ±0.07 | 3.53 ±0.13 | +14.0% | 0.001 |
nii_load_img |
11.92 ±0.48 | 11.01 ±0.13 | -7.6% | 0.013 |
nii_save |
12.47 ±0.28 | 11.94 ±0.22 | -4.2% | 0.028 |
nii_load_seg |
3.14 ±0.09 | 3.03 ±0.16 | -3.4% | 0.274 |
nii_filter_connected_components |
4.39 ±0.06 | 4.53 ±0.14 | +3.1% | 0.115 |
… 31 more measurements
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_calc_centroids_nocrop |
4.53 ±0.14 | 4.40 ±0.05 | -2.8% | 0.088 |
nii_rescale |
40.69 ±0.36 | 41.65 ±0.17 | +2.3% | 0.004 |
nii_resample_from_to |
42.85 ±0.70 | 43.67 ±0.55 | +1.9% | 0.078 |
nii_erode_msk |
6.38 ±0.21 | 6.46 ±0.26 | +1.3% | 0.539 |
nii_dilate_msk |
124.09 ±0.53 | 125.53 ±0.24 | +1.2% | 0.000 |
poi_calc_poi_from_subreg_vert |
12.91 ±0.15 | 13.01 ±0.45 | +0.8% | 0.393 |
nii_fill_holes |
4.49 ±0.04 | 4.52 ±0.13 | +0.7% | 0.458 |
metric_voxels |
250463.00 ±0.00 | 250463.00 ±0.00 | +0.0% | — |
metric_labels |
3.00 ±0.00 | 3.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
14.51 ±0.00 | 14.51 ±0.00 | +0.0% | — |
nii_apply_crop |
0.57 ±0.03 | 0.84 ±0.05 | +47.6% (noise) | 0.000 |
nii_get_array |
0.04 ±0.00 | 0.06 ±0.01 | +37.1% (noise) | 0.011 |
poi_to_global |
0.20 ±0.02 | 0.26 ±0.02 | +29.9% (noise) | 0.001 |
nii_map_labels |
1.02 ±0.08 | 1.32 ±0.07 | +29.2% (noise) | 0.000 |
nii_extract_label |
0.35 ±0.02 | 0.45 ±0.05 | +26.6% (noise) | 0.005 |
nii_pad_to |
0.64 ±0.03 | 0.80 ±0.07 | +24.8% (noise) | 0.006 |
nii_compute_crop |
0.32 ±0.03 | 0.39 ±0.01 | +22.8% (noise) | 0.000 |
poi_reorient |
0.38 ±0.03 | 0.45 ±0.02 | +19.3% (noise) | 0.019 |
nii_reorient |
0.74 ±0.04 | 0.86 ±0.04 | +17.2% (noise) | 0.001 |
poi_rescale |
0.22 ±0.02 | 0.25 ±0.03 | +17.1% (noise) | 0.019 |
poi_load |
1.25 ±0.05 | 1.07 ±0.03 | -14.8% (noise) | 0.001 |
nii_volumes |
1.81 ±0.02 | 2.08 ±0.05 | +14.8% (noise) | 0.000 |
nii_unique |
0.65 ±0.01 | 0.73 ±0.05 | +12.9% (noise) | 0.012 |
poi_local_to_global_arr |
0.33 ±0.01 | 0.36 ±0.04 | +8.0% (noise) | 0.531 |
nii_center_of_masses |
1.68 ±0.02 | 1.82 ±0.06 | +7.8% (noise) | 0.002 |
nii_get_connected_components |
2.29 ±0.06 | 2.41 ±0.03 | +5.5% (noise) | 0.012 |
poi_map_labels |
0.19 ±0.02 | 0.18 ±0.02 | -5.3% (noise) | 0.085 |
poi_save |
0.45 ±0.03 | 0.43 ±0.05 | -3.7% (noise) | 0.469 |
poi_resample_from_to |
0.71 ±0.03 | 0.69 ±0.02 | -3.1% (noise) | 0.103 |
poi_calc_centroids |
2.46 ±0.06 | 2.40 ±0.05 | -2.4% (noise) | 0.096 |
nii_set_dtype |
0.51 ±0.06 | 0.51 ±0.03 | +0.5% (noise) | 0.850 |
ct_2d — shape (73, 47, 1)
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
nii_rescale |
5.61 ±0.09 | 5.69 ±0.09 | +1.4% | 0.282 |
nii_resample_from_to |
7.70 ±0.12 | 7.80 ±0.20 | +1.3% | 0.815 |
nii_dilate_msk |
15.16 ±0.17 | 14.99 ±0.11 | -1.2% | 0.267 |
metric_voxels |
3431.00 ±0.00 | 3431.00 ±0.00 | +0.0% | — |
metric_labels |
3.00 ±0.00 | 3.00 ±0.00 | +0.0% | — |
… 30 more measurements
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
metric_foreground_pct |
37.60 ±0.00 | 37.60 ±0.00 | +0.0% | — |
poi_map_labels |
0.21 ±0.00 | 0.25 ±0.01 | +19.5% (noise) | 0.001 |
nii_erode_msk |
1.22 ±0.05 | 1.06 ±0.02 | -13.1% (noise) | 0.000 |
nii_map_labels |
0.61 ±0.02 | 0.53 ±0.01 | -12.5% (noise) | 0.000 |
nii_load_img |
1.87 ±0.10 | 1.67 ±0.04 | -10.4% (noise) | 0.006 |
poi_save |
0.51 ±0.03 | 0.56 ±0.04 | +9.2% (noise) | 0.039 |
nii_apply_crop |
0.72 ±0.02 | 0.67 ±0.02 | -7.0% (noise) | 0.001 |
nii_set_dtype |
0.46 ±0.04 | 0.43 ±0.01 | -7.0% (noise) | 0.129 |
poi_reorient |
0.47 ±0.02 | 0.50 ±0.02 | +6.9% (noise) | 0.065 |
nii_fill_holes |
1.04 ±0.02 | 0.97 ±0.05 | -6.9% (noise) | 0.012 |
nii_unique |
0.13 ±0.01 | 0.12 ±0.01 | -6.8% (noise) | 0.108 |
nii_compute_crop |
0.16 ±0.01 | 0.15 ±0.01 | -5.7% (noise) | 0.102 |
nii_filter_connected_components |
0.95 ±0.11 | 1.00 ±0.04 | +4.9% (noise) | 0.589 |
poi_resample_from_to |
0.80 ±0.02 | 0.83 ±0.03 | +3.6% (noise) | 0.022 |
poi_rescale |
0.28 ±0.01 | 0.29 ±0.02 | +3.3% (noise) | 0.281 |
poi_calc_centroids_nocrop |
1.31 ±0.08 | 1.27 ±0.08 | -2.9% (noise) | 0.978 |
nii_load_seg |
1.85 ±0.11 | 1.90 ±0.07 | +2.8% (noise) | 0.513 |
poi_load |
1.49 ±0.09 | 1.53 ±0.10 | +2.6% (noise) | 0.131 |
poi_local_to_global_arr |
0.37 ±0.01 | 0.37 ±0.01 | +2.4% (noise) | 0.357 |
nii_volumes |
0.31 ±0.02 | 0.31 ±0.01 | -2.1% (noise) | 0.841 |
nii_center_of_masses |
0.22 ±0.02 | 0.23 ±0.02 | +2.0% (noise) | 0.684 |
poi_calc_centroids |
1.09 ±0.05 | 1.07 ±0.03 | -1.9% (noise) | 0.316 |
nii_pad_to |
0.58 ±0.03 | 0.57 ±0.03 | -1.8% (noise) | 0.389 |
nii_extract_label |
0.47 ±0.03 | 0.46 ±0.02 | -1.6% (noise) | 0.921 |
nii_reorient |
0.87 ±0.06 | 0.88 ±0.03 | +1.5% (noise) | 0.344 |
nii_save |
1.53 ±0.09 | 1.52 ±0.06 | -0.8% (noise) | 0.697 |
poi_to_global |
0.26 ±0.01 | 0.26 ±0.01 | +0.5% (noise) | 0.262 |
nii_rescale_seg |
0.83 ±0.04 | 0.84 ±0.03 | +0.4% (noise) | 0.468 |
nii_get_connected_components |
0.73 ±0.02 | 0.74 ±0.05 | +0.3% (noise) | 0.899 |
nii_get_array |
0.02 ±0.00 | 0.02 ±0.00 | +0.2% (noise) | 0.507 |
mri_3d — shape (68, 52, 67)
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_calc_poi_from_subreg_vert |
12.29 ±0.27 | 13.58 ±0.92 | +10.5% | 0.102 |
nii_rescale_seg |
3.69 ±0.22 | 3.45 ±0.07 | -6.6% | 0.036 |
nii_save |
10.38 ±0.17 | 9.76 ±0.25 | -6.0% | 0.005 |
nii_load_img |
9.84 ±0.22 | 9.48 ±0.37 | -3.7% | 0.020 |
nii_load_seg |
3.43 ±0.07 | 3.35 ±0.09 | -2.2% | 0.209 |
… 31 more measurements
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
nii_filter_connected_components |
4.84 ±0.12 | 4.92 ±0.08 | +1.6% | 0.493 |
nii_dilate_msk |
160.79 ±0.26 | 163.13 ±0.69 | +1.5% | 0.000 |
nii_rescale |
39.15 ±0.39 | 38.65 ±0.60 | -1.3% | 0.074 |
nii_resample_from_to |
40.66 ±0.30 | 40.39 ±0.30 | -0.7% | 0.043 |
nii_erode_msk |
8.09 ±0.14 | 8.04 ±0.14 | -0.6% | 0.225 |
nii_fill_holes |
5.58 ±0.10 | 5.56 ±0.05 | -0.4% | 0.197 |
poi_calc_centroids_nocrop |
8.91 ±0.18 | 8.92 ±0.22 | +0.0% | 0.781 |
metric_voxels |
236912.00 ±0.00 | 236912.00 ±0.00 | +0.0% | — |
metric_labels |
8.00 ±0.00 | 8.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
18.21 ±0.00 | 18.21 ±0.00 | +0.0% | — |
poi_rescale |
0.31 ±0.04 | 0.36 ±0.02 | +17.3% (noise) | 0.145 |
poi_map_labels |
0.28 ±0.02 | 0.32 ±0.03 | +12.6% (noise) | 0.022 |
poi_save |
0.57 ±0.03 | 0.64 ±0.01 | +12.1% (noise) | 0.012 |
poi_load |
2.87 ±0.22 | 3.17 ±0.36 | +10.2% (noise) | 0.420 |
nii_unique |
0.69 ±0.01 | 0.76 ±0.04 | +9.3% (noise) | 0.027 |
nii_get_array |
0.07 ±0.00 | 0.07 ±0.01 | -9.3% (noise) | 0.687 |
poi_local_to_global_arr |
0.38 ±0.02 | 0.41 ±0.02 | +7.6% (noise) | 0.009 |
nii_get_connected_components |
2.53 ±0.12 | 2.34 ±0.06 | -7.4% (noise) | 0.044 |
nii_set_dtype |
0.63 ±0.03 | 0.58 ±0.02 | -7.3% (noise) | 0.032 |
nii_extract_label |
0.49 ±0.02 | 0.52 ±0.05 | +5.9% (noise) | 0.093 |
nii_reorient |
0.98 ±0.02 | 0.93 ±0.02 | -5.9% (noise) | 0.005 |
nii_volumes |
1.97 ±0.08 | 2.09 ±0.03 | +5.8% (noise) | 0.059 |
poi_calc_centroids |
2.80 ±0.04 | 2.84 ±0.05 | +1.2% (noise) | 0.348 |
nii_center_of_masses |
2.12 ±0.04 | 2.10 ±0.03 | -0.9% (noise) | 0.941 |
poi_resample_from_to |
0.97 ±0.05 | 0.97 ±0.05 | -0.9% (noise) | 0.779 |
poi_reorient |
0.49 ±0.01 | 0.49 ±0.02 | +0.8% (noise) | 0.329 |
nii_compute_crop |
0.36 ±0.01 | 0.36 ±0.02 | -0.7% (noise) | 0.315 |
nii_apply_crop |
0.77 ±0.06 | 0.77 ±0.02 | -0.7% (noise) | 0.289 |
nii_map_labels |
1.25 ±0.07 | 1.24 ±0.04 | -0.5% (noise) | 0.723 |
nii_pad_to |
0.81 ±0.01 | 0.81 ±0.03 | +0.1% (noise) | 0.721 |
poi_to_global |
0.31 ±0.01 | 0.31 ±0.01 | -0.0% (noise) | 0.155 |
mri_2d — shape (68, 52, 1)
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
nii_rescale |
5.79 ±0.19 | 5.60 ±0.06 | -3.2% | 0.036 |
nii_resample_from_to |
7.61 ±0.13 | 7.84 ±0.11 | +3.1% | 0.008 |
nii_dilate_msk |
20.15 ±0.33 | 20.04 ±0.26 | -0.5% | 0.273 |
metric_voxels |
3536.00 ±0.00 | 3536.00 ±0.00 | +0.0% | — |
metric_labels |
7.00 ±0.00 | 7.00 ±0.00 | +0.0% | — |
… 30 more measurements
| Measurement | baseline ms (median ±½·range) | head ms (median ±½·range) | Δ % | p |
|---|---|---|---|---|
metric_foreground_pct |
50.17 ±0.00 | 50.17 ±0.00 | +0.0% | — |
nii_center_of_masses |
0.44 ±0.02 | 0.54 ±0.03 | +22.7% (noise) | 0.000 |
nii_volumes |
0.49 ±0.02 | 0.58 ±0.01 | +18.4% (noise) | 0.000 |
nii_unique |
0.12 ±0.01 | 0.14 ±0.01 | +18.3% (noise) | 0.005 |
nii_extract_label |
0.42 ±0.05 | 0.49 ±0.03 | +16.5% (noise) | 0.066 |
nii_apply_crop |
0.65 ±0.02 | 0.75 ±0.06 | +15.5% (noise) | 0.004 |
nii_pad_to |
0.54 ±0.05 | 0.60 ±0.03 | +12.7% (noise) | 0.126 |
nii_compute_crop |
0.14 ±0.01 | 0.16 ±0.00 | +12.4% (noise) | 0.023 |
nii_set_dtype |
0.49 ±0.02 | 0.43 ±0.03 | -11.8% (noise) | 0.019 |
nii_save |
1.63 ±0.06 | 1.45 ±0.53 | -11.3% (noise) | 0.708 |
nii_filter_connected_components |
0.99 ±0.05 | 0.89 ±0.04 | -10.4% (noise) | 0.010 |
nii_get_array |
0.02 ±0.00 | 0.02 ±0.00 | -9.3% (noise) | 0.046 |
poi_calc_centroids |
1.33 ±0.04 | 1.21 ±0.02 | -9.0% (noise) | 0.001 |
poi_load |
2.21 ±0.07 | 2.40 ±0.07 | +8.2% (noise) | 0.010 |
nii_rescale_seg |
0.87 ±0.04 | 0.80 ±0.02 | -8.1% (noise) | 0.008 |
nii_map_labels |
0.50 ±0.03 | 0.53 ±0.01 | +6.8% (noise) | 0.016 |
poi_rescale |
0.31 ±0.03 | 0.29 ±0.01 | -6.4% (noise) | 0.288 |
nii_load_img |
1.78 ±0.13 | 1.68 ±0.11 | -5.8% (noise) | 0.055 |
poi_save |
0.58 ±0.01 | 0.61 ±0.04 | +5.7% (noise) | 0.141 |
nii_get_connected_components |
0.72 ±0.05 | 0.68 ±0.03 | -5.4% (noise) | 0.365 |
nii_erode_msk |
1.42 ±0.05 | 1.49 ±0.05 | +5.0% (noise) | 0.317 |
poi_resample_from_to |
0.82 ±0.04 | 0.78 ±0.03 | -4.5% (noise) | 0.126 |
poi_to_global |
0.28 ±0.02 | 0.27 ±0.00 | -3.1% (noise) | 0.277 |
poi_local_to_global_arr |
0.37 ±0.02 | 0.38 ±0.02 | +2.8% (noise) | 0.914 |
poi_map_labels |
0.26 ±0.04 | 0.27 ±0.01 | +2.5% (noise) | 0.785 |
nii_reorient |
0.90 ±0.03 | 0.88 ±0.04 | -2.0% (noise) | 0.424 |
poi_calc_centroids_nocrop |
1.58 ±0.03 | 1.55 ±0.05 | -1.7% (noise) | 0.269 |
poi_reorient |
0.50 ±0.03 | 0.49 ±0.06 | -1.4% (noise) | 0.552 |
nii_load_seg |
1.86 ±0.03 | 1.84 ±0.13 | -1.1% (noise) | 0.782 |
nii_fill_holes |
1.25 ±0.05 | 1.26 ±0.16 | +1.1% (noise) | 0.284 |
Gate: a measurement fails when the baseline is ≥ 1 ms, the median grows by ≥ 50%, and Welch's t-test gives p < 0.05. metric_* rows are context only.
Memory (peak RSS growth per call)
baseline 004e994 vs head 004e994 · python 3.11.16 · 5 repeats + 1 warmup · sampler proc-status, isolation fork · measurement floor ≈ 0.96 MiB
Showing the 5 most-changed measurements per case; the rest are collapsed. Rows with a baseline below 3 MiB are tagged (noise) — runner jitter on those swamps any real change.
ct_3d — shape (73, 47, 73)
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_to_global |
3.08 ±0.00 | 3.14 ±0.00 | +2.0% | — |
nii_center_of_masses |
3.27 ±0.00 | 3.34 ±0.00 | +1.9% | — |
nii_save |
3.71 ±0.00 | 3.78 ±0.00 | +1.8% | — |
nii_volumes |
3.52 ±0.00 | 3.59 ±0.00 | +1.8% | — |
poi_reorient |
3.83 ±0.00 | 3.89 ±0.00 | +1.6% | — |
… 31 more measurements
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_resample_from_to |
5.28 ±0.00 | 5.23 ±0.00 | -1.0% | — |
nii_reorient |
5.91 ±0.00 | 5.86 ±0.00 | -0.9% | — |
nii_load_img |
3.57 ±0.00 | 3.59 ±0.00 | +0.8% | — |
nii_load_seg |
6.01 ±0.00 | 5.96 ±0.00 | -0.7% | — |
nii_dilate_msk |
5.93 ±0.00 | 5.90 ±0.00 | -0.5% | — |
nii_erode_msk |
5.95 ±0.00 | 5.91 ±0.00 | -0.5% | — |
nii_rescale_seg |
5.95 ±0.00 | 5.96 ±0.00 | +0.3% | — |
nii_rescale |
6.17 ±0.00 | 6.15 ±0.00 | -0.3% | — |
nii_resample_from_to |
6.30 ±0.00 | 6.28 ±0.00 | -0.3% | — |
nii_set_dtype |
5.24 ±0.00 | 5.23 ±0.00 | -0.2% | — |
poi_calc_poi_from_subreg_vert |
7.12 ±0.00 | 7.10 ±0.00 | -0.2% | — |
nii_extract_label |
5.37 ±0.00 | 5.36 ±0.00 | -0.2% | — |
nii_pad_to |
5.43 ±0.00 | 5.41 ±0.00 | -0.2% | — |
nii_map_labels |
5.49 ±0.00 | 5.48 ±0.00 | -0.2% | — |
nii_apply_crop |
5.87 ±0.00 | 5.86 ±0.00 | -0.2% | — |
poi_calc_centroids_nocrop |
5.93 ±0.00 | 5.91 ±0.00 | -0.2% | — |
poi_calc_centroids |
6.05 ±0.00 | 6.04 ±0.00 | -0.2% | — |
nii_get_connected_components |
6.62 ±0.00 | 6.61 ±0.00 | -0.2% | — |
nii_filter_connected_components |
6.87 ±0.00 | 6.86 ±0.00 | -0.2% | — |
nii_fill_holes |
6.28 ±0.00 | 6.27 ±0.00 | -0.1% | — |
metric_voxels |
250463.00 ±0.00 | 250463.00 ±0.00 | +0.0% | — |
metric_labels |
3.00 ±0.00 | 3.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
14.51 ±0.00 | 14.51 ±0.00 | +0.0% | — |
poi_save |
1.40 ±0.00 | 1.46 ±0.00 | +4.5% (noise) | — |
poi_load |
1.61 ±0.00 | 1.68 ±0.00 | +3.9% (noise) | — |
nii_get_array |
1.65 ±0.00 | 1.71 ±0.00 | +3.8% (noise) | — |
poi_map_labels |
1.77 ±0.00 | 1.84 ±0.00 | +3.5% (noise) | — |
poi_rescale |
2.61 ±0.00 | 2.67 ±0.00 | +2.4% (noise) | — |
nii_compute_crop |
2.90 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
poi_local_to_global_arr |
2.96 ±0.00 | 3.02 ±0.00 | +2.1% (noise) | — |
nii_unique |
2.96 ±0.00 | 3.02 ±0.00 | +2.1% (noise) | — |
ct_2d — shape (73, 47, 1)
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_to_global |
3.02 ±0.00 | 3.08 ±0.00 | +2.1% | — |
nii_center_of_masses |
3.21 ±0.00 | 3.27 ±0.00 | +1.9% | — |
nii_save |
3.65 ±0.00 | 3.71 ±0.00 | +1.8% | — |
nii_volumes |
3.46 ±0.00 | 3.52 ±0.00 | +1.8% | — |
poi_reorient |
3.77 ±0.00 | 3.83 ±0.00 | +1.7% | — |
… 30 more measurements
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_resample_from_to |
5.21 ±0.00 | 5.16 ±0.00 | -1.0% | — |
nii_load_img |
3.50 ±0.00 | 3.53 ±0.00 | +0.9% | — |
nii_reorient |
5.84 ±0.00 | 5.79 ±0.00 | -0.9% | — |
nii_load_seg |
5.95 ±0.00 | 5.90 ±0.00 | -0.7% | — |
nii_dilate_msk |
5.87 ±0.00 | 5.84 ±0.00 | -0.5% | — |
nii_erode_msk |
5.88 ±0.00 | 5.85 ±0.00 | -0.5% | — |
nii_rescale_seg |
5.88 ±0.00 | 5.90 ±0.00 | +0.3% | — |
nii_rescale |
6.11 ±0.00 | 6.09 ±0.00 | -0.3% | — |
nii_resample_from_to |
6.23 ±0.00 | 6.21 ±0.00 | -0.3% | — |
nii_set_dtype |
5.18 ±0.00 | 5.17 ±0.00 | -0.2% | — |
nii_extract_label |
5.30 ±0.00 | 5.29 ±0.00 | -0.2% | — |
nii_pad_to |
5.36 ±0.00 | 5.35 ±0.00 | -0.2% | — |
nii_map_labels |
5.43 ±0.00 | 5.42 ±0.00 | -0.2% | — |
nii_apply_crop |
5.80 ±0.00 | 5.79 ±0.00 | -0.2% | — |
poi_calc_centroids_nocrop |
5.93 ±0.00 | 5.91 ±0.00 | -0.2% | — |
poi_calc_centroids |
5.99 ±0.00 | 5.98 ±0.00 | -0.2% | — |
nii_get_connected_components |
6.55 ±0.00 | 6.54 ±0.00 | -0.2% | — |
nii_filter_connected_components |
6.80 ±0.00 | 6.79 ±0.00 | -0.2% | — |
nii_fill_holes |
6.22 ±0.00 | 6.21 ±0.00 | -0.1% | — |
metric_voxels |
3431.00 ±0.00 | 3431.00 ±0.00 | +0.0% | — |
metric_labels |
3.00 ±0.00 | 3.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
37.60 ±0.00 | 37.60 ±0.00 | +0.0% | — |
poi_save |
1.34 ±0.00 | 1.40 ±0.00 | +4.7% (noise) | — |
poi_load |
1.55 ±0.00 | 1.61 ±0.00 | +4.0% (noise) | — |
nii_get_array |
1.59 ±0.00 | 1.65 ±0.00 | +3.9% (noise) | — |
poi_map_labels |
1.71 ±0.00 | 1.77 ±0.00 | +3.7% (noise) | — |
poi_rescale |
2.54 ±0.00 | 2.61 ±0.00 | +2.5% (noise) | — |
nii_compute_crop |
2.84 ±0.00 | 2.90 ±0.00 | +2.2% (noise) | — |
poi_local_to_global_arr |
2.89 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
nii_unique |
2.90 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
mri_3d — shape (68, 52, 67)
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_to_global |
3.02 ±0.00 | 3.08 ±0.00 | +2.1% | — |
nii_center_of_masses |
3.21 ±0.00 | 3.27 ±0.00 | +1.9% | — |
nii_save |
3.65 ±0.00 | 3.71 ±0.00 | +1.8% | — |
nii_volumes |
3.46 ±0.00 | 3.53 ±0.00 | +1.8% | — |
poi_reorient |
3.77 ±0.00 | 3.83 ±0.00 | +1.7% | — |
… 31 more measurements
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_resample_from_to |
5.21 ±0.00 | 5.16 ±0.00 | -1.0% | — |
nii_load_img |
3.56 ±0.00 | 3.59 ±0.00 | +0.9% | — |
nii_reorient |
5.84 ±0.00 | 5.79 ±0.00 | -0.9% | — |
nii_load_seg |
5.95 ±0.00 | 5.90 ±0.00 | -0.7% | — |
nii_dilate_msk |
5.87 ±0.00 | 5.84 ±0.00 | -0.5% | — |
nii_erode_msk |
5.88 ±0.00 | 5.85 ±0.00 | -0.5% | — |
nii_rescale_seg |
5.88 ±0.00 | 5.90 ±0.00 | +0.3% | — |
nii_rescale |
6.11 ±0.00 | 6.09 ±0.00 | -0.3% | — |
nii_resample_from_to |
6.23 ±0.00 | 6.21 ±0.00 | -0.3% | — |
nii_set_dtype |
5.24 ±0.00 | 5.23 ±0.00 | -0.2% | — |
nii_extract_label |
5.30 ±0.00 | 5.29 ±0.00 | -0.2% | — |
nii_pad_to |
5.36 ±0.00 | 5.35 ±0.00 | -0.2% | — |
nii_map_labels |
5.43 ±0.00 | 5.42 ±0.00 | -0.2% | — |
nii_apply_crop |
5.80 ±0.00 | 5.79 ±0.00 | -0.2% | — |
poi_calc_centroids_nocrop |
5.86 ±0.00 | 5.85 ±0.00 | -0.2% | — |
poi_calc_centroids |
5.99 ±0.00 | 5.98 ±0.00 | -0.2% | — |
nii_get_connected_components |
6.55 ±0.00 | 6.54 ±0.00 | -0.2% | — |
nii_filter_connected_components |
6.80 ±0.00 | 6.79 ±0.00 | -0.2% | — |
poi_calc_poi_from_subreg_vert |
7.11 ±0.00 | 7.10 ±0.00 | -0.2% | — |
nii_fill_holes |
6.22 ±0.00 | 6.21 ±0.00 | -0.1% | — |
metric_voxels |
236912.00 ±0.00 | 236912.00 ±0.00 | +0.0% | — |
metric_labels |
8.00 ±0.00 | 8.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
18.21 ±0.00 | 18.21 ±0.00 | +0.0% | — |
poi_save |
1.40 ±0.00 | 1.46 ±0.00 | +4.5% (noise) | — |
poi_load |
1.55 ±0.00 | 1.61 ±0.00 | +4.0% (noise) | — |
nii_get_array |
1.59 ±0.00 | 1.65 ±0.00 | +3.9% (noise) | — |
poi_map_labels |
1.71 ±0.00 | 1.77 ±0.00 | +3.7% (noise) | — |
poi_rescale |
2.54 ±0.00 | 2.61 ±0.00 | +2.5% (noise) | — |
nii_compute_crop |
2.84 ±0.00 | 2.90 ±0.00 | +2.2% (noise) | — |
poi_local_to_global_arr |
2.89 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
nii_unique |
2.90 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
mri_2d — shape (68, 52, 1)
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_to_global |
3.02 ±0.00 | 3.08 ±0.00 | +2.1% | — |
nii_center_of_masses |
3.21 ±0.00 | 3.27 ±0.00 | +1.9% | — |
nii_save |
3.65 ±0.00 | 3.71 ±0.00 | +1.8% | — |
nii_volumes |
3.46 ±0.00 | 3.52 ±0.12 | +1.8% | 0.801 |
poi_reorient |
3.77 ±0.00 | 3.83 ±0.00 | +1.7% | — |
… 30 more measurements
| Measurement | baseline MiB (median ±½·range) | head MiB (median ±½·range) | Δ % | p |
|---|---|---|---|---|
poi_resample_from_to |
5.21 ±0.00 | 5.16 ±0.00 | -1.0% | — |
nii_load_img |
3.56 ±0.00 | 3.59 ±0.00 | +0.9% | — |
nii_reorient |
5.84 ±0.00 | 5.79 ±0.00 | -0.9% | — |
nii_load_seg |
5.95 ±0.00 | 5.90 ±0.00 | -0.7% | — |
nii_dilate_msk |
5.87 ±0.00 | 5.84 ±0.00 | -0.5% | — |
nii_erode_msk |
5.88 ±0.00 | 5.85 ±0.00 | -0.5% | — |
nii_rescale_seg |
5.88 ±0.00 | 5.90 ±0.00 | +0.3% | — |
nii_rescale |
6.11 ±0.00 | 6.09 ±0.00 | -0.3% | — |
nii_resample_from_to |
6.23 ±0.00 | 6.21 ±0.00 | -0.3% | — |
nii_set_dtype |
5.24 ±0.00 | 5.23 ±0.00 | -0.2% | — |
nii_extract_label |
5.30 ±0.00 | 5.29 ±0.00 | -0.2% | — |
nii_pad_to |
5.36 ±0.00 | 5.35 ±0.00 | -0.2% | — |
nii_map_labels |
5.43 ±0.00 | 5.42 ±0.00 | -0.2% | — |
nii_apply_crop |
5.80 ±0.00 | 5.79 ±0.00 | -0.2% | — |
poi_calc_centroids_nocrop |
5.93 ±0.00 | 5.91 ±0.00 | -0.2% | — |
poi_calc_centroids |
5.99 ±0.00 | 5.98 ±0.00 | -0.2% | — |
nii_get_connected_components |
6.55 ±0.00 | 6.54 ±0.00 | -0.2% | — |
nii_filter_connected_components |
6.80 ±0.00 | 6.79 ±0.00 | -0.2% | — |
nii_fill_holes |
6.22 ±0.00 | 6.21 ±0.00 | -0.1% | — |
metric_voxels |
3536.00 ±0.00 | 3536.00 ±0.00 | +0.0% | — |
metric_labels |
7.00 ±0.00 | 7.00 ±0.00 | +0.0% | — |
metric_foreground_pct |
50.17 ±0.00 | 50.17 ±0.00 | +0.0% | — |
poi_save |
1.40 ±0.00 | 1.46 ±0.00 | +4.5% (noise) | — |
poi_load |
1.55 ±0.00 | 1.61 ±0.00 | +4.0% (noise) | — |
nii_get_array |
1.59 ±0.00 | 1.65 ±0.00 | +3.9% (noise) | — |
poi_map_labels |
1.71 ±0.00 | 1.77 ±0.00 | +3.7% (noise) | — |
poi_rescale |
2.54 ±0.00 | 2.61 ±0.00 | +2.5% (noise) | — |
nii_compute_crop |
2.84 ±0.00 | 2.90 ±0.00 | +2.2% (noise) | — |
poi_local_to_global_arr |
2.89 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
nii_unique |
2.90 ±0.00 | 2.96 ±0.00 | +2.2% (noise) | — |
Gate: a measurement fails when the baseline is ≥ 1 MiB, the median grows by ≥ 50%, and Welch's t-test gives p < 0.05. metric_* rows are context only.
Summary
Aligns the tutorial notebooks and the atlas-POI-transfer example with the current TPTBox API — no functional code changes outside the notebooks / example script.
tutorial_Nifty.ipynb:compute_crop_slice/apply_crop_slice(removed) →compute_crop/apply_croptutorial_POI.ipynb: renamed markdown docs tocalc_poi_from_subreg_vert,calc_centroids(first_stage=, second_stage=),calc_poi_labeled_buffered; fixed removed method names in the class overview (crop_centroids→apply_crop,shift_all_centroid_coordinates→shift_all_coordinates, dropped non-existentreorient_centroids_to)tutorial_Dataset_processing.ipynb: dropped deprecatedc_val=0fromridged_points_from_poiin the three registration cellsexamples/registration/atlas_poi_transfer_leg/example.{ipynb,py}: userun_vibeseg(was non-existentrun_totalvibeseg), importprep_Atlas/Register_Point_Atlasfromatlas_poi_transfer_leg_ct, adaptprep_Atlascall to the current 5-arg signature(seg, ct, out_atlas, ct_atlas, atlas_centroids, atlas_left=…)Sample-data paths in
tutorial_BIDS_files.ipynb/tutorial_pointregistation.ipynbstill point at user-local NAS mounts (unchanged — existing TODO markers cover that).Depends on
Test plan
calc_poi_from_subreg_vert,calc_centroids(first_stage=…, second_stage=…),calc_poi_labeled_bufferedall import cleanlyatlas_poi_transfer_leg_ct.prep_Atlasruns against a real seg + ct pair🤖 Generated with Claude Code