LCE 3D

Overview

LCE 3D is functionally similar to LCE 2D but can use a 3D neighborhood to determine the estimate of the local mean and contrast. The handling of the Autorange option is also different: in the 2D version that option causes the range for the weighting functions to vary from section to section rather than from volume to volume as it does in the 3D version. LCE 3D uses substantially more (space to hold 3 volumes instead of 3 sections) than LCE 2D. The three-dimensional neighborhood processed can either include x, y, and z or x, y, and time.

Consult the overview section of the LCE 2D documentation if you want to know more about how the contrast enhancement process works.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line

Related Priism Topics

LCE 2D | Histogram equalization | Filter2D | Priism


Box

The local mean intensity at a point is estimated by calculating the mean intensity for a box, centered on the point, with x and y dimensions of n1 pixels and a z (or time) dimension of n2 pixels. n1 is the first value in the Box field, and n2 is the second value in the Box field.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


Swap Z/Time

The three-dimensional neighborhood used for the local contrast calculations can either include the x, y, and z dimensions or the x, y, and time dimensions. When the toggle button labeled "swap z/time" is off, the program uses x, y, and z. When that toggle button is on, the program uses x, y, and time. When you select a new input file, the program will automatically select the dimension to use as the third dimension. If the file has more than one z section or only one time point, the program will use the z dimension as the third dimension; otherwise, it will use the time dimension as the third dimension.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


Autorange

When the AutoRange toggle is on, the range of values for which the weighting functions are calculated and plotted, is automatically set from the minimum and maximum local mean in the xyz volume containing the point to process.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


MinMax

The MinMax field shows the range of values on the horizontal axes of the local mean stretch graph and the local contrast weighting graph. When the AutoRange toggle is on, these bounds are automatically set based on the minimum and maximum local means for the current volume (after choosing a file or changing the region selected, the bounds shown will be for the first volume in the selected input region).

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


Local Mean Stretch Function

As the LCE 2D documentation describes in more detail, the result of local contrast enhancement at each pixel is the sum of two components: a contribution from the local mean of the input data about the point and a contribution from the local contrast (difference between the local mean and the point's value). The local mean stretch function affects the first and is plotted in red as a function of the local mean intensity. A histogram of the local mean values for the first volume in the input range (if the input is a file) is shown on the same axis for reference.

The curve has three control points to control the shape of the curve. To adjust a control point, position the mouse pointer over it, depress the right mouse button, drag the mouse, and then release the right mouse button. The control points on the left and right move both vertically and horizontally; the control point in the middle only moves horizontally.

Below the plot, the coordinates of the control points are shown and may be edited directly. The coordinates are normalized to the range of zero to one. The first two values shown are the horizontal and vertical coordinates, respectively, of the left control point. The third value is the horizontal coordinate of the middle control point. The fourth and fifth values are the horizontal and vertical coordinates, respectively, of the right control point.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


Local Contrast Weighting Function

As the LCE 2D documentation describes in more detail, the result of local contrast enhancement at each pixel is the sum of two components: a contribution from the local mean of the input data about the point and a contribution from the local contrast (difference between the local mean and the point's value). The local contrast weighting function affects the first and is plotted in red as a function of the local mean intensity. A histogram of the local mean values for the first volume in the input range (if the input is a file) is shown on the same axis for reference.

The curve has two control points to control the shape of the curve. To adjust a control point, position the mouse pointer over it, depress the right mouse button, drag the mouse, and then release the right mouse button. The control points move both vertically and horizontally.

Below the plot, the coordinates of the control points are shown and may be edited directly. The coordinates are normalized to the range of zero to one. The first two values shown are the horizontal and vertical coordinates, respectively, of the left control point. The third and fourth values are the horizontal and vertical coordinates, respectively, of the right control point.

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line


Command Line

Local contrast enhancement accepts the command-line arguments described in Region.html. In addition, local contrast enhancement has the following options:

-3d=z or -3d=t
Selects which dimension to use as the third dimension for processing. The first form selects the z dimension as the third dimension; the second form selects the time dimension as the third dimension. If you do not specify either form, the program uses the z dimension as the third dimension when the input file has multiple z sections per time point or only one time point. Otherwise, the program uses the time dimension as the third dimension.
-box=n1:n2
Sets the region about each point used to estimate the local mean to be a box with x and y dimensions of n1 pixels and a z (or time) dimension of n2 pixels. Both n1 and n2 must be positive integers. If -box does not appear on the command line, local contrast enhancement uses a 3 by 3 by 1 box.
-range=rmin:rmax
Sets the range of local mean intensities for which the mean stretch and contrast weighting functions are calculated. Points where the local mean estimate is less than rmin are treated as if the local mean was rmin; pointer where the local mean estimate is greater than rmax are treated as if the local mean was rmax. rmin must be less than rmax. If -range does not appear on the command line, the range is automatically set for each section to the full range of local mean estimates for that section.
-mean_stretch=x1:y1:x2:x3:y3
Sets the shape of the mean stretch function. Requires five arguments between zero and one. The first two arguments are the normalized coordinate of the left control point. The third argument is the normalized horizontal coordinate for the middle control point. The fourth and fifth arguments are the normalized coordinates for the right control point. If -mean_stretch does not appear on the command line, local contrast enhancement runs as if -mean_stretch=0.0:0.0:0.5:1.0:0.5 was on the command line.
-contrast_weight=x1:y1:x2:y2
Sets the shape of the contrast weighting function. Requires four arguments between zero and one. The first two arguments are the normalized coordinate of the left control point. The third and fourth arguments are the normalized coordinates for the right control point. If -contrast_weight does not appear on the command line, local contrast enhancement runs as if -contrast_weight=0.0:0.0:1.0:1.0 was on the command line.

Here's an example command-line that uses a 5 by 5 by 3 neighborhood to estimate the local mean and contrast and applies the default mean stretch and contrast weighting functions.

    LCE3D a.dat b.dat -box=5:3 \
        -mean_stretch=0:0:.5:1:.5 -contrast_weight=0:0:1:1

Topics

Overview | Region processing | Box | Swap z/time | Autorange | MinMax | Mean stretch function | Contrast weighting function | Command line