Skip to content

Commit

Permalink
Issue #7: Deprecation bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVeraFrazao committed Dec 12, 2023
1 parent cd0c5ad commit 4f2723b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/3.3_fMRIActivity/create_seed_rois.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def startSeedPoint(in_labels,in_atlas):
labels_data.append(labels_img[k].get_data())
# print("labels_data[%d].dtype:" % (k,), labels_data[k].dtype)
# print("labels_data[%d].shape:" % (k,), labels_data[k].shape)
labels_hdr.append(labels_img[k].get_header())
labels_hdr.append(labels_img[k].header)
labels_shape.append(labels_hdr[k].get_data_shape())
# print("labels_shape[%d]:" % (k,), labels_shape[k])
if len(labels_shape[k]) != 3:
Expand Down
8 changes: 4 additions & 4 deletions bin/3.3_fMRIActivity/fsl_mean_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def start_fsl_mean_ts(sPathData,sPathMask,labelNames,postTxt):
# Read 4D data file (NIfTI )
data_img = nib.load(sPathData)
data = data_img.get_data()
data_hdr = data_img.get_header()
data_hdr = data_img.header
data_dtype = data_hdr.get_data_dtype()
data_shape = data_hdr.get_data_shape()

Expand All @@ -41,7 +41,7 @@ def start_fsl_mean_ts(sPathData,sPathMask,labelNames,postTxt):
# Read 4D mask file (NIfTI)
mask_img = nib.load(sPathMask)
mask = mask_img.get_data()
mask_hdr = mask_img.get_header()
mask_hdr = mask_img.header
#mask_dtype = mask_hdr.get_data_dtype()
mask_shape = mask_hdr.get_data_shape()

Expand Down Expand Up @@ -114,7 +114,7 @@ def get_date():
#data = np.cast[np.float32](data_img.get_data())
#print("data.dtype:", data.dtype)
#print("data.shape:", data.shape)
data_hdr = data_img.get_header()
data_hdr = data_img.header
data_dtype = data_hdr.get_data_dtype()
data_shape = data_hdr.get_data_shape()
#print("data_dtype:", data_dtype)
Expand All @@ -130,7 +130,7 @@ def get_date():
#mask = np.cast[np.float32](mask_img.get_data())
#print("mask.dtype:", mask.dtype)
#print("mask.shape:", mask.shape)
mask_hdr = mask_img.get_header()
mask_hdr = mask_img.header
mask_dtype = mask_hdr.get_data_dtype()
mask_shape = mask_hdr.get_data_shape()
#print("mask_dtype:", mask_dtype)
Expand Down
6 changes: 3 additions & 3 deletions bin/3.3_fMRIActivity/process_fMRI.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def imgScaleResize(img):

def scaleBy10(input_path,inv):
data = nii.load(input_path)
imgTemp = data.get_data()
imgTemp = data.get_fdata()
if inv is False:
scale = np.eye(4) * 10
scale[3][3] = 1
Expand Down Expand Up @@ -76,7 +76,7 @@ def findSlicesData(path,pre):

def getRASorientation(file_name,proc_Path):
file_data = nii.load(file_name)
imgData = file_data.get_data()
imgData = file_data.get_fdata()
imgData = np.flip(imgData, 2)

imgData = np.flip(imgData, 0)
Expand Down Expand Up @@ -177,7 +177,7 @@ def copyRawPhysioData(file_name,i32_Path):
studyName = file_name.split('/')[-3]
scanNo = file_name.split('.')[-4]+'.I32'
physioPath=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(file_name))),'Physio',studyName)

print(physioPath)
relatedPhysioData = []
fileALL = glob.glob(physioPath+'/'+studyName+'*'+scanNo)
for filename in fileALL:
Expand Down

0 comments on commit 4f2723b

Please sign in to comment.