[ITK-users] Radius in itkVectorGradientMagnitudeImageFilter

Kevin H. Hobbs hobbsk at ohio.edu
Wed Dec 2 14:49:37 EST 2015


For the attached program I see no difference in the output between

  radius[0] = 1;
  radius[1] = 1;
  radius[2] = 1;

and

  radius[0] = 8;
  radius[1] = 8;
  radius[2] = 8;

The RadiusType m_NeighborhoodRadius is set, printed, and used to expand
the requested region but the gradient calculations use central
differences only between pixels adjacent to the neighborhood center :

  d_phi_du[i][j] = ... it.GetNext(i)[j] - it.GetPrevious(i)[j]...

Should these be :

  NeighborhoodIndexType ri = m_NeighborhoodRadius[i];
  d_phi_du[i][j] = ... it.GetNext(i,ri)[j] - it.GetPrevious(i,ri)[j]...

?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RGBGradMag.cxx
Type: text/x-c++src
Size: 1240 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20151202/59d87aac/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: OpenPGP digital signature
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20151202/59d87aac/attachment.sig>


More information about the Insight-users mailing list