[ITK] [ITK-users] registering ROI
Pol Monsó Purtí
lluna.nova at gmail.com
Mon Mar 30 09:53:20 EDT 2015
Hello Bradley,
Great, I'll try out the first approach you suggested.
Alternativelly, if I still have the RegionType roi at hand, how could I use
it to my advantatge using setRegions of the output image? Something that
does the reverse of RegionOfInterestImageFilter.
And what about the approach of changing the BoundingBox's index of the
labelObject?
--
On a side note, I am confused by your second paragraph, in my case:
Since you have done the ROI extraction with ITK
and
> you can use the RegionOfInterestImageFilter
>
are the same thing.
I indeed used the filter to extract the ROI, the indices are re-computed so
they start to [0,0,0], not with the same indexing as the first image as you
said (and that's what I want, so all good here ;)). Maybe you were
referring to the physical point?
Cheers,
Pol
2015-03-30 13:15 GMT+02:00 Bradley Lowekamp <blowekamp at mail.nih.gov>:
> Hello,
>
> Since you have done the ROI extraction with ITK, then the physical
> location of each pixel has been maintained. Use the ROI Image's
> TransformIndexToPhysicalPoint method[1], then use your original image's
> TransformPhysicalPointToIndex method[2]. This would be the most generalized
> and robust method which the documentation refers too. You could use it to
> validate your optimized approach.
>
> Yes, alternatively you can use the RegionOfInterestImageFilter ( I believe
> ) to extract a region which has a non-zero starting index, and is the same
> indexing and the input image. Alternatively you can use the pipeline and
> rely on the streaming to produce the regions, but then you have to deal
> with the fact that the buffered region is different than the largest
> possible region. There are many possibilities on what to do here.
>
> Hope that helps,
> Brad
>
> [1]
> http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#ab003313ba1a078d89a832dc0a35d2efa
> [2]
> http://www.itk.org/Doxygen/html/classitk_1_1ImageBase.html#af4a7c9c3787e9fdafbaaade2e02efa25
>
> On Mar 30, 2015, at 5:50 AM, Pol Monsó Purtí <lluna.nova at gmail.com> wrote:
>
> > 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
> >
> >
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/insight-users
> > _______________________________________________
> > Community mailing list
> > Community at itk.org
> > http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150330/ba6833a2/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list