File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ def per_label_dict(self):
343343 pred_loc_tmp = [self .pred_loc [case ][i ] for i in ind_pred [0 ]]
344344 ref_loc_tmp = [self .ref_loc [case ][i ] for i in ind_ref [0 ]]
345345 print (self .pixdim )
346- if self .pixdim == [] :
346+ if len ( self .pixdim ) == 0 :
347347 if len (pred_loc_tmp ) > 0 :
348348 self .pixdim = np .ones ([pred_loc_tmp [0 ].ndim ])
349349 elif len (ref_loc_tmp )> 0 :
@@ -432,11 +432,11 @@ def per_label_dict(self):
432432 else :
433433 for p in pred_loc_tmp_fin :
434434 list_pred_loc .append (p )
435- if self .pixdim == [] and p .shape [0 ] > 0 :
435+ if len ( self .pixdim ) == 0 and p .shape [0 ] > 0 :
436436 self .pixdim = np .ones ([p .ndim ])
437437 for r in ref_loc_tmp_fin :
438438 list_ref_loc .append (r )
439- if self .pixdim == [] and r .shape [0 ] > 0 :
439+ if len ( self .pixdim ) == 0 and r .shape [0 ] > 0 :
440440 self .pixdim = np .ones ([r .ndim ])
441441 for p in pred_tmp_fin :
442442 list_pred .append (p )
@@ -706,7 +706,7 @@ def __init__(
706706 self .pixdim = pixdim
707707 if len (self .pred )> 0 :
708708 ndim = np .asarray (self .pred [0 ]).ndim
709- if self .pixdim == [] and ndim > 0 :
709+ if len ( self .pixdim ) == 0 and ndim > 0 :
710710 self .pixdim = np .ones ([ndim ])
711711 elif ndim > 0 :
712712 self .pixdim = pixdim [:ndim ]
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def __init__(
107107 self .flag_fp_in = flag_fp_in
108108 self .pixdim = pixdim
109109 all_input = []
110- if self .pixdim == [] :
110+ if len ( self .pixdim ) == 0 :
111111 if len (pred_loc ) > 0 :
112112 if pred_loc [0 ].size > 0 :
113113 all_input = pred_loc [0 ]
You can’t perform that action at this time.
0 commit comments