[Insight-users] label object manipulation

Padfield, Dirk R (GE, Research) padfield at research.ge.com
Wed Jul 1 10:09:20 EDT 2009


Hello Gaëtan,

I went through your derivations, and they look perfect!  This is quite valuable.

Thanks,
Dirk.


-----Original Message-----
From: Gaëtan Lehmann [mailto:gaetan.lehmann at jouy.inra.fr] 
Sent: Wednesday, July 01, 2009 9:18 AM
To: Padfield, Dirk R (GE, Research)
Cc: lynx.abraxas at freenet.de; insight-users at itk.org
Subject: Re: [Insight-users] label object manipulation


Le 30 juin 09 à 16:08, Padfield, Dirk R (GE, Research) a écrit :

> Hello Gaëtan,
>

Hi Dirk,

> Thanks a lot for your message.  As you mentioned, the 
> itkLabelGeometryImageFilter does not yet take pixel spacing into 
> account, and I need to find time to make this extension.  This 
> extension should, however, be fairly straightforward.  For the problem 
> of including the voxel thickness in the moment calculation, I believe 
> the derivation of Equation 20 in the itkLabelGeometryImageFilter 
> documentation 
> (http://insight-journal.com/download/viewpdf/301/4/download
> ) should be useful since it is derived by analytically calculating the 
> moment of a pixel.  It should be easy to generalize this derivation to 
> take into account pixel spacing.
>
> I hope this helps,

I think so :-)
I've modified the equations you used to compute the constant in the algorithm. It is now in 3D and takes the spacing into account.
They are available at

   http://files.getdropbox.com/u/1418771/eq.pdf

Just to be sure, can you tell me if you see any mistake?

Thanks,

Gaëtan


> Dirk.
>
>
>
> -----Original Message-----
> From: Gaëtan Lehmann [mailto:gaetan.lehmann at jouy.inra.fr]
> Sent: Tuesday, June 30, 2009 5:00 AM
> To: lynx.abraxas at freenet.de; Padfield, Dirk R (GE, Research)
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] label object manipulation
>
>
> Le 29 juin 09 à 23:31, lynx.abraxas at freenet.de a écrit :
>
>> Dear Gaëtan Lehmann,
>>
>>
>> Thanks  a  lot  for You quick answer. With Your hints it was easy to 
>> extend my little program to suit my needs further.
>> I'm wondering though if the article is the best documentation to work 
>> with.  I
>> couldn't   find   the   Perimeter   attribute   only
>> EquivalentPerimeter  and
>> EquivalentEllipsoidPerimeter. The connectivity is also only mentioned 
>> in  the examples.  Is there another documentation where these are 
>> explained and that I should read before asking here?
>>
>
> No, there is no other document, but you can look at the source! All 
> the attributes are listed in
>
>   http://voxel.jouy.inra.fr/darcs/contrib-itk/binaryAttributeMorphology/itkShapeLabelObject.h
>   
> http://voxel.jouy.inra.fr/darcs/contrib-itk/binaryAttributeMorphology/
> itkStatisticsLabelObject.h
>
> And you're right, I forgot to put the perimeter in the attribute list.
> I'll try to fix that in a next revision.
>
>> In the footnote it says there'll be more about perimeter estimation 
>> in another article. Is that published already?
>>
>
> No, not yet.
>
>> I  noticed  that GetEquivalentEllipsoidSize yields nan/inf if the 
>> bounding box is only 1 pixel wide. When I used the image moments of 
>> Avizo to calculate  the axes lengths a bounding box width of 1 pixel 
>> wasn't a problem. I'm not sure if this result from Avizo is good but 
>> with my current understanding a full  axis length of 1 (or 0.5 for a 
>> semi axis) would be sensible, wouldn't it?
>
> I have this problem also, and it's quite annoying. It's caused by an 
> approximation in the moment computations: the voxel thickness is not 
> used.
> The formulae I used are very common, and I didn't find an easy way to 
> include it. In http://insight-journal.com/browse/publication/
> 301 , this information is used, but unfortunately, the spacing is not.
> Also, I don't think that putting 1 (or 1/2) axis if the size is 0 on 
> this axis would be nice, because it would make the result quite 
> different of the case where there the size is very thin but not zero.
> Something like
>
>    0000000000000000000000000000
>
> and
>
>    0000000000000000000000000000
>           0
>
>
>> If  it's not possible to calculate that, would it be possible to get 
>> an output letting the filter assume only 2D for these objects?
>
>
> I would prefer getting a non-approximated formulae for the moment 
> computation which take care of the spacing. I'm quite sure it's not 
> that complicated, but, well, that's not my field of competences.
>
> If someone has some documentation, or has the needed knowledge on that 
> point, I would really appreciate some help!
>
> Gaëtan
>
>
>
>
> --
> 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



More information about the Insight-users mailing list