Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def extract_middle_slices(nifti_path, output_image_path, slice_size=180):
|
|
76 |
# Define half the slice size
|
77 |
half_size = slice_size // 2
|
78 |
|
79 |
-
|
80 |
"""
|
81 |
Extracts slices from a 3D NIfTI image. If a center is provided, it uses it;
|
82 |
otherwise, computes the center of mass of non-zero voxels. Slices are taken
|
|
|
76 |
# Define half the slice size
|
77 |
half_size = slice_size // 2
|
78 |
|
79 |
+
def extract_middle_slices(nifti_path, output_image_path, slice_size=180, center=None):
|
80 |
"""
|
81 |
Extracts slices from a 3D NIfTI image. If a center is provided, it uses it;
|
82 |
otherwise, computes the center of mass of non-zero voxels. Slices are taken
|