[ITK-users] registering ROI
Pol Monsó Purtí
lluna.nova at gmail.com
Mon Mar 30 05:50:39 EDT 2015
Hello all,
tl; dr
How can I reset the index of two labelObjects' bounding box generated from
a ROIExtractor output to the original image's LargestPossibleRegion()
coordinate system?
--
I need to apply a series of (non-itk) operations on a ShapeLabelObject
present in a small ROI of the image with the purpose of dividing it in two.
I was using ROI filter because among other things I want the Indexes to be
referred to the ROI so it is less complex to refer to the voxels'
coordinates.
But afterwards I need the original Index so that the GetBoundingBox() of
the two generated label objects returns a region that refers to the
original image repectively, while maintaining the size (probably index
offset shift) of the new labelobject.
I could do as for now and store the roi and then do something like
(roi.getIndex() + obj->GetBoudingBox().GetIndex() ) to create a shifted
bounding box, but maybe there is a better way to do it, as read in the
documentation:
The origin coordinates of the output images will be computed in such a way
that if mapped to physical space, the output image will overlay the input
image with perfect registration. In other words, a registration process
between the output image and the input image will return an identity
transform.
So how could I remap to the original "physical space"? I don't know to what
does that phrase refer to, but it sounds like it's exactly what I am trying
to do.
I've looked into SetRequestedRegion also as an alternative, but that would
not give me indexes relative to roi, so I would have to substract them
right before the operations, which might be an option too, but I believe
things get complicated if I do that.
Cheers,
Pol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150330/71eec471/attachment.html>
More information about the Insight-users
mailing list