[Insight-users] singleValuedCostFunction vs MultiValuedCostFunction

Julien Jomier jjomier at cs.unc.edu
Mon Feb 7 16:28:26 EST 2005


Hi Bertrand,

The main difference between the SingleValuedCostFunction and the 
MultiValuedCostFunction is the type of the measure the cost function is 
returning.
For a SingleValuedCostFunction only one measure is returned (and 
optimized). For a MultiValuedCostFunction an array of measures is returned.

The choice of the cost function really depends on the type of optimizer 
your are using. For instance, Levenberg-Marquardt optimizer is expecting 
multiple values and GradiendDescent single value.

 > I would like two kind of cost functions in a registration process.

Are you going to optimize the two cost functions at the same time? 
meaning are you trying to minimize the sum of the cost functions? or do 
you want to use different optimizers for each of the cost functions?

If you want to use only one optimizer, the best way is to write your own 
metric and return a value which combines the energy and the 
regularization term. Your can derive your metric from 
itkPointSetToImageMetric and add a function to add another image or you 
can derive from ImageToImageMetric and add a function to add a PointSet.

regards,

Julien

bertrand wrote:
> hi all
> 
> I would like two kind of cost functions in a registration process.
> The first one is used as a data driven energy term ( for example an 
> itkImageToImageMetric) .
> The second one could be considered as  a regularization  data term ( for 
> exmaple an itkPointSetToImageMetric) .
> 
> || So my problem is to use two CostFunction in the same registration 
> process.
> What is the main difference between SingleValuedCostFunction and 
> MultiValuedCostFunction.
> Is it a good way to resolve my problem by writing a more complex 
> CostFunction which can take into account a lot of SingleValuedCostFunction ?
> 
> regards,
> 
> Bertrand
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list