[Insight-users] # of spatial samples

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 29 06:57:56 EDT 2008


Hi Pinpress,


Your observation is correct.


1) There is a default value for the number of samples
    to be used by the MattesMutualInformation. This is
    set in the constructor.


2) The initial value of 500 was based on regression tests
    performed on 2D images of dimensions 180 x 217.


3) It is *your responsibility* to replace the default value
    with a number of samples that matches your image size.

    A typical rule of thumb is to use between 1% and 5% of
    the total number of pixels in the image. You will find
    examples on how to compute this number in the ITK
    Software Guide, and the associated .cxx files in

              Insight/Examples/Registration

    Note however, that depending on the characteristics
    of your registration problem you may need to use more
    samples.


4) The samples are drawn "randomly" from the FixedImageRegion
    that you pass to the ImageRegistrationMethod.



  Please let us know if you have any further questions,


      Thanks


          Luis


-----------
pinpress wrote:
> Hi,
> 
> I just found out that when I was using
> MattesMutualInformationImageToImageMetric in registration, there is a
> default number of spatial samples used in the Mutual Information evaluation,
> which is 500. If I do not explicitly specify by calling:
> SetNumberOfSpatialSamples, then the registration will not generally yield
> good result.  Is this observation correct? I have only tested on one example
> program so far.
> 
> The other question is: Exactly how these spatial samples were determined?
> Are they all from the moving image? Are they randomly selected voxels from
> the moving image? The reason I am asking is because I accidentally found out
> that the number of spatial samples could be even larger than the total
> number of voxels. How can this be possible? 
> 
> Thanks.


More information about the Insight-users mailing list