[Insight-developers] some comments about ImageBoundaryFacesCalculator changes

Bill Lorensen bill.lorensen at gmail.com
Wed Nov 17 11:37:16 EST 2010


Wanlin,

This original behaviour may be a bug. I don't think there should be
duplicate boundary regions. Maybe someone more familiar with the
calculator can comment.

If it turn out to be a bug, then I don't think we'll need to turn the
bug on/off.

Bill

On Wed, Nov 17, 2010 at 9:18 AM, wanlin <wanlinzhu at gmail.com> wrote:
>  Hi, David and Bill. Thank for your suggestions. I will add tests, comments
> and change variable names etc as you have suggests later. I am sorry i don't
> know how to add comments to gerrit. Following are some explanations.
>
> The ImageBoundaryFacesCalculator will produce duplicate boundary regions at
> corner.
> For example, for requestedregion size = 5x5 image with radius = 1, The
> previous version of ImageBoundaryFacesCalculator will give
> Number of pixels : 9
> ImageRegion (0x18ad830)
>   Dimension: 2
>   Index: [1, 1]
>   Size: [3, 3]
>
> Number of pixels : 5
> ImageRegion (0x18ad870)
>   Dimension: 2
>   Index: [0, 0]
>   Size: [1, 5]
>
> Number of pixels : 5
> ImageRegion (0x18ad8b0)
>   Dimension: 2
>   Index: [4, 0]
>   Size: [1, 5]
>
> Number of pixels : 5
> ImageRegion (0x18ad8f0)
>   Dimension: 2
>   Index: [0, 0]
>   Size: [5, 1]
>
> Number of pixels : 5
> ImageRegion (0x18ad930)
>   Dimension: 2
>   Index: [0, 4]
>   Size: [5, 1]
>
> The updated version takes into account the issue and produce non duplicate
> regions.
>
> Number of pixels :9
> ImageRegion (0xb8b830)
>   Dimension: 2
>   Index: [1, 1]
>   Size: [3, 3]
>
> Number of pixels :5
> ImageRegion (0xb8b870)
>   Dimension: 2
>   Index: [0, 0]
>   Size: [1, 5]
>
> Number of pixels :5
> ImageRegion (0xb8b8b0)
>   Dimension: 2
>   Index: [4, 0]
>   Size: [1, 5]
>
> Number of pixels :3
> ImageRegion (0xb8b8f0)
>   Dimension: 2
>   Index: [1, 0]
>   Size: [3, 1]
>
> Number of pixels :3
> ImageRegion (0xb8b930)
>   Dimension: 2
>   Index: [1, 4]
>   Size: [3, 1]
>
> To keep backward compatibility, the default behavior of
> ImageBoundaryFacesCalculator has been set the same as previous version.
> With default option (m_DuplicateOverlap == true, same as previous version),
> all tests(1822) passed.
>
> If the default option  m_DuplicateOverlap == false, 3 tests failed.
>
> 1. 159 - itkScalarImageToCooccurrenceListSampleFilterTest (Failed)
> In itkScalarImageToCooccurrenceListSampleFilterTest
> The baseline value of baselineVectorList has duplication regions. Namely
> they are using the default behavior (m_DuplicateOverlap == true)
>
> 2. 1811 - GeodesicActiveContourShapePriorCallosumTest (Failed)
> The errors could be traced back to
> itk::ScalarAnisotropicDiffusionFunction<Image>::CalculateAverageGradientMagnitudeSquared(TImage
> *ip)
> When duplicate regions exist, the gradient magnitudes of part of boundary
> regions have been counted twice or three times depends on image dimension
> and locations . I think it is a bug, in the case, m_DuplicateOverlap should
> be set false to avoid duplication.
>
> 3. 1817 - WatershedSegmentation1Test1 (Failed)
> The error could be traced back to itk::VectorAnisotropicDiffusionFunction<
> TImage >::
> CalculateAverageGradientMagnitudeSquared(TImage *ip) The same reason as 2.
>
>
>


More information about the Insight-developers mailing list