[MINC-users] interpolating missing slices?
Andrew Janke
a.janke at gmail.com
Thu Oct 27 23:08:44 EDT 2011
Hi Alex,
> I have a stack of image slices with some slices missing, and I would
> like to stitch those together into a volume by interpolating the
> missing slices. Does anybody have a suggestion on what would be an
> efficient way to do this? I initially thought volregrid would do this
> sort of thing but it seems not (or if it does, I have not been able to
> figure out how to use it :)
Well volregrid will do it but it's probably not the most straight
forward way. I do this:
1. hack the volume up into a series of 1 slice images and skip the blank ones.
for i in `seq 1 200`; do
mincreshape -dimrange zspace=$i,1 in.mnc tmp/$i.mnc
done
# remove the dud ones
rm tmp/<blah>mnc
2. put it all back together
mincconcat tmp/*.mnc concat.mnc
3. You will not have a volume with irregular spacing. so make it regular:
mincresample -sync -zstep 1 concat.mnc concat-reg.mnc
This is a little script of mine that will figure out a good step size
for step 3 in you are interested. It also makes the volume isotropic
so perhaps not what you want
http://packages.bic.mni.mcgill.ca/scripts/voliso
If however your data is label data, then I'd use morphological
interpolation, I am writing code to do this now for some mouse mapping
labels that I can make available.
ta
a
More information about the MINC-users
mailing list