Index

Project

Screenshot

 Linux - MacOSX - Win32
Docs / Quantitation

Some formats support quantified values simply stored as floats or integer pixels combined with a global rescale factor or a slope/intercept combination; also referred to as linear (a*x) or affine (a*x+b) transformation. For various (un)reasonable motivations, quantitation is not supported by default. It must be enabled by the user. From version 0.7.0 quantitation can be combined with negative pixel values. To enable quantitation see Options || MedCon || Pixels or use the command line options '-qs' -or '-qc'.

1. affine transformation (generic = a*x +b)

    /* general code for affine rescale to new pixeltype */
    {
      scale = max_new_pixeltype / (max_image_value - min_image_value);
      new_image_value = scale * (original_image_value - min_image_value);
    }
    /* max_image_value and/or min_image_value could be negative! */ 

In case of negative minimal values however, the above requires a format that supports the slope and intercept concept in order to preserve the quantified float values where:

    (a) slope = 1/scale;

    (b) intercept = min_image_value;

Until now, only DICOM supports this affine transformation, therefore we give preference to the linear version.

2. linear transformation (specific = a*x)

The linear transformation is possible whenever the minimal negative value can be transformed within the negative pixel range, using the same scale factor as for the positive pixel range. In other words, the condition for linear transformation support is:

    scale * min_image_value >= min_new_pixeltype

That way, the linear transform can be as simple as:

    /* general code for linear rescale to new pixeltype */
    {
      scale = max_new_pixeltype / max_image_value;
      new_image_value = scale * original_image_value;
    }

<< Negatives | Documentation | >>

Page last modified on January 30, 2007, at 12:20 AM