[Insight-users] interpolation in 3D

Ahmed Shaban ahmdsamir80 at gmail.com
Mon May 9 05:51:07 EDT 2011


Hi,

I am trying to do some 3D interpolation in the following manner:

Start with an 3D Volume of unsgined char for example 512x512x100


on the first axial slice i draw a circle in the middle with 2D pixels of 255

say 10 slices later i draw a smaller circle in the center so the sagittal
view would be like:

..............................
o............................
o............................
o............................
o............................
o............................
o............................
o............................
o............................
o............................
o.................o.........
o.................o.........
o.................o.........
o............................
o............................
o............................
o............................
o............................
o............................
o............................
o............................
o............................
..............................
what I do is that  I copy slices 0 and 11 to a new empty 3d volume of size
(512x512x2) , adjust the z spacing of the new volume to 10xoriginal z
spacing
and use
continuousIndex and LinearInterpolateImageFunction to calculate the values
of the empty slices (ex. at continuousIndex of (0,0,0.2),
(0,0,0.4).....etc)  and write those values to the original image and what i
get is this:

..............................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo...................
oooooo...................
oooooooooooo.........
oooooooooooo.........
oooooooooooo.........
oooooo...................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
oooooo..................
..............................

while I was expecting a cone:

..............................
o............................
oo..........................
ooo........................
oooo......................
ooooo....................
oooooo..................
ooooooo...............
oooooooo............
ooooooooo...........
oooooooooo.........
oooooooooooo.....
oooooooooooo....
oooooooooooo....
oooooooooo.......
ooooooooo.........
ooooooo............
ooooo...............
oooo.................
ooo...................
oo.....................
o.......................
.........................

How come I did not get the cone like output i expected?

Thanks,
Ahmed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110509/47253757/attachment.htm>


More information about the Insight-users mailing list