<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello,<br>
<br>
I have a vector field that has the displacement vector for each voxel in a volume.  I am trying to apply this deformation and visualize the results.  The difficulty I am have is that the deformation only exist for the voxels inside the volume, not globally
 in the whole space. If I set the displacement to zeros outside the volume I get poor results.<br>
<br>
My toy example is just do to a 10 voxel shift in the x direction The volume is padded with zeros so there is plenty of room.  The result is an image missing about ten voxels.  See attached picture.  If I make a similar deformation that exist at all voxels,
 the result is as expect.  Any advice. Also, a code snippet is below.<br>
<br>
Thanks in advanced<br>
Ryan<br>
<br>
grid=vtk.vtkGridTransform()<br>
grid.SetDisplacementGrid(defImporter.GetOutput())<br>
grid.SetInterpolationModeToLinear()<br>
<br>
reslice=vtk.vtkImageReslice()<br>
 reslice.SetWrap(1)<br>
 reslice.SetResliceTransform(grid)<br>
 reslice.SetInterpolationModeToLinear()<br>
 reslice.SetOutputSpacing(1,1,1)<br>
 reslice.SetOutputOrigin(0,0,0)<br>
 reslice.SetInputConnection(volImporter.GetOutputPort())<br>
</div>
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information protected by law. Any unauthorized review, use, disclosure or distribution is prohibited.
 If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
</body>
</html>