@@ -77,7 +77,7 @@ def get_rois_crossed(pointsmm, roiData, voxelSize):
77
77
x = int (pointsmm [j , 0 ] / float (voxelSize [0 ]))
78
78
y = int (pointsmm [j , 1 ] / float (voxelSize [1 ]))
79
79
z = int (pointsmm [j , 2 ] / float (voxelSize [2 ]))
80
- if not roiData [x , y , z ] = = 0 :
80
+ if roiData [x , y , z ] ! = 0 :
81
81
rois_crossed .append (roiData [x , y , z ])
82
82
rois_crossed = list (
83
83
dict .fromkeys (rois_crossed ).keys ()
@@ -91,7 +91,7 @@ def get_connectivity_matrix(n_rois, list_of_roi_crossed_lists):
91
91
for idx_i , roi_i in enumerate (rois_crossed ):
92
92
for idx_j , roi_j in enumerate (rois_crossed ):
93
93
if idx_i > idx_j :
94
- if not roi_i = = roi_j :
94
+ if roi_i ! = roi_j :
95
95
connectivity_matrix [roi_i - 1 , roi_j - 1 ] += 1
96
96
connectivity_matrix = connectivity_matrix + connectivity_matrix .T
97
97
return connectivity_matrix
@@ -248,7 +248,7 @@ def cmat(
248
248
axis = 1 ,
249
249
)
250
250
)
251
- G .nodes [int (u )]["dn_position" ] = tuple ([ xyz [0 ], xyz [2 ], - xyz [1 ] ])
251
+ G .nodes [int (u )]["dn_position" ] = ( xyz [0 ], xyz [2 ], - xyz [1 ])
252
252
253
253
if intersections :
254
254
iflogger .info ("Filtering tractography from intersections" )
@@ -371,7 +371,7 @@ def cmat(
371
371
di ["fiber_length_mean" ] = 0
372
372
di ["fiber_length_median" ] = 0
373
373
di ["fiber_length_std" ] = 0
374
- if not u = = v : # Fix for self loop problem
374
+ if u ! = v : # Fix for self loop problem
375
375
G .add_edge (u , v , ** di )
376
376
if "fiblist" in d :
377
377
numfib .add_edge (u , v , weight = di ["number_of_fibers" ])
@@ -400,7 +400,7 @@ def cmat(
400
400
pickle .dump (I , f , pickle .HIGHEST_PROTOCOL )
401
401
402
402
path , name , ext = split_filename (matrix_mat_name )
403
- if not ext = = ".mat" :
403
+ if ext ! = ".mat" :
404
404
ext = ".mat"
405
405
matrix_mat_name = matrix_mat_name + ext
406
406
@@ -608,7 +608,7 @@ def _run_interface(self, runtime):
608
608
609
609
matrix_mat_file = op .abspath (self .inputs .out_matrix_mat_file )
610
610
path , name , ext = split_filename (matrix_mat_file )
611
- if not ext = = ".mat" :
611
+ if ext ! = ".mat" :
612
612
ext = ".mat"
613
613
matrix_mat_file = matrix_mat_file + ext
614
614
@@ -673,7 +673,7 @@ def _list_outputs(self):
673
673
674
674
matrix_mat_file = op .abspath (self .inputs .out_matrix_mat_file )
675
675
path , name , ext = split_filename (matrix_mat_file )
676
- if not ext = = ".mat" :
676
+ if ext ! = ".mat" :
677
677
ext = ".mat"
678
678
matrix_mat_file = matrix_mat_file + ext
679
679
@@ -1070,7 +1070,7 @@ def create_nodes(roi_file, resolution_network_file, out_filename):
1070
1070
np .where (np .flipud (roiData ) == int (d ["dn_correspondence_id" ])), axis = 1
1071
1071
)
1072
1072
)
1073
- G .nodes [int (u )]["dn_position" ] = tuple ([ xyz [0 ], xyz [2 ], - xyz [1 ] ])
1073
+ G .nodes [int (u )]["dn_position" ] = ( xyz [0 ], xyz [2 ], - xyz [1 ])
1074
1074
with open (out_filename , 'wb' ) as f :
1075
1075
pickle .dump (G , f , pickle .HIGHEST_PROTOCOL )
1076
1076
return out_filename
0 commit comments