<div dir="ltr">Hi everyone,<div><br></div><div style>I would like to produce a vector field with each input is the negative of itself:</div><div style><br></div><div style>Is there an easy way to do this in ITK.</div><div style>
<br></div><div style>I am unsure if order is presereved if I do the following</div><div style><br></div><div style><br></div><div style><div>   typedef itk::ImageRegionIteratorWithIndex&lt; FieldType &gt; IteratorType;</div>
<div>  </div><div>   IteratorType it ( SubField, region );</div><div><br></div><div>    for ( it.GoToBegin(); !it.IsAtEnd(); ++it)</div><div>    {</div><div>   FieldType::IndexType idx = it.GetIndex();</div><div>    idx[0] =  index[0] + size[0] - 1 - idx[0];</div>
<div>    it.Set(-DispField-&gt;GetPixel(idx));</div><div>    //std::cout &lt;&lt;idx &lt;&lt;std::endl;</div><div>    }</div><div><br></div><div style>as e.g  SubField[0 29 0] doesn&#39;t equal -DispField[0 29 0]</div><div style>
<br></div><div style>Any suggestions appreciated</div><div style><br></div><div style>Thanks emma</div></div></div>