[Insight-developers] reg: creating a filter in ITK

David Doria daviddoria at gmail.com
Thu Mar 17 07:48:44 EDT 2011


On Thu, Mar 17, 2011 at 3:18 AM, thanga aarthy manoharan
<rthy4u at gmail.com> wrote:
> Sir,
>     I am learning to do convolution process using neighborhood iterators and
> i have a filter with the size of 1X4 now i want to know how to set the
> radius size of the filter in the program ..... i had went through the guide
> and found out that if it is a 3X3 window they are using Radius.Fill(1) but
> to set a size of 1X4 filter how should i go on with it ...... thank you sir
> ......

Please keep the discussion on the mailing list.

As I understand, you can only specify odd side lengths of your kernel.
To get 1x5, you would do;

itk::Size<2> radius;
radius[0] = 0; // 2*n + 1 is the side length, so here 0*2 +1 =1
radius[1] = 2; // again, 2*2 + 1 = 5

David


More information about the Insight-developers mailing list