FrancescoLR commited on
Commit
7d6c8fc
·
verified ·
1 Parent(s): ccd4fd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -117,7 +117,7 @@ def extract_middle_slices(nifti_path, output_image_path, slice_size=180, center=
117
  # Optionally label connected components
118
  if label_components:
119
  structure = generate_binary_structure(3, 3) # 3D, 26-connectivity
120
- labeled_data, num_features = label(resampled_data > 0, structure=structure)
121
  else:
122
  labeled_data = resampled_data
123
  num_features = None # Not needed if we're not labeling
 
117
  # Optionally label connected components
118
  if label_components:
119
  structure = generate_binary_structure(3, 3) # 3D, 26-connectivity
120
+ labeled_data, num_features = label(data > 0, structure=structure)
121
  else:
122
  labeled_data = resampled_data
123
  num_features = None # Not needed if we're not labeling