[Insight-users] Marginal Scale parameter to Histogram

Luis Ibanez luis.ibanez at kitware.com
Fri Nov 9 18:45:36 EST 2007


Hi Hrvoje


The purpose of the marginal scale is to identify whether an overflow
has occurred on the upper value of a bin.


The use of the marginal scale is clearer when you look at the souce
code of

    Insight/Code/Numerics/Statistics/
        itkListSampleToHistogramGenerator.txx

             in particular to lines 69 to 89.


The marginal scale is only relevant when the measurement type
is not an integer.

The Marginal scale is used to define a fraction of the bin width
to be used as a tolerance around the upper bound of the bin.

For example:

if your bins in dimension 2 go from lower value 2.0 to upper value
9.0 and they are 10 bins in that dimension, then every bin has size

     bin width  = (  9.0  -  2.0 ) /  10.0  =  0.7

If the marginal scale is 10, then we take  the bin width and divide
it by 10 in order to define a tolerance of


     upper tolerance = 0.7  /  marginal scale = 0.07

if, when adding this margin to the upper bound you find that
you obtain a value smaller than the upper boudn then you
can suspect of an overflow and then the option of Clipping
the histograms at the ends is enabled.


This is a situation that you rarely will run into...



     Regards,



          Luis



------------------------
Hrvoje Bogunovic wrote:
> Hi,
> 
> I do not understand exactly the purpose and the use of the "marginal 
> scale" when using itk::Statistics::ScalarImageToHistogramGenerator
> 
> There is no explanation of it in the doxygen or insight-users list and 
> the software guide just says:
> "marginal scale factor that will control the precision used when 
> assigning values to histogram bins" but does not give any further 
> instuctions. Normally in all examples it has been set to 10.
> 
> Can somebody please explain how does this value affect the histogram 
> computation.
> 
> Thanks a lot,
> Hrvoje
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list