[Insight-users] How to label the output of binary threshold filter

Ali - saveez at hotmail.com
Mon Oct 22 10:49:39 EDT 2007


Gaëtan,

This is my suggestion for fitting each label object to a model defined by an arbitrary function (eg Gaussian):

(1) A model can be described by an ITK spatial object, eg itk::GaussianSpatialObject.

(2) Following the example given in \binaryAttributeMorphology\generic_attribute.cxx, in your IJ article, we can iterate over each label and access the pixels.

(3) Following the example given in \Testing\Code\Numerics\itkLevenbergMarquardtOptimizerTest.cxx, we may use the non-linear Levenberg-Marquardt optimiser
to fit the model given in (1) to the image obtained in (2).


Does this seem feasible to you? Any suggestions to improve it?

> 
> Le 18 oct. 07 à 01:04, Ali - a écrit :
> 
> > Gaëtan,
> >
> > What would be the best way of iterating over a 'label map'
> 
> you can iterate over simply by using their labels :
> 
> labelMap = filter.GetOutput()
> for label in range(0, labelMap.GetNumberOfLabelObjects()+1 ):
>    labelObject = labelMap.GetLabelObject(label)
> 
> > and fit each indivdual object to a know model (eg 2D Gaussian) and  
> > then adding the attributes of the fitting (eg the sigma of the  
> > Gaussian fit) to the corresponding object? I guess this could be a  
> > good extention of your binary attribute morphology classes.
> 
> I don't know how to fit a 2D gaussian. It may be an interesting  
> feature though.
> If you can provide some informations about that, and if that's not  
> much difficult, I would be pleased to add it :-)
> 
> Regards,
> 
> Gaëtan
> 
> 


_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071022/f137fb96/attachment.htm


More information about the Insight-users mailing list