[Insight-users] MaximizeOn and PixelType
Luis Ibanez
luis . ibanez at kitware . com
Tue, 15 Jul 2003 11:53:54 -0400
Hi Stephan,
You are right,
the MeanSquare metric is optimal when its value is zero.
The optimizer must then be set for Minimizing the cost
function.
This is done in ImageRegistration3.cxx line 381 with
the call
optmizer->MaximizeOff();
Note that setting MaximizeOff() is equivalent to call
any of the following:
optimizer->MinimizeOn();
optimizer->SetMaximize( false );
optimizer->SetMinimize( true );
You can verify the code in Insight/Code/Numerics
itkRegularStepGradientDescentBaseOptimizer.h
The registration should work for both signed and
unsigned short pixel types, using MinimizeOn()
[ or MaximizeOff() ] in both cases.
MaximizeOn() will not produce registered images.
You can also experiment this with the Python
or Tcl versions:
ImageRegistration3.py
ImageRegistration3.tcl
Regards,
Luis
-----------------------
itk at stmoser . ch wrote:
> Hi
>
> I've just been playing around with a basic registration program and the
> registration example nr. 3. According to some newsgroup postings,
> itkMeanSquareImageToImageMetric does sum up squared differences and
> therefore needs to be minimized. So MinimizeOn() needs to be called. In
> example 3 there is MaximizeOn() though. Why is that?
>
> It is interesting to note that if PixelType is set to 'short', the
> registration does fine with MinimizeOn(), but not with MaximizeOn(). If
> it is set to 'unsigned short', it will do with MaximizeOn() but not with
> MinimizeOn().
>
> Can anyone help me?
>
> Thanks, Stephan
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>