[Insight-users] multi resolution registration : problem in pyramid

Luis Ibanez luis.ibanez@kitware.com
Fri, 04 Apr 2003 15:45:49 -0500


Hi Mathieu,


This problem was recently identified by Lydia
from the Purify errors reported in the Dashboard.

The proposed solution involves cropping the fixed image
region to the region covered by the Buffered region.


Regards


   Luis


----------------------------------
DE CRAENE Mathieu wrote:
> Hi all !
> 
> I'm  encountering a problem with the MultiResolutionImageRegistrationMethod. At the last registration level, I get (on certain images) a seg fault. Trying to debug, I have displayed the fixed image region and called the PrintSelf of the fixed Image at each level. Here is what I get : 
> 
> 1. BEFORE REGISTRATION
> 
> Registration : Fixed Image Region : ImageRegion (0xbffff928)
>   Dimension: 3
>   Index: [50, 80, 0]
>   Size: [150, 96, 19]
> 
> Registration : Fixed Image : Image (0x816a9b8)
>   Reference Count: 3
>   Modified Time: 237
>   Debug: Off
>   Observers: 
>     none
>   Source: (0x815a7d8) 
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 234
>   UpdateTime: 239
>   LastRequestedRegionWasOutsideOfTheBufferedRegion: 1
>   LargestPossibleRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 19]
>   BufferedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 19]
>   RequestedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 19]
>   Origin: [-109.57, -219.141, -45]
>   Spacing: [0.859375, 1.71875, 5]
>   PixelContainer: ImportImageContainer (0x815a848)
>   Reference Count: 2
>   Modified Time: 238
>   Debug: Off
>   Observers: 
>     none
>   Pointer: 0x815a874
>   Container manages memory: true
>   Size: 1245184
>   Capacity: 1245184
> 
> 2. FIRST REGISTRATION LEVEL
> 
> FIXED IMAGE REGION : ImageRegion (0xbffff430)
>   Dimension: 3
>   Index: [25, 40, 0]
>   Size: [75, 48, 9]
> 
> 
> Image (0x81497d0)
>   Reference Count: 3
>   Modified Time: 292
>   Debug: Off
>   Observers: 
>     none
>   Source: (0x8148f90) 
>   Source output index: 0
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 252
>   UpdateTime: 443
>   LastRequestedRegionWasOutsideOfTheBufferedRegion: 0
>   LargestPossibleRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [128, 128, 9]
>   BufferedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [128, 128, 9]
>   RequestedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [128, 128, 9]
>   Origin: [-109.57, -219.141, -45]
>   Spacing: [1.71875, 3.4375, 10]
>   PixelContainer: ImportImageContainer (0x81498b8)
>   Reference Count: 2
>   Modified Time: 293
>   Debug: Off
>   Observers: 
>     none
>   Pointer: 0x81498e4
>   Container manages memory: true
>   Size: 147456
>   Capacity: 147456
> 
> 3. SECOND (FULL RESOLUTION) REGISTRATION LEVEL
> 
> FIXED IMAGE REGION : ImageRegion (0xbffff430)
>   Dimension: 3
>   Index: [50, 80, 0]
>   Size: [150, 96, 19]
> 
> 
> Image (0x8149938)
>   Reference Count: 3
>   Modified Time: 370
>   Debug: Off
>   Observers: 
>     none
>   Source: (0x8148f90) 
>   Source output index: 1
>   Release Data: Off
>   Data Released: False
>   Global Release Data: Off
>   PipelineMTime: 252
>   UpdateTime: 444
>   LastRequestedRegionWasOutsideOfTheBufferedRegion: 0
>   LargestPossibleRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 19]
>   BufferedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 18] >>>>>>>>>>>>>>>> ???????????????
>   RequestedRegion: 
>     Dimension: 3
>     Index: [0, 0, 0]
>     Size: [256, 256, 18] >>>>>>>>>>>>>>>> ???????????????
>   Origin: [-109.57, -219.141, -45]
>   Spacing: [0.859375, 1.71875, 5]
>   PixelContainer: ImportImageContainer (0x8149a20)
>   Reference Count: 2
>   Modified Time: 371
>   Debug: Off
>   Observers: 
>     none
>   Pointer: 0x8149a4c
>   Container manages memory: true
>   Size: 1179648
>   Capacity: 1179648
> 
> It seems that at the last (full resolution) registration level, the buffered region differed from the fixed image region. I'm using the MattesMutualInformationMetric... So it seems that when the metric computes the maximum and the minimum of the region (to compute the size of bins), the metric tries to reach voxels outside the bufferd region... which could explain the segmentation fault.
> 
> I don't understand why this problem appears only at the full registration level and why the full resolution image in the pyramid is not identical to the (fixed) image I passed to the MultiResolutionImageMethod.
> 
> Any suggestion or comments are welcome !!
> 
> Thanks for your help,
> Math.
> ----------------------------
> Mathieu De Craene
> Brigham and Womens Hospital
> Surgical Planning Laboratory	
> L1 - room 050
> 75 Francis Street
> Boston MA 02115
> decraene@bwh.harvard.edu
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>