Skip to content

Commit

Permalink
Corrected QuickshearDefacer argument name mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
yasinzaii committed Oct 31, 2024
1 parent 36be733 commit 0a8a2b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion brainles_preprocessing/modality.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def deface(

defacer.deface(
mask_image_path=atlas_mask_path,
bet_img_path=self.steps[PreprocessorSteps.BET],
input_image_path=self.steps[PreprocessorSteps.BET],
)
return atlas_mask_path
else:
Expand Down
19 changes: 19 additions & 0 deletions example/example_modality_centric_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def preprocess(inputDir):
norm_bet_dir = brainles_dir / "normalized_bet"
raw_skull_dir = brainles_dir / "raw_skull"
norm_skull_dir = brainles_dir / "normalized_skull"
raw_deface_dir = brainles_dir / "raw_defaced"
norm_deface_dir = brainles_dir / "normalized_defaced"

t1_file = inputDir.files("*t1.nii.gz")
t1c_file = inputDir.files("*t1c.nii.gz")
Expand Down Expand Up @@ -58,6 +60,10 @@ def preprocess(inputDir):
+ "_t1c_bet_normalized.nii.gz",
normalized_skull_output_path=norm_skull_dir / inputDir.name
+ "_t1c_skull_normalized.nii.gz",
raw_defaced_output_path=raw_deface_dir / inputDir.name
+ "_t1c_defaced_raw.nii.gz",
normalized_defaced_output_path=norm_deface_dir
/ "_t1c_defaced_normalized.nii.gz",
atlas_correction=True,
normalizer=percentile_normalizer,
)
Expand All @@ -72,6 +78,10 @@ def preprocess(inputDir):
+ "_t1_bet_normalized.nii.gz",
normalized_skull_output_path=norm_skull_dir / inputDir.name
+ "_t1_skull_normalized.nii.gz",
raw_defaced_output_path=raw_deface_dir / inputDir.name
+ "_t1_defaced_raw.nii.gz",
normalized_defaced_output_path=norm_deface_dir / inputDir.name
+ "_t1_defaced_normalized.nii.gz",
atlas_correction=True,
normalizer=percentile_normalizer,
),
Expand All @@ -85,6 +95,10 @@ def preprocess(inputDir):
+ "_t2_bet_normalized.nii.gz",
normalized_skull_output_path=norm_skull_dir / inputDir.name
+ "_t2_skull_normalized.nii.gz",
raw_defaced_output_path=raw_deface_dir / inputDir.name
+ "_t2_defaced_raw.nii.gz",
normalized_defaced_output_path=norm_deface_dir / inputDir.name
+ "_t2_defaced_normalized.nii.gz",
atlas_correction=True,
normalizer=percentile_normalizer,
),
Expand All @@ -98,6 +112,10 @@ def preprocess(inputDir):
+ "_fla_bet_normalized.nii.gz",
normalized_skull_output_path=norm_skull_dir / inputDir.name
+ "_fla_skull_normalized.nii.gz",
raw_defaced_output_path=raw_deface_dir / inputDir.name
+ "_flair_defaced_raw.nii.gz",
normalized_defaced_output_path=norm_deface_dir / inputDir.name
+ "_flair_defaced_normalized.nii.gz",
atlas_correction=True,
normalizer=percentile_normalizer,
),
Expand All @@ -120,6 +138,7 @@ def preprocess(inputDir):
save_dir_atlas_registration=brainles_dir + "/atlas-registration",
save_dir_atlas_correction=brainles_dir + "/atlas-correction",
save_dir_brain_extraction=brainles_dir + "/brain-extraction",
save_dir_defacing=brainles_dir + "/defacing",
)


Expand Down

0 comments on commit 0a8a2b4

Please sign in to comment.