[Insight-users] bug in MattesMutualInformationImageToImageMetric
Luis Ibanez
luis.ibanez at kitware.com
Sat Oct 28 12:26:03 EDT 2006
Hi Marius,
Thanks for pointing this out.
Could you please enter a bug report in the BugTracker
http://public.kitware.com/Bug/index.php
Please let us know if you find any problem when creating
the bug report.
Thanks
Luis
----------------------
Marius Staring wrote:
> Hi all,
>
> I want to report a bug in the MattesMutualInformationImageToImageMetric.
> The bug is when using all the pixels in the fixed image and when a mask
> is used.
>
> In Initialize() memory is allocated for the fixed sample container, of
> the size of the fixed image region. Later, in the
> SampleFullFixedImageDomain() function the container is filled, but of
> coarse, since the number of samples within the mask is usually less than
> that of the full fixed image, the fixed sample container is not
> completely filled. This results in an access violation when calling
> GetValue[AndDerivative]().
>
> - In the SampleFullFixedImageDomain() a counter should be used, to count
> the actual number of pixels.
> - The container should be resized accordingly
> - the m_NumberOfSpatialSamples should be updated
> - the while loop should also stop at the end of the regioniter, so
>
> while( iter != end )
>
> should be something like
> while( iter != end && !regioniter.IsAtEnd() )
>
> - Also the comments should be updated, since no random iterator is used
>
> Hope this helps, cheers
>
> Marius
>
More information about the Insight-users
mailing list