[MINC-users] interpolating missing slices?

Alex Zijdenbos zijdenbos at gmail.com
Fri Oct 28 11:59:24 EDT 2011


Hi Andrew,

One issue that came up here:

I assume you meant '-sinc' in the mincesample call; but interestingly,
mincresample seems to ignore any interpolation suggestion in this
scenario; it seems to always use linear interpolation regardless of
what you specify on the command line. In other words,

mincresample -nearest
mincresample -trilinear
mincresample -sinc

when resampling a volume with irregular slice spacing all give
identical output. That seems like a bug to me...?

-- A

On Thu, Oct 27, 2011 at 11:08 PM, Andrew Janke <a.janke at gmail.com> wrote:
> 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
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
>


More information about the MINC-users mailing list