[ITK-users] Offset and Index
Pol Monsó Purtí
lluna.nova at gmail.com
Wed Apr 15 12:22:08 EDT 2015
Hello all,
Similar to [1], I have some questions regarding the use of Indexes and
Offsets.
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.
The problem I've encountered is that (typewise)
offset = index - index
and, as said on [1], supporting GetPixel(offset) is problematic, so, how do
I get an index from an offset?
Bizarrely, ImageBase::ComputeIndex takes OffsetValueType, not OffsetType.
So how I am supposed to do this, other than
foreach coordinate
offset = index - index
for(dim : dimension)
remappedindex[dim] = offset[dim]
?
[1]
http://public.kitware.com/pipermail/insight-developers/2006-December/008806.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150415/d5fec9b9/attachment.html>
More information about the Insight-users
mailing list