@@ -957,7 +957,7 @@ def get_hmupos(datain, parts, Cnt, outpath=''):
957957 fref )
958958
959959 # define a dictionary of all positions/offsets of hardware mu-maps
960- hmupos = [None ] * 5
960+ hmupos = [None ] * ( len ( Cnt [ 'HMULIST' ]) + 1 )
961961 hmupos [0 ] = {
962962 'TabPosOrg' : tpozyx , # from DICOM of LM file
963963 'GanTabOff' : gtozyx , # from DICOM of mMR mu-map file
@@ -983,11 +983,11 @@ def get_hmupos(datain, parts, Cnt, outpath=''):
983983 # pdd to the dictionary
984984 hmupos [i ] = {
985985 'vpos' : vpos ,
986- 'shape' : s , # prom interfile
987- 'iorg' : org , # prom interfile
988- 'ioff' : off , # prom interfile
989- 'ivs' : vs , # prom interfile
990- 'img' : im , # prom interfile
986+ 'shape' : s , # from interfile
987+ 'iorg' : org , # from interfile
988+ 'ioff' : off , # from interfile
989+ 'ivs' : vs , # from interfile
990+ 'img' : im , # from interfile
991991 'niipath' : os .path .join (dirhmu , '_' + Cnt ['HMULIST' ][i - 1 ].split ('.' )[0 ] + '.nii.gz' )}
992992 log .info ('creating mu-map for: {}' .format (Cnt ['HMULIST' ][i - 1 ]))
993993 A = np .diag (np .append (10 * vs [::- 1 ], 1 ))
0 commit comments