<div dir="ltr">Hi,<br><br>I am trying to do some 3D interpolation in the following manner:<br><br>Start with an 3D Volume of unsgined char for example 512x512x100<br><br><br>on the first axial slice i draw a circle in the middle with 2D pixels of 255<br>
<br>say 10 slices later i draw a smaller circle in the center so the sagittal view would be like:<br><br>..............................<br>o............................<br>o............................<br>o............................<br>
o............................<br>o............................<br>o............................<br>o............................<br>o............................<br>o............................<br>o.................o.........<br>
o.................o.........<br>o.................o.........<br>o............................<br>o............................<br>o............................<br>o............................<br>o............................<br>
o............................<br>o............................<br>o............................<br>o............................<br>..............................<br>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<br>
and use <br>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:<br>
<br>..............................<br>
oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo...................<br>

oooooo...................<br>
oooooooooooo.........<br>
oooooooooooo.........<br>
oooooooooooo.........<br>
oooooo...................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>oooooo..................<br>
oooooo..................<br>..............................<br><br>while I was expecting a cone:<br><br>..............................<br>o............................<br>oo..........................<br>ooo........................<br>
oooo......................<br>ooooo....................<br>oooooo..................<br>ooooooo...............<br>oooooooo............<br>

ooooooooo...........<br>

oooooooooo.........<br>

oooooooooooo.....<br>

oooooooooooo....<br>

oooooooooooo....<br>

oooooooooo.......<br>
ooooooooo.........<br>ooooooo............<br>
ooooo...............<br>oooo.................<br>ooo...................<br>oo.....................<br>o.......................<br>.........................<br><br>How come I did not get the cone like output i expected?<br>
<br>Thanks,<br>Ahmed<br><br><br></div>