NiftyPET / NIPET

High-throughput PET image reconstruction with high quantitative accuracy and precision
Apache License 2.0
29 stars 7 forks source link

How to Obtaining the hardware and object 𝜇-maps #12

Closed chestnut111 closed 4 years ago

chestnut111 commented 4 years ago

when i run : `# obtain the hardware mu-map (the bed and the head&neck coil) muhdct = nipet.hdw_mumap(datain, [1,2,4], mMRpars, outpath=opth, use_stored=True)

obtain the MR-based human mu-map

muodct = nipet.obj_mumap(datain, mMRpars, outpath=opth, store=True) i get the information as fellow: IOError Traceback (most recent call last)

in () 1 # obtain the hardware mu-map (the bed and the head&neck coil) ----> 2 muhdct = nipet.hdw_mumap(datain, [1,2,4], mMRpars, outpath=opth, use_stored=False) 3 # obtain the MR-based human mu-map 4 muodct = nipet.obj_mumap(datain, mMRpars, outpath=opth, store=True) /public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in hdw_mumap(datain, hparts, params, outpath, use_stored, del_interm) 1288 # otherwise generate it from the parts through resampling the high resolution CT images 1289 else: -> 1290 hmupos = get_hmupos(datain, hparts, Cnt, outpath=outpath) 1291 # just to get the dims, get the ref image 1292 nimo = nib.load(hmupos[0]['niipath']) /public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in get_hmupos(datain, parts, Cnt, outpath) 1203 fh = os.path.join(Cnt['HMUDIR'], Cnt['HMULIST'][i-1]) 1204 # get the interfile header and binary data -> 1205 hdr, im = rd_hmu(fh) 1206 #get shape, origin, offset and voxel size 1207 s = hmu_shape(hdr) /public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in rd_hmu(fh) 1066 def rd_hmu(fh): 1067 #--read hdr file-- -> 1068 f = open(fh, 'r') 1069 hdr = f.read() 1070 f.close() IOError: [Errno 2] No such file or directory: '/public/admin/umap_HNMCL_10606489.v.hdr'`
pjmark commented 4 years ago

Hello

That may mean that either you don't have the hardware mu-maps (must be obtained from the scanner) or the path to the mu-maps is incorrect.

Best, Pawel


From: chestnut111 notifications@github.com Sent: 11 December 2019 11:47 To: NiftyPET/NIPET NIPET@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [NiftyPET/NIPET] How to Obtaining the hardware and object 𝜇-maps (#12)

when i run : `# obtain the hardware mu-map (the bed and the head&neck coil) muhdct = nipet.hdw_mumap(datain, [1,2,4], mMRpars, outpath=opth, use_stored=True)

obtain the MR-based human mu-map

muodct = nipet.obj_mumap(datain, mMRpars, outpath=opth, store=True)i get the information as fellow:IOError Traceback (most recent call last) in () 1 # obtain the hardware mu-map (the bed and the head&neck coil) ----> 2 muhdct = nipet.hdw_mumap(datain, [1,2,4], mMRpars, outpath=opth, use_stored=False) 3 # obtain the MR-based human mu-map 4 muodct = nipet.obj_mumap(datain, mMRpars, outpath=opth, store=True)

/public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in hdw_mumap(datain, hparts, params, outpath, use_stored, del_interm) 1288 # otherwise generate it from the parts through resampling the high resolution CT images 1289 else: -> 1290 hmupos = get_hmupos(datain, hparts, Cnt, outpath=outpath) 1291 # just to get the dims, get the ref image 1292 nimo = nib.load(hmupos[0]['niipath'])

/public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in get_hmupos(datain, parts, Cnt, outpath) 1203 fh = os.path.join(Cnt['HMUDIR'], Cnt['HMULIST'][i-1]) 1204 # get the interfile header and binary data -> 1205 hdr, im = rd_hmu(fh) 1206 #get shape, origin, offset and voxel size 1207 s = hmu_shape(hdr)

/public/lixin/.local/lib/python2.7/site-packages/niftypet/nipet/img/mmrimg.pyc in rd_hmu(fh) 1066 def rd_hmu(fh): 1067 #--read hdr file-- -> 1068 f = open(fh, 'r') 1069 hdr = f.read() 1070 f.close()

IOError: [Errno 2] No such file or directory: '/public/admin/umap_HNMCL_10606489.v.hdr'`

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/NiftyPET/NIPET/issues/12?email_source=notifications&email_token=ABPEVHQMNXBWEURDUYZC4MLQYDHLXA5CNFSM4JZNVIC2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H7XSUDA, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPEVHTWY4KLGUJXWKI57BTQYDHLXANCNFSM4JZNVICQ.

chestnut111 commented 4 years ago

mMRpars = nipet.get_mmrparams()

'ENBLAGG': False, 'ENBLXNAT': False, 'ER': 0, 'ETHRLD': 0.05, 'HMUDIR': '/public/admin', 'HMULIST': ['umap_HNMCL_10606489.v.hdr', 'umap_HNMCU_10606489.v.hdr', 'umap_SPMC_10606491.v.hdr', 'umap_PT_2291734.v.hdr'],

There are default parameters, but there are no files in this path

pjmark commented 4 years ago

You need to get the files from a mMR scanner. The mu-maps are not provided by the software, these are provided by Siemens for each scanner.

Get Outlook for Androidhttps://aka.ms/ghei36


From: chestnut111 notifications@github.com Sent: Wednesday, December 11, 2019 11:57:01 AM To: NiftyPET/NIPET NIPET@noreply.github.com Cc: Markiewicz, Pawel p.markiewicz@ucl.ac.uk; Comment comment@noreply.github.com Subject: Re: [NiftyPET/NIPET] How to Obtaining the hardware and object 𝜇-maps (#12)

[image]https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F26037045%2F70619597-51967e00-1c50-11ea-9f73-ea1fb6122bb6.png&data=02%7C01%7C%7C201a223a71f143ce71f908d77e313c13%7C1faf88fea9984c5b93c9210a11d9a5c2%7C0%7C0%7C637116622230500494&sdata=QLMD%2Fuv57KObdtFc6HSdzSt68TdPd3oU6UrcGCZG27M%3D&reserved=0 There are default parameters, but there are no files in this path

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/NiftyPET/NIPET/issues/12?email_source=notifications&email_token=ABPEVHTEZLPRYUYTZFKPU5TQYDIQ3A5CNFSM4JZNVIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGS3LLI#issuecomment-564508077, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPEVHR3DFLYBWEULC3FO3DQYDIQ3ANCNFSM4JZNVICQ.

chestnut111 commented 4 years ago

get it.. thx!