Sunday, November 18, 2012

matlab work

Dr. S. wanted a bugfix for viewer3d.m which is work circa 2005 (or earlier?) It was working for Cardiac SPECT images, but not for Bone SPECT images. Error message was from interp3, complaining that matrix dimensions should be equal. Checked the images, found that the working images were 64x64 while the non-working images were 128x128. Luckily my Matlab install in Dharma was still intact. Found a line in the code,
six=[1:64];
Replaced this with
sizD1=size(D1);
six=[1:sizD1(1,1)];

Now it works, except there is another bug which manifests if the number of images is less than 9. Have saved that bugfix for a rainy day :) Dharma worked just long enough for this fix, now it's not booting!

No comments:

Post a Comment