[Insight-users] deformation field accumulation
Luis Ibanez
luis.ibanez at kitware.com
Sat Dec 8 19:58:49 EST 2007
Hi Minjie,
The
itkDemonsRegistrationImageFilter
derives from the class:
itkPDEDeformableRegistrationFilter
which in turs derives from:
itkDenseFiniteDifferenceImageFilter
The method "ComputUpdate()" is invoked through a virtual
function in DenseFiniteDifferenceImageFilter.
The DemonsRegistartionFunction computes the update of the
deformation field at every pixel.
A multi-threaded method in the DenseFiniteDifferenceImageFilter
cumulates the updates into the final deformation field.
This method is called ThreadedApplyUpdate, in lines 195-212
of the file
Insight/Code/Common/itkDenseFiniteDifferenceImageFilter.txx
void
DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
::ThreadedApplyUpdate(TimeStepType dt, const ThreadRegionType
®ionToProcess,
int)
{
ImageRegionIterator<UpdateBufferType> u(m_UpdateBuffer,
regionToProcess);
ImageRegionIterator<OutputImageType> o(this->GetOutput(),
regionToProcess);
u = u.Begin();
o = o.Begin();
while ( !u.IsAtEnd() )
{
o.Value() += static_cast<PixelType>(u.Value() * dt); // no adaptor
support here
++o;
++u;
}
}
The code that you are looking for is in line 208 above.
Regards,
Luis
-----------------
Minjie Wu wrote:
> Dear All,
>
> I am trying to look into the ITK demons registration code and have some
> difficulties in understanding the accumulation of the deformation field
> between iterations.
>
> As in demons registration algorithm, the updating deformation field was
> u = (g-f) *grad(f)/((g-f)^2+grad_mag^2).
>
> My question is:
> How u is used to update the deformation from the previous iteration f_pre
> (previous deformation)? was it simple addition? the new deformation
> field f_new = f_pre + u?
>
> I wasn't be able to find the function in the ITK registration codes for this
> field updating, and I appreciate if anyone can help me with any
> information.
>
> Thanks,
> -Minjie Wu
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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