[ITK Community] [Insight-users] SetFixedImageRegion

Iyas Hamdan iyas.hamdan at gmail.com
Mon Feb 24 04:43:38 EST 2014


Hi Matt,
Thanks for your answer,

And I dont actually see what you mean exactly, could you please elaborate a
bit more ?

>From what I understood, I should make this const iterater walks the mask
image, and when he comes across a value that is different from zero I
should save the index which would be the starting index of my region.

Is that it ?

And if so, there would be a problem I think, because I dont have one region
of interest but have two or three sometimes.

So how could I determine the size and starting index in that case ?

Thank you in advance for your answers,

Iyas


On Fri, Feb 21, 2014 at 10:44 PM, Matt McCormick <matt.mccormick at kitware.com
> wrote:

> Hi Iyas,
>
> One option would apply the ImageLinearConstIteratorWithIndex [1] to
> find the starting index and size that define the ImageRegion.
>
> HTH,
> Matt
>
> [1]
> http://www.itk.org/Doxygen/html/classitk_1_1ImageLinearConstIteratorWithIndex.html
>
> On Fri, Feb 21, 2014 at 8:19 AM, Iyas Hamdan <iyas.hamdan at gmail.com>
> wrote:
> > Hi,
> > I'm working on a 2D registration methode. I'm using an affine
> transformation
> > with the metric being the mutual information.
> >
> >
> > The point is that I dont want to consider the whole fixed image in the
> > registration process, so what I should do is choose a region of interest.
> >
> > I have a binary image with a value of 1 where I want to take the pixels
> in
> > consideration ( my ROI ) and 0 elsewhere.
> >
> > I tried to set the metric fixed image mask to my binary image (using
> > spatialobjectmask)
> >
> > But sometimes I get the next error : "A spacing of 0 is not allowed" even
> > thought I'm not changing the spacing at all!
> >
> > But since the region I want to focus on is a rectangle, I thought maybe
> it
> > would be easier to use FixedImageRegion for the registration process not
> for
> > the metric.
> >
> > So, my question is, how can I pass my mask to the FixedImageRegion
> function
> > ?
> >
> > Thanks
> >
> > Iyas
> >
> > _____________________________________
> > 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://www.itk.org/mailman/listinfo/insight-users
> >
> > _______________________________________________
> > Community mailing list
> > Community at itk.org
> > http://public.kitware.com/cgi-bin/mailman/listinfo/community
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140224/03590cb4/attachment-0002.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://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list