<div dir="ltr"><div><div><div><div><div><div><div><div>Hello all,<br><br>Similar to [1], I have some questions regarding the use of Indexes and Offsets.<br><br></div>The client will give me a set of coordinates (IndexType). But I'm extracting a ROI with ROIImageFilter which will have the indices corrected (and I want them to be). Therefore I have to correct the aforementioned coordinates too.<br><br></div>The problem I've encountered is that (typewise)<br><br></div>offset = index - index<br><br></div>and, as said on [1], supporting GetPixel(offset) is problematic, so, how do I get an index from an offset?<br><br></div>Bizarrely, ImageBase::ComputeIndex takes OffsetValueType, not OffsetType.<br><br></div>So how I am supposed to do this, other than<br><br></div><div>foreach coordinate<br><div style="margin-left:40px">offset = index - index</div></div><div style="margin-left:40px">for(dim : dimension)<br><div style="margin-left:40px">remappedindex[dim] = offset[dim]<br></div></div></div><div><div><div><div><div><div><div><div><div><div><div><br>?<br><br>[1] <a href="http://public.kitware.com/pipermail/insight-developers/2006-December/008806.html">http://public.kitware.com/pipermail/insight-developers/2006-December/008806.html</a><br></div></div></div></div></div></div></div></div></div></div></div></div>