[Insight-developers] itk Genetic Algorithm optimizer

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 11 16:38:57 EST 2006


Hi Alize,

The problem seems to be that you are calling the GetValue()
method of the optimizer:


               this->GetValue( testValues )


instead of calling the GetValue() method of the cost function.


You should use:


            m_CostFunction->GetValue( testValues )



BTW, You Genetic optimizer will make an excellent paper for the
Insight Journal ! we encourage you to consider submitting it
as soon as you get it working. In this way it will be considered
for being included in the toolkit.

Instructions on how to prepare a submission for the Insight Journal
can be found at:

http://www.itk.org/Wiki/ITK_Procedure_for_Contributing_New_Classes_and_Algorithms



    Regards,


        Luis



-----------------------
Alize Scheenstra wrote:
> Hi,
> 
> For a registration of 3D images, I have implemented a genetic algorithm 
> optimizer, see the code below. But for some reason, the cost function 
> doesn't work in itkGeneticOptimizer::GetFitness()
> this->GetValue(tempValues);
> The first 4 times it returns an error and all times afterwards it 
> returns the same value, although the tempValues change each run.
> It also happens with an identity transform with the same moving and 
> fixed image. Also changing the cost function doens't work.
> 
> Can someone please tell me what went wrong???
> 
> Thank you in advance,
> 



More information about the Insight-developers mailing list