Skip to content

Commit

Permalink
parameter change
Browse files Browse the repository at this point in the history
  • Loading branch information
Danyyyel committed Aug 22, 2024
1 parent 78c9cb3 commit e5115d9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions bin/2.1_T2PreProcessing/preProcessing_T2.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def applyBET(input_file,frac,radius,vertical_gradient):
scale[3][3] = 1

# this has to be adapted in the case the output image is not RAS orientated - Siding from feet to nose
imgTemp = np.flip(imgTemp,2)
#imgTemp = np.flip(imgTemp,2)
#imgTemp = np.flip(imgTemp,1)
#imgTemp = np.flip(imgTemp,0)
#imgTemp = np.rot90(imgTemp,2)
Expand Down Expand Up @@ -94,9 +94,9 @@ def applyBET(input_file,frac,radius,vertical_gradient):
#default_rad = 45
#default_vert = 0.0

default_frac = 0.2
default_frac = 0.1
default_rad = 60
default_vert = 0.21
default_vert = 0.13

if __name__ == "__main__":
import argparse
Expand Down
5 changes: 2 additions & 3 deletions bin/2.2_DTIPreProcessing/preProcessing_DTI.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ def applyBET(input_file: str, frac: float, radius: int, output_path: str) -> str
imgTemp = data.get_fdata()
scale = np.eye(4)* 10
scale[3][3] = 1
imgTemp = np.flip(imgTemp, 2)

# this has to be adapted in the case the output image is not RAS orientated - Siding from feet to nose
imgTemp = np.flip(imgTemp,2)
#imgTemp = np.flip(imgTemp,1)
#imgTemp = np.flip(imgTemp,0)
imgTemp = np.flip(imgTemp,1)
imgTemp = np.flip(imgTemp,0)
#imgTemp = np.rot90(imgTemp, 2)

scaledNiiData = nii.Nifti1Image(imgTemp, data.affine * scale)
Expand Down
6 changes: 3 additions & 3 deletions bin/2.3_fMRIPreProcessing/preProcessing_fMRI.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def applyBET(input_file,frac,radius,outputPath):

#imgTemp = np.flip(imgTemp, 2)
#imgTemp = np.flip(imgTemp, 1)
imgTemp = np.flip(imgTemp, 0)
#imgTemp = np.flip(imgTemp, 0)
#imgTemp = np.rot90(imgTemp,2)

scaledNiiData = nii.Nifti1Image(imgTemp, data.affine * scale)
Expand Down Expand Up @@ -142,9 +142,9 @@ def cropToSmall(input_file,outputPath):
#default_rad = 45
#default_vert = 0.0

default_frac = 0.2
default_frac = 0.1
default_rad = 60
default_vert = 0.21
default_vert = 0.13

if __name__ == "__main__":
import argparse
Expand Down
7 changes: 5 additions & 2 deletions bin/conv2Nifti_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,11 @@ def fileCopy(list_of_data, input_path):
out_file = os.path.join(output_dir, "sub-" + subjid, "ses-" + sessid, "func", "sub-" + subjid + "_ses-" + sessid + "_EPI.json")

# calculate slice timings
create_slice_timings(fmri_scan_method_file, scanid, out_file)

try:
create_slice_timings(fmri_scan_method_file, scanid, out_file)
except FileNotFoundError:
continue

## use parallel computing for a faster generation of t2maps
mese_scan_sessions = []
for id in mese_scan_ids:
Expand Down

0 comments on commit e5115d9

Please sign in to comment.