[Insight-users] Using spatial objects for masking

David Pastor david.pastor at die.upm.es
Fri Nov 12 09:56:31 EST 2010


Hello,

I've tried to use ImageMaskSpatialObject to mask my fixed image, but it 
seems that it gives me computational problems as the registration starts but 
never returns the value of the metric. Can it be because it gets really 
slow? or do I miss something else?

The code works fine if I just remove the line SetFixedImageMask.

An alternative is to use SetFixedImageRegion, but then I'm not very sure 
that the fixed would be correctly aligned with the moving...

Best
David


----- Original Message ----- 
From: "Karthik Krishnan" <karthik.krishnan at kitware.com>
To: "David Pastor" <david.pastor at die.upm.es>
Cc: <insight-users at itk.org>
Sent: Thursday, November 11, 2010 1:23 PM
Subject: Re: [Insight-users] Using spatial objects for masking


> ImageMaskSpatialObject is what you need. You can set these for the
> fixed and moving image.
>
> For limiting metric computation to axis aligned regions in addition,
> you can use SetFixedImageRegion. This method is not available for the
> moving image.
>
> If you need more fancy region specifications, you can create your own
> spatial object, since the registration frameowork will accept any
> fixed and moving spatial object.
>
> --
> karthik
>
> On Thu, Nov 11, 2010 at 5:16 PM, David Pastor <david.pastor at die.upm.es> 
> wrote:
>> Hello,
>>
>> I'm trying to select the right mask for a registration process. I've seen
>> that ImageSpatialObject can be used as mask to restrict the metric to a
>> specific region, but it does count zero values. ImageMaskSpatial object 
>> does
>> not count them as it returns false for isInside, but I'm not sure it does 
>> it
>> for the whole image or you can define a region where to check, so what 
>> I'm
>> looking for is a mask that defines a region (so a binary spatial object 
>> is
>> defined) and within that region it does not count zero values.
>>
>> Best,
>> David
>> _____________________________________
>> 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.html
>>
>> 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 Insight-users mailing list