DrSAR / SARlabpy

git clone git@pfeifer.phas.ubc.ca:SARlabpy (do not push to github, please)
http://code.SARlab.ca
Other
1 stars 0 forks source link

resample onto pdata only works for certain data sets #274

Open firasm opened 10 years ago

firasm commented 10 years ago

bug found when SAR was playing around with resampling anatomy images on top of LL scans.

Study: herS11

DrSAR commented 10 years ago

yeah. see here:

masterlist = json.load(open(os.path.expanduser(
                      '~/sdata/HerS11/HerS11.json'),'r'))
import sarpy.ImageProcessing.resample_onto as sir
src = sarpy.Scan(masterlist['HerS11Bs14']['anatomy-0h+'][0]).pdata[0]
target = sarpy.Scan(masterlist['HerS11Bs14']['LL-0h+2'][0]).pdata[0]
print src.d3proc.DATE, target.d3proc.DATE
xxx = sir.resample_onto_pdata(src, target, replace_nan=0)
print xxx.shape
imshow(src.data[:,:,20], cmap='gray')
show()
imshow(xxx[:,:,2], cmap='gray')
show()
firasm commented 9 years ago

Hmm - believe it or not, this bug doesn't seem to exist anymore. Here is the output of the above code:

Code seems to do what's expected...

screen shot 2015-04-05 at 11 19 50 pm

Wait for @DrSAR to comment and then close the issue.