<div><br></div><div>Need some help here!</div><div><br></div><div>How to properly use the neighborhood iterators on vector images using ZeroFluxNeumannCondition (using ITK 3.20.0) ?</div><div><br></div><div>Currently I am doing this, but it gives memory error on running (probably because the vector length is unknown in the typedef), see code below. In the last line, the program fails. The ConstNeighborhoodIterators have default ZeroFluxNeumann. </div>

<div><br></div><div>Many thanks, Rashindra</div><div><br></div><div><br></div><div>typedef VectorImage&lt;&gt; VT;</div><div>typedef ConstNeighborhoodIterator&lt;VT&gt; NT</div><div><br></div><div>NT::RadiusType radius;</div>

<div>radius.Fill();</div><div><br></div><div>NT iter (rad, img, img-&gt;GetLargestPossibleRegion());</div><div>iter.GoToBegin();</div><div>iter.GetNeighborhood();</div><div><br></div><div><br></div><div><br></div><div><br>

</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 13:30, Rashindra Manniesing <span dir="ltr">&lt;<a href="mailto:rashindra@gmail.com">rashindra@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br><div>I was wondering whether there exists a convenient class to convert a scalar image into a vector image (e.g. from 4D to 3D vector) directly by specifying the dimension, without explicitly extracting the each subimage and composing them into a vector image?</div>


<div><br></div><div>Kind regards, Rashindra</div>
</blockquote></div><br>