[Insight-users] areaOpeningImageFilter difficulties

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Wed Jun 17 16:25:24 EDT 2009


Le 17 juin 09 à 21:40, Conrad Bielski a écrit :

> Hi Gaetan,
> my first test I just used a value of 250 (lambda) and I presume it  
> was pixels.

It depends on the parameter UseImageSpacing, which is true by default,  
and the spacing of your image. If the spacing is one on all the  
dimensions, that's equivalent to counting the pixels.


> The output looked correct without too much testing/comparing with  
> other results. When you say that it can work with physical units,  
> you mean that 250 could be a volume (say in L) if you knew that a  
> single pixel = 100mL?

yes, that's it

> For number of pixels, if the type is the default and there is  
> overflow, will I get a message?

no. However, it's quite unlikely that you get overflow with float (the  
default type).

> I presume that I need a larger type if I'm looking for many small  
> areas in a large image, correct?

no, the type needs only to be large enough to store the size of the  
image. Usually, if you work with pixel sizes, you want to use the type  
unsigned long, and set UseImageSpacing to false.

Gaëtan

> Thanks for your help guys, I really appreciate it.
> Conrad :)
>
> --- On Wed, 6/17/09, Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>  
> wrote:
>
> From: Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
> Subject: Re: [Insight-users] areaOpeningImageFilter difficulties
> To: "Conrad Bielski" <conrad_bielski at yahoo.com>
> Cc: "Luis Ibanez" <luis.ibanez at kitware.com>, insight-users at itk.org, Richard.Beare at ieee.org
> Date: Wednesday, June 17, 2009, 10:25 AM
>
>
> Hi,
>
> You won't find that parameter in Richard's original paper. That's a  
> parameter I have added to make the area opening filter able to work  
> with a component object size in pixels or in physical unit with a  
> high precision. When using a number of pixels, you may prefer to  
> used the type unsigned long.
> Most of the time, the default type should be fine though.
>
> Gaëtan
>
>
> Le 17 juin 09 à 14:45, Conrad Bielski a écrit :
>
> > Dear Luis,
> > thanks for that. I actually did find the test code and got it  
> working from there (at least the lambda). I'm actually using OTB and  
> got that hint from their maintainers. I will certainly look at the  
> Journal papers as well in order to know exactly what is going on.
> > Keep up the great work!
> > Conrad :)
> >
> > --- On Wed, 6/17/09, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> >
> > From: Luis Ibanez <luis.ibanez at kitware.com>
> > Subject: Re: [Insight-users] areaOpeningImageFilter difficulties
> > To: "Conrad Bielski" <conrad_bielski at yahoo.com>
> > Cc: insight-users at itk.org, Richard.Beare at ieee.org, "Gaëtan  
> Lehmann" <gaetan.lehmann at jouy.inra.fr>
> > Date: Wednesday, June 17, 2009, 4:40 AM
> >
> > Hi Conrad,
> >
> > You may want to read the description of this filter in
> > the Insight Journal paper:
> >
> >     http://hdl.handle.net/1926/1316
> > http://www.insight-journal.org/browse/publication/203
> >
> > and start from the code of the test:
> >
> > Insight/Testing/Code/Review/
> >        itkAreaOpeningImageFilterTest.cxx
> >
> >
> > It seems that you will be safe by using the default
> > value for the third template parameter "TAttribute".
> > It is used as the type for the components of the
> > image spacing.
> >
> >
> >      Regards,
> >
> >
> >
> >            Luis
> >
> >
> >
> > ----------------------------------------
> > On Tue, Jun 16, 2009 at 11:20 AM, Conrad Bielski <conrad_bielski at yahoo.com 
> > wrote:
> > Hi,
> > I wanted to test the itk::areaOpeningImageFilter but I am unsure  
> of how to specify the TAttribute for this filter. I can't seem to  
> find the documentation for this class.
> >
> > If anybody has some example code that uses this filter and is  
> willing to share or could explain what I need to do I would be very  
> grateful.
> > Thanks in advance and have a great day,
> > Conrad :)
> >
> >
> >
> > _____________________________________
> > 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
> >
> >
> >
>
> --Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
>

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090617/3c9ba232/attachment.pgp>


More information about the Insight-users mailing list