Changing Image Contrast: Difference between revisions
MIPAV>Olga Vovk |
m (1 revision imported) |
(No difference)
|
Latest revision as of 16:28, 9 February 2024
Changing image contrast
There are several ways of changing the image contrast in MIPAV:
- by using options available in the Level and Window dialog box and in the Lookup Table dialog box,
- by generating and modifying image histograms,
- by using the right mouse button.
Changing image contrast using the right mouse button
The right mouse button provides a very simple way of changing image contrast. To do so, open an image and then hold down the right mouse button and drag it around the screen. The cursor changes from a red cross to one that is shown in Figure 23. To restore an image to its original appearance, refer to Restoring images to their original appearance.
When you drag the cursor up and down or across the image, the image may become darker and gradually disappear or become lighter in appearance. At some points you may be able to create a negative of the image.
Adjust Window and Level
The basic concept that lays behind the window/level concept is to apply a linear gray-scale transform function, in the form of a lookup table (LUT) specified by these two parameters - window and level. These two parameters defined a specific subset (or range) of pixel intensities to be displayed. The end result after applying window/level function is that pixel intensities corresponding to the defined subset of the entire dynamic range are highlighted, while pixel intensities that are falling outside the specified range are changed to be within that range.
LUT processing
In the LUT processing technique each pixel in the input image is mapped to the corresponding pixel in the output image, with the new pixel intensity taking on a value specified by the chosen LUT.
One way of specifying a linear gray-scale transform function is to define 2 parameters:
- The width of the LUT where the slope is nonzero - this corresponds to the Window parameter,
- And the center of that segment - this corresponds to the Level parameter.
Holding the window constant while adjusting the level has the effect of moving the non-zero slope portion of the transform to the left or to the right.
See also:Window/Level tutorial.
The Adjust Window and Level icon on the Image toolbar provides another way to change the contrast of images.
The Level and Window dialog box
Move each slider up or down to change the contrast of the image. The changes are immediately effective in the image.
To adjust image contrast
- Open an image file. The image appears in an image window.
- Click Adjust Window and Level. The Level & Window dialog box appears.
- In the dialog box, move each slider up or down to change the contrast of the image. The changes are immediately effective in the image. Click Close when done.
Improving contrast by generating and modifying histograms
To generate a histogram of an image, you can use the Lookup Table icon or call LUT > Histogram LUT. To obtain a histogram summary, which is in the tabular form, use the Algorithms > Histogram Tools > Histogram Summary command.
Look up tables (LUT)
Look up tables (LUT) are data stored in the computer that is used to substitute new values for each pixel during the processing. LUT indicates the intensity of each voxel in the image and, in MIPAV, allows you to remap the original intensities to other intensities. LUT indicates what number is to be substituted for each pixel value during the processing of the image, however processing with this LUT does not change the image. One of the advantages of digital processing is that the processing parameters (factors) can be selected to produce images with different contrast characteristics. See also LUT Processing.
Transfer function reflects the relationship between the original image intensity values and how they are mapped into the LUT. The line in the LUT represents the transfer function.
To generate a histogram for an image:
- Open an image. The image appears in an image window.
- Do either of the following: click Lookup Table icon or select LUT > Histogram-LUT. For images that do not contain VOIs, the Lookup Table window opens.
- For images that contain VOIs, the Histogram dialog box appears. In the dialog box, select either Whole image or VOI region(s).
- Click OK. A progress message appears. After a few moments, the Lookup Table window opens.
To change back to the original grayscale intensities, click Gray LUT in the MIPAV window.
Lookup Table dialog box
Applying color to images using predefined LUTs
MIPAV provides a variety of pseudo-color LUTs. When a pseudo-color LUT is applied to an image, the grayscale intensities are remapped to the pseudo-color intensity values.
Using interpolation to smooth images
If you are zooming in on a portion of an image and want to reduce the appearance of pixilations in the image, make sure to select the Interpolate image check box. Interpolation smooths the pixilation.
To apply a pseudo-color LUT
- Open an image.
- Select the image window.
- Click Displays Lookup Table icon to call the Lookup Table dialog box.
- In the dialog box that appears, select one of the LUTs on the LUT toolbar.
- Check the Update (real-time) box.
- MIPAV immediately applies the LUT to the image.
To change back to the original grayscale intensities, click Gray LUT in the MIPAV window.
Creating negatives of images with Invert LUT
- Select the image window of the image you want to invert.
- Click Invert LUT.
Based on the 256-step color values scale, MIPAV assigns the inverse value to each pixel of the image (refer to Figure 27).
Tips: You may wish to apply a LUT to the image or adjust the histogram of the image first before applying creating the negative.The Invert LUT icon is a toggle. To change the image back to its previous appearance, simply select Invert LUT again. To change the image back to its original appearance, select Reset LUT.
Note: Invert LUT appears on two different windows: in the Image toolbar in the MIPAV window (select Toolbars > Image toolbar to display the toolbar) and in the LUT toolbar in the Lookup Table window.
Restoring images to their original appearance
To return to the original appearance of the image, click Reset LUT.
In addition, you can click the Gray icon to restore the image to grayscale if you have changed it or added colors.
Comparing images using alphablending
Alphablending is a technique that adds transparency information to translucent objects. When two images share the same window such as when you are loading the image, you can adjust the alphablending settings so that you can see a blend of both images and can compare overlapping regions in two datasets. See also Opening and loading image files.
To use the alphablending function
- Open the first image, then load the second image in the same window.
- Adjust the alphablending slider at the bottom of the MIPAV window.
- Move the slider to select the best ratio for the datasets of interest. The level of translucency for one image is inversely proportional to the other. Thus, if image A is 75 percent transparent (25 percent opaque), then image B is 75 percent opaque (25 percent transparent). See also Image A and Image B.