Skip to content

Commit

Permalink
fix condition resampling and compressing
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudbore committed Oct 1, 2024
1 parent de40049 commit e57153b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dwi_ml/data/processing/streamlines/data_augmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ def resample_or_compress(sft, step_size_mm: float = None,
nb_points: int = None,
compress: float = None,
remove_invalid: bool = False):
if step_size_mm is not None:
if step_size_mm:
# Note. No matter the chosen space, resampling is done in mm.
logging.debug(" Resampling (step size): {}mm".format(step_size_mm))
sft = resample_streamlines_step_size(sft, step_size=step_size_mm)
elif nb_points is not None:
elif nb_points:
logging.debug(" Resampling: " +
"{} points per streamline".format(nb_points))
sft = resample_streamlines_num_points(sft, nb_points)
elif compress is not None:
elif compress:
logging.debug(" Compressing: {}".format(compress))
sft = compress_sft(sft, compress)

Expand Down

0 comments on commit e57153b

Please sign in to comment.