Manipulating Image Data (original) (raw)
The following methods treat the image as a device context, opening up many possibilities:
- Access
- AccessData
- Clone(LeadRect)
- CopyData
- GetPixelColor
- GetPixelData
- GetRow
- GetRowColumn
- SetOverlayImage
- SetPixelColor
- SetPixelData
- SetRow
- SetRowColumn
- UpdateOverlayBits
The following methods provide information about the image:
- ColorCountCommand
- GetLookupTable
- GetLookupTable16
- GetPalette
- HistogramCommand
- LineProfileCommand
- MinMaxBitsCommand
- MinMaxValuesCommand
- StatisticsInformationCommand
Using Various Image Processing Function Types
There are several types of image processing functions and the output will vary, producing one of these results:
- Image processing does not change the size, and the output of each pixel depends only on the color of the original pixel (for example, when inverting the colors or changing the brightness). In this case, image processing will be performed on the LUT colors only and the data will be unchanged.
- Image processing changes the size of the image. In this case, image processing is performed on the image data and the LUT entries are taken into account, if appropriate.
- Image processing does not change the size of the image but the output of a pixel depends on the surrounding pixel colors (for example, the average or other spatial filters). In this case, each pixel is remapped through the LUT to an intermediary 24/48-bit bitmap and image processing is performed on the intermediary bitmap. After that, for each pixel in the intermediary bitmap, the closest value in the LUT is found and that value's index will be the new pixel data.
In medical images, this may make the new pixel data irrelevant to what it was representing in the old data, hence this image processing operation is not recommended. To overcome this problem, users who are interested in the image processing function and applying it to the pixel data, they need to set UseLookupTable to false before the image processing operation, then they may restore it after. Users who are interested in the image processing function and applying it on an image as they see it in the viewer with LUT, they need to convert their 12- or 16-bit grayscale image to an 8-bit grayscale or a 24-bit RGB bitmap using WindowLevelCommand, then perform image processing on the converted image.
See Also
Introduction to Image Processing with LEADTOOLS