[Insight-users] Getting overlap region

Andreas Schuh andreas.schuh.84 at googlemail.com
Tue Feb 17 06:28:04 EST 2009


Well, of course I meant rigid pre-registration ...

Am 17.02.2009 um 12:24 schrieb Andreas Schuh <andreas.schuh.84 at googlemail.com 
 >:

> Hi!
>
> Well, that's more or less the same issue, when I was thinking about  
> this overlap thing. Well, I got a solver from a fellow that computed  
> an overlap cube of two other cubes that has minimal extent/volume,  
> where the direction of this cube is the one of the coordinate system  
> (this solver is based on a simplex approach I think). I've  
> implemented an ITK filter that uses this solver to get an  
> ImageRegion and Direction matrix (orientation of the overlap cube),  
> where I set the direction to the direction of the fixed image. These  
> can then be passes to ResampleImageFilter to resample both images,  
> fixed and moving, within the overlap. Unfortunately, my current  
> implementation doesn't work. However, I didn't focus on this any  
> more as for me, it was enough to just resample both images on a grid  
> with the same direction and extent as the fixed image. This is  
> because non-parametric registratration requires non-rigid pre- 
> registration in most cases. So the misalignment of the image regions  
> themselves isn't that much (and the borders seldomly contain  
> something of interest). After pre-registration you could also just  
> resample the images on a grid with the direction of the fixed image  
> but the extent large enough to cover at least both fixed and moving  
> images.
>
> I think I just have an idea how you can get the mask you want.
>
> Resample the moving image on a grid that has the same direction and  
> size as the fixed image. So, use ResampleImageFilter and set the  
> fixed image as reference image. Set the outside value appropriately  
> to reflect the "masked out meaning".
> Depending on the mask format your metric assumes, you may just use  
> the resulting image as mask or apply a threshold to get a binary  
> mask image.
>
> --
> regards
> Andreas
>
> Am 17.02.2009 um 09:43 schrieb Erik Türke <erik_tuerke at hotmail.com>:
>
>> Hi!
>>
>> Thanks for the response.
>>
>> I´ll try to explain yout the issue.
>> It is all about a regsitration problem.
>> I have two images, a fixed and a moving image. Lets consider the  
>> fixed image is of dimension [192 130 192] and the moving image is  
>> of dimension [192 7 192].
>> The metric will give you a sample exception error because too many  
>> samples are outside the moving image.
>> Now, what i want to do is to define a mask, which contains the  
>> overlap of the two images and pass it to the metric- 
>> >SetFixedImageMask() method, which expects a ImageMaskSpatialObject.
>>
>> So now my problem is how to compute an overlap(image,  
>> spatialobject) containing the fixed and the moving images, or the  
>> fixed and the moving spatial objects, respectively.
>> And i assume, i am capable of creating an ImageMaskSpatialObject  
>> with the help of the obtained overlap image or object and pass it  
>> to the metric.
>>
>>
>> thanks and best regards!
>>
>>
>> > From: andreas.schuh.84 at googlemail.com
>> > To: luis.ibanez at kitware.com
>> > Subject: Re: [Insight-users] Getting overlap region
>> > Date: Mon, 16 Feb 2009 12:11:05 +0100
>> > CC: erik_tuerke at hotmail.com; insight-users at itk.org
>> >
>> > Hi,
>> >
>> > the difference of determining the overlap region of two single
>> > ImageRegions and of getting the overlap of two oriented images or
>> > spatial objects is, that in the former case the regions are not
>> > oriented (considered having the same orientation) whereas in the
>> > latter cases you may have to be corncerned with the orientation of
>> > your regions, too. In this case ImageRegion::Crop won't help if you
>> > would like to have the oriented overlap region of minimal volume.
>> > That's a more difficult task, where you will have to solve some
>> > optimization problem probably by some kind of simplex algorithm.
>> >
>> > Otherwise, as you Erik are interested in spatial objects and I  
>> assume
>> > that the bounding boxes of these (SpatialObjects::GetBoundingBox)  
>> are
>> > all oriented along the axes of the coordinate system, you have a
>> > simpler task which can be solved by using ImageRegion::Crop.
>> >
>> > --
>> > regards
>> > Andreas
>> >
>> > Am 15.02.2009 um 22:52 schrieb Luis Ibanez  
>> <luis.ibanez at kitware.com>:
>> >
>> > >
>> > > Hi Erik,
>> > >
>> > > The easiest method is among ImageRegions.
>> > >
>> > > In that case, simply use:
>> > >
>> > > itk::ImageRegion::Crop()
>> > >
>> > > If you have two image regions
>> > >
>> > > itk::ImageRegion regionA;
>> > > itk::ImageRegion regionB;
>> > >
>> > > Then you can find the overlap by doing
>> > >
>> > > regionA.Crop( regionB )
>> > >
>> > > The common region will be stored in the
>> > > variable regionA.
>> > >
>> > >
>> > > Regards,
>> > >
>> > >
>> > > Luis
>> > >
>> > > ------------------
>> > > Erik Türke wrote:
>> > >> Hi!
>> > >> Thanks for your response.
>> > >> Actually it doesnt matter, if i am doing this with an image, an
>> > >> image region, or spatial object, since you can convert these  
>> types
>> > >> amoung themselves. I guess ;-)
>> > >> I think, i would prefere the easiest method.
>> > >> But if there is no difference between the effort of these  
>> methods,
>> > >> i would take the SpatialObject method.
>> > >> Thanks!
>> > >> best regards!
>> > >> > Date: Thu, 12 Feb 2009 11:16:21 -0500
>> > >> > From: luis.ibanez at kitware.com
>> > >> > To: erik_tuerke at hotmail.com
>> > >> > CC: insight-users at itk.org
>> > >> > Subject: Re: [Insight-users] Getting overlap region
>> > >> >
>> > >> >
>> > >> > Hi Erik,
>> > >> >
>> > >> > You question is too general.
>> > >> >
>> > >> > Could you elaborate on it please ?
>> > >> >
>> > >> > Do you :
>> > >> >
>> > >> > a) Have two images and want to create a third
>> > >> > image containing the overlap of the two images ?
>> > >> >
>> > >> > OR
>> > >> >
>> > >> > b) Have two itkImageRegions and want to compute
>> > >> > the itkImageRegion that represents the overlap
>> > >> > of the two ?
>> > >> >
>> > >> > OF
>> > >> >
>> > >> > c) Have two itkSpatialObjects and you are trying to
>> > >> > compute the itkSpatialObject representing their
>> > >> > overlap ?
>> > >> >
>> > >> >
>> > >> >
>> > >> > Thanks
>> > >> >
>> > >> >
>> > >> > Luis
>> > >> >
>> > >> >
>> > >> > ------------------
>> > >> > Erik Türke wrote:
>> > >> > > Hi!
>> > >> > >
>> > >> > > I am asking myself if there is any possibility to get the
>> > >> region of an
>> > >> > > overlap of 2 images or a new object containing the overlap  
>> of 2
>> > >> other
>> > >> > > objects, respectively.
>> > >> > >
>> > >> > > Thanks fr your help!
>> > >> > >
>> > >> > > Best regards!
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> ---
>> > >>  
>> ---------------------------------------------------------------------
>> > >> > > MSN Mobile: Die neuesten Infos aus der Welt der Stars und
>> > >> Sternchen zum
>> > >> > > Mitnehmen!
>> > >> > > <http://redirect.gimas.net/?cat=hmtl&n=M0809MSNMobile&d=http://info.mobile.de.msn.com/pc/default.aspx
>> > >> >
>> > >> > >
>> > >> > >
>> > >> > >
>> > >> ---
>> > >>  
>> ---------------------------------------------------------------------
>> > >> > >
>> > >> > > _____________________________________
>> > >> > > Powered by www.kitware.com
>> > >> > >
>> > >> > > Visit other Kitware open-source projects at
>> > >> > > http://www.kitware.com/opensource/opensource.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
>> > >> ---
>> > >>  
>> ---------------------------------------------------------------------
>> > >> Messenger Online Treff: Spontan chatten, über Hobbies reden,  
>> sofor
>> > >> t Spass haben? Jetzt klicken! <http://redirect.gimas.net/?cat=hmtl&n=M0809MOT&d=http://messenger.live.de/community/messenger-online-treff.aspx
>> > >> >
>> > > _____________________________________
>> > > Powered by www.kitware.com
>> > >
>> > > Visit other Kitware open-source projects at
>> > > http://www.kitware.com/opensource/opensource.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
>>
>> Speichern Sie Ihre Daten von überall! Kostenlos: Die Festplatte im 
>>  Netz mit 5 GB Speicher!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090217/9f080c0a/attachment.htm>


More information about the Insight-users mailing list