MRaster lib 22.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
mjr::ramCanvasPixelFilter Namespace Reference

Namespace for ramCanvas Pixel Filters. More...

Classes

class  ColorSchemeOnChan
 Colorize by applying a color scheme to a single channel automatically mapping max channel value to max color scheme index. More...
 
class  FixGeomBase
 An incomplete class (no getPxColorNC method) that provides a nice base for homogeniouss pixel filters. More...
 
class  FuncHomoTransform
 Transform an image with a pixel function. More...
 
class  Identity
 Identity filter – i.e. More...
 
class  MonoIntensity
 Monochrome transformation using colorT::intensityScaled(). More...
 
class  RGBAbyte
 Convert to an RGBA color image with 8-bit integer channels. More...
 
class  RGBAdbl
 Convert to an RGBA color image with 64-bit floating point channels. More...
 
class  RGBbyte
 Convert to an RGB color image with 8-bit integer channels. More...
 
class  RGBdbl
 Convert to an RGB color image with 64-bit floating point channels. More...
 
class  Rotate90CW
 Rotate image 90 degrees clockwise. More...
 
class  ScaleDownMean
 Scale down a canvis using a method similar to ramCanvasTpl::scaleDownMean(). More...
 

Detailed Description

Namespace for ramCanvas Pixel Filters.

mjr::ramCanvasPixelFilter objects attach to, and override, the minimal pixel access interface of another object. The idea is to provide an alternate pixel access interface that may modify the data in transit. In this way they mjr::ramCanvasPixelFilter objects provide an alternate "view" of the pixel data. For example mjr::ramCanvasTpl::writeTIFFfile() can use mjr::ramCanvasPixelFilter::RGBbyte to write a 24-bit RGB image from a source mjr::ramCanvasTpl object containing floating point channels. Note that mjr::ramCanvasPixelFilter objects themselves provide a minimal pixel access interface, and thus mjr::ramCanvasPixelFilter objects can be attached to other mjr::ramCanvasPixelFilter objects allowing one to chain together a list of pixel data filters.

The minimal pixel access interface for a mjr::ramCanvasTpl-like object consists of the following seven members:

  • isIntAxOrientationNaturalX()
  • isIntAxOrientationNaturalY()
  • getNumPixX()
  • getNumPixY()
  • getPxColorNC(x, y)
  • colorType
  • coordIntType

It is important to remember that mjr::ramCanvasPixelFilter objects can modify not just the pixel data but the size of a mjr::ramCanvasTpl object. For example, mjr::ramCanvasPixelFilter::ScaleDownMean can be used to virtually resize a mjr::ramCanvasTpl object! For this reason it is important to use the getNumPixX() and getNumPixY() methods when working with pixel data.

Note the pixel interface provided by mjr::ramCanvasPixelFilter objects might be described with the adjectives: minimal, fast, and unsafe! The interface is unsafe in that it provides access to getPxColorNC() and not getPxColor(). That means no bounds checks are made on pixel coordinates. In short, mjr::ramCanvasPixelFilter objects are intended to be consumed by code that has the necessary bounds checks built in. Keep this in mind if you use them for something else!