Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmeunier79 committed Dec 6, 2024
1 parent 61c46c6 commit d163d28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions macapype/nodes/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,20 @@ def apply_li_thresh(orig_img_file):
img_lithresh_data[data_orig <= lithresh] = 0
img_lithresh_data[lithresh < data_orig] = 1

print("Min/max values after lithresh:", np.min(img_lithresh_data), np.max(img_lithresh_data))
print("Min/max values after lithresh:", np.min(img_lithresh_data),
np.max(img_lithresh_data))

# saving lithresh image
fpath, fname, ext = split_f(orig_img_file)
lithr_img_file = os.path.abspath(fname + "_lithresh" + ext)
img_lithresh = nib.Nifti1Image(img_lithresh_data, affine=affine_orig,
header=header_orig)
img_lithresh = nib.Nifti1Image(img_lithresh_data,
affine=affine_orig,
header=header_orig)
nib.save(img_lithresh, lithr_img_file)

return lithr_img_file



if __name__ == '__main__':

data_path = "/hpc/meca/data/Macaques/Macaque_hiphop/results/ucdavis"
Expand Down
1 change: 0 additions & 1 deletion macapype/pipelines/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def _create_avg_reorient_pipeline(name="avg_reorient_pipe", params={}):
return reorient_pipe



###############################################################################
# main pipeline: "short_preparation_pipe"
###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion macapype/pipelines/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ def create_crop_aladin_pipe(name="crop_aladin_pipe", params={}):
reg_pipe.connect(reg_T1_on_template2, 'aff_file',
compose_transfo, "comp_input")

### padding image to have zeros and non nans
# padding image to have zeros and non nans
pad_image_T1 = pe.Node(
ants.utils.ImageMath(),
name="pad_image_T1")
Expand Down

0 comments on commit d163d28

Please sign in to comment.