<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Gaëtan,<br><br>This is my suggestion for fitting each label object to a model defined by an arbitrary function (eg Gaussian):<br><br>(1) A model can be described by an ITK spatial object, eg itk::GaussianSpatialObject.<br><br>(2) Following the example given in \binaryAttributeMorphology\generic_attribute.cxx, in your IJ article, we can iterate over each label and access the pixels.<br><br>(3) Following the example given in \Testing\Code\Numerics\itkLevenbergMarquardtOptimizerTest.cxx, we may use the non-linear Levenberg-Marquardt optimiser<br>to fit the model given in (1) to the image obtained in (2).<br><br><br>Does this seem feasible to you? Any suggestions to improve it?<br></div><br>> <br>> Le 18 oct. 07 à 01:04, Ali - a écrit :<br>> <br>> > Gaëtan,<br>> ><br>> > What would be the best way of iterating over a 'label map'<br>> <br>> you can iterate over simply by using their labels :<br>> <br>> labelMap = filter.GetOutput()<br>> for label in range(0, labelMap.GetNumberOfLabelObjects()+1 ):<br>> labelObject = labelMap.GetLabelObject(label)<br>> <br>> > and fit each indivdual object to a know model (eg 2D Gaussian) and <br>> > then adding the attributes of the fitting (eg the sigma of the <br>> > Gaussian fit) to the corresponding object? I guess this could be a <br>> > good extention of your binary attribute morphology classes.<br>> <br>> I don't know how to fit a 2D gaussian. It may be an interesting <br>> feature though.<br>> If you can provide some informations about that, and if that's not <br>> much difficult, I would be pleased to add it :-)<br>> <br>> Regards,<br>> <br>> Gaëtan<br>> <br>> <br><br><br /><hr />Play Movie Mash-up and win <a href='https://www.moviemashup.co.uk' target='_new'>BIG prizes! </a></body>
</html>