<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Don't you just do gradientFilter-&gt;SetDimensionality(3) to get a 3d output? This is what you do in ParaView...<div><br></div><div>-Eric</div><div><br></div><div><br><div><div><div>On Oct 8, 2010, at 9:08 AM, David Doria wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>If I use&nbsp;<span style="font-family:monospace;font-size:10px;white-space:pre-wrap">vtkImageGradient on a 2D image, a 2D ImageScalarsGradient is produced. If I want to glyph these vectors as arrows, they must be 3D (in order to call </span><span style="font-family:monospace;font-size:12.5px;line-height:16px;white-space:pre-wrap">SetActiveVectors).I tried converting them to 3D manually but it causes the example to segfault (after the interactor starts). Can anyone see what is wrong with this?</span></div>

<div><span style="font-family:monospace;font-size:12.5px;line-height:16px;white-space:pre-wrap"><br></span></div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Gradient" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Gradient</a><div>

<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/Gradient" target="_blank"></a><br clear="all">Thanks,<br><br>David<br>
</div>
</blockquote></div><br></div></div></body></html>