|
MRaster lib 22.0.0.0
Image Processing Library
|
Class providing off-screen drawing functionality. More...
#include <ramCanvasTpl.hpp>

Enumerations | |
| enum class | realAxisOrientation { INVERTED , NATURAL } |
| Enum for real axis orientation. More... | |
| enum class | intAxisOrientation { INVERTED , NATURAL } |
| Enum for integer axis orientation. More... | |
| enum class | drawModeType { SET , XOR , ADDCLAMP , AND , OR , DIFFCLAMP , MULTCLAMP } |
| Enum for drawing Mode. More... | |
| enum class | interpolationType { BILINEAR , TRUNCATE , NEAREST , AVERAGE4 , AVERAGE9 } |
| Enum for drawing Mode. More... | |
Typedefs related to template parameters | |
| typedef point2d< fltCrdT > | pointFltType |
| Real coordinate pair type. | |
| typedef point2d< intCrdT > | pointIntType |
| Integer coordinate pair type. | |
| typedef std::vector< pointIntType > | pointIntVecType |
| Integer coordinate pair type. | |
| typedef std::complex< fltCrdT > | cplxFltType |
| Real coordinate complex type (Provided for convince – not used in ramCanvasTpl) | |
| typedef std::complex< intCrdT > | cplxIntType |
| Integer coordinate complex type (Provided for convince – not used in ramCanvasTpl) | |
| typedef intCrdT | coordIntType |
| Integer type for coordinates. | |
| typedef fltCrdT | coordFltType |
| Real type for coordinates. | |
| typedef colorT | colorType |
| Color type for pixels. | |
std::function typedefs for common calls. | |
| typedef std::function< colorT(fltCrdT, fltCrdT)> | fltCrd2ColType |
| std::function type floating point coordinates to a color | |
| typedef std::function< colorT(pointFltType)> | fltPnt2ColType |
| std::function type floating point point to a color | |
| typedef std::function< colorT(intCrdT, intCrdT)> | intCrd2ColType |
| std::function type int point coordinates to a color | |
| typedef std::function< colorT(pointIntType)> | intPnt2ColType |
| std::function type int point point to a color | |
Typedefs related to colorT | |
| typedef colorT::channelType | colorChanType |
| colorT: Channel type | |
| typedef colorT::maskType | colorMaskType |
| colorT: Mask type | |
| typedef colorT::channelArithDType | colorChanArithDType |
| colorT: Channel arithmatic (Int: -) | |
| typedef colorT::channelArithSPType | colorChanArithSPType |
| colorT: Channel arithmatic (Int: +*) | |
| typedef colorT::channelArithSDPType | colorChanArithSDPType |
| colorT: Channel arithmatic (Int: +-*) | |
| typedef colorT::channelArithFltType | colorChanArithFltType |
| colorT: Channel arithmatic (Flt: +-*) | |
| typedef colorT::channelArithLogType | colorChanArithLogType |
| colorT: Channel arithmatic (Int: ^|&~) | |
| typedef colorT::colorSpaceEnum | colorSpaceEnum |
| colorT: Color spaces | |
| typedef colorT::cornerColorEnum | colorCornerEnum |
| colorT: RGB Color Corners | |
| typedef colorT::colorArgType | colorArgType |
| colorT: Argument passing type | |
| typedef colorT::colorPtrType | colorPtrType |
| colorT: Pointer to color | |
| typedef colorT::colorRefType | colorRefType |
| colorT: Ref to a color | |
| typedef colorT::colorCRefType | colorCRefType |
| colorT: Const Ref to a color | |
| typedef colorT::csIntType | csIntType |
| colorT: Color Scheme Integer Type | |
| typedef colorT::csFltType | csFltType |
| colorT: Color Scheme Float Type | |
| typedef colorT::csNatType | csNatType |
| colorT: Color Scheme Natural Type | |
| typedef colorT::cmfInterpolationEnum | cmfInterpolationEnum |
| colorT: Interpolation for color match functions | |
Iterator Typedefs | |
| typedef colorT * | pixelIterator |
| pixel store iterators | |
| typedef colorT * | iterator |
| pixel store iterators | |
Private Enumerations | |
| enum class | endianType { BIG , LITTLE , AUTO } |
| Endianness Identifiers. More... | |
Logical Maximum for intCrdT values | |
| static const intCrdT | intCrdMax = (1ul << ((sizeof(intCrdT)*CHAR_BIT-1)/2)) - 3 |
| maximum for numPixX, numPixY, & numPix. | |
intCrd Guard Valus | |
| static const intCrdT | intCrdGrdMax = intCrdMax+1 |
| Large sentinel value (always off canvas) | |
| static const intCrdT | intCrdGrdMin = -1 |
| Small sentinel value (always off canvas) | |
Canvas integer coordinates | |
| intCrdT | numPixX |
| Number of x pixels. | |
| intCrdT | numPixY |
| Number of y pixels. | |
| intCrdT | numPix |
| Number of pixels. | |
Canvas real coordinates | |
| fltCrdT | minRealX |
| x coord of min (real coord) | |
| fltCrdT | maxRealX |
| x coord of max (real coord) | |
| fltCrdT | minRealY |
| y coord of min (real coord) | |
| fltCrdT | maxRealY |
| y coord of max (real coord) | |
Canvas real/integer coordinates conversion | |
| fltCrdT | pixWidX |
| Width of a pixel (real coord) | |
| fltCrdT | pixWidY |
| Height of a pixel (real coord) | |
| fltCrdT | canvasWidX |
| Width of the canvas (real coord) | |
| fltCrdT | canvasWidY |
| height of the canvas (real coord) | |
Axis orientation | |
| realAxisOrientation | realAxOrientationX |
| Orientation of x axis. | |
| realAxisOrientation | realAxOrientationY |
| Orientation of y axis. | |
| intAxisOrientation | intAxOrientationX |
| Flip horizontally. | |
| intAxisOrientation | intAxOrientationY |
| Flip vertically. | |
Canvas pixel store pointers | |
| colorT * | pixels |
| Array to hold the color values. | |
| colorT * | pixelsE |
| Point one beyond end of pixels array. | |
Drawing defaults | |
| colorT | dfltColor |
| Default color. | |
| drawModeType | drawMode |
| Drawing mode. | |
| intCrdT | dfltX |
| x coordinate used by default. | |
| intCrdT | dfltY |
| y coordinate used by default. | |
Filled Triangle Utility Functions | |
| void | drawFillTriangleUtl (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorT c1, colorT c2, colorT c3, bool solid) |
| Utliity function behind the drawFillTriangle() functions. | |
File Writing Utility Methods | |
| void | writeUIntToStream (std::ostream &oStream, endianType endianness, int numBytes, uint64_t data) |
| Write an unsigned integer to a stream with given length and endianness. | |
| endianType | platformEndianness () |
| Determine the platform's endianness. | |
Coordinate System Manipulation (i) | |
| void | updRealCoords () |
| Several internal parameters are maintained within this class that make conversion between real coordinates and integer coordinate very fast. | |
| void | newIntCoordsNC (intCrdT numPixX_p, intCrdT numPixY_p) |
| Change the logical coordinate sizes. | |
Plane Manipulation Methods | |
| void | reallocCanvas (intCrdT numPixX_p, intCrdT numPixY_p) |
| Destroy the current pixel memory and reallocate a new pixel space of the given size. | |
| void | freeCanvas () |
| Free the pixel memory (i) | |
| void | rePointPixels (colorT *new_pixels, intCrdT new_numPixX, intCrdT new_numPixY) |
| Points the pixels pointer at a new pixel store, and updates coordinates. | |
Various helper functions | |
| void | triangleEdger (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT *pts, bool findMin) |
| Used to find the left and right edges of a triangle. | |
Raster Data Import And Export. | |
| int | exportRasterData (void *&rasterData, intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, int redChan, int greenChan, int blueChan, int alphaChan) |
| Extract raster data from the image, and pack it into a typical form used by imaging applications. | |
Constructors & Assignment Operators | |
| ramCanvasTpl () | |
| No arg constructor. | |
| ramCanvasTpl (const ramCanvasTpl &theCanvas) | |
| Copy constructor. | |
| ramCanvasTpl (intCrdT numPixX_p, intCrdT numPixY_p, fltCrdT minRealX_p=-1, fltCrdT maxRealX_p=1, fltCrdT minRealY_p=-1, fltCrdT maxRealY_p=1) | |
| Most commonly used constructor. | |
| ramCanvasTpl (ramCanvasTpl &&theCanvas) | |
| Move constructor. | |
| ramCanvasTpl & | operator= (ramCanvasTpl &&theCanvas) |
| Move assignment operator. | |
Destructor | |
| ~ramCanvasTpl () | |
| Destructor deallocates memory for the canvas. | |
Canvas Compositing | |
| |
| void | adjoinCanvasRight (const ramCanvasTpl &theCanvas) |
| Adjoin the canvas to the side of the current canvas. | |
| void | adjoinCanvasLeft (const ramCanvasTpl &theCanvas) |
| Adjoin the canvas to the side of the current canvas. | |
| void | adjoinCanvasBottom (const ramCanvasTpl &theCanvas) |
| Adjoin the canvas to the side of the current canvas. | |
| void | adjoinCanvasTop (const ramCanvasTpl &theCanvas) |
| Adjoin the canvas to the side of the current canvas. | |
| void | insertCanvas (const ramCanvasTpl &theCanvas, intCrdT x1=0, intCrdT y1=0) |
| Draw the given canvas at the indicated point. | |
Canvas resize and crop | |
| void | resizeCanvas (intCrdT new_numPixX_p, intCrdT new_numPixY_p) |
| Resize the canvas to the given size. | |
| void | expandCanvas (intCrdT new_numPixX_p, intCrdT new_numPixY_p, intCrdT x1=0, intCrdT y1=0, colorArgType color=colorT(colorT::minChanVal)) |
| Expand the current canvas. | |
| void | cropCanvas (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2) |
| This function will crop the canvas to the given rectangular region. | |
Coordinate System Manipulation | |
| void | newRealCoords (fltCrdT minRealX_p, fltCrdT maxRealX_p, fltCrdT minRealY_p, fltCrdT maxRealY_p) |
| Change the real coordinate system associated with a canvas. | |
Canvas comparison | |
| bool | isSameSize (ramCanvasTpl const &inRC) const |
| Return true if given canvas and current canvas are the same size. | |
| bool | isNotSameSize (ramCanvasTpl const &inRC) const |
| Return true if given canvas and current canvas are NOT the same size. | |
| bool | isClose (ramCanvasTpl const &inRC, colorChanType epsilon) const |
| Return true if corresponding pixels in each canvas are "close" as defined by colorTpl::isClose(). | |
| bool | isEqual (ramCanvasTpl const &inRC) const |
| Return true if corresponding pixels in each canvas are "equal" as defined by colorTpl::isEqual(). | |
Canvas Rotation and Reflection. | |
| void | rotate90CW () |
| Loss-less 90 degree clockwise rotation of the canvas about the center. | |
| void | rotate90CCW () |
| Loss-less 90 degree counter clockwise rotation of the canvas about the center. | |
| void | rotate180 () |
| Loss-less 180 degree rotation of the canvas about the center. | |
| void | flipHorz () |
| Loss-less, horizontal flip of the canvas about the center. | |
| void | flipVert () |
| Loss-less, vertical flip of the canvas about the center. | |
| void | flipTranspose () |
| Loss-less, vertical flip of the canvas about the center. | |
Canvas Scaling. | |
| void | scaleUpProximal (int xfactor) |
| Scale up the image using proximal interpolation. | |
| void | scaleDown1pt (int xfactor) |
| Scale down using only the upper left pixel from each block. | |
| void | scaleDownMax (int xfactor) |
| Scale down using only the pixel with maximum luminosity in each block. | |
| void | scaleDownMean (int xfactor) |
| Scale down using the mean pixel value from each block. | |
Geometric transformations (Reverse Mapping) | |
| |
| ramCanvasTpl | geomTfrmRevRPoly (std::vector< double > const &RPoly, double rScale, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR) |
| Geometric Transform via Radial Polynomial implemented with Reverse Mapping. | |
| ramCanvasTpl | geomTfrmRevBiPoly (std::vector< double > const &BiPolyX, std::vector< double > const &BiPolyY, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR) |
| Geometric Transform via bivariate polynomial implemented with Reverse Mapping. | |
| ramCanvasTpl | geomTfrmRevAff (std::vector< double > const &HAMatrix, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR) |
| Homogenious Affine Geometric Transform implemented with Reverse Mapping. | |
| ramCanvasTpl | geomTfrmRevArb (mjr::point2d< double >(*f)(double, double), double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR) |
| Geometric Transform via provided mapping function implemented with Reverse Mapping. | |
Apply Convolution | |
| void | convolution (double *kernel, int kWide, int kTall, double divisor) |
| Apply a convolution filter. | |
| void | convolution (double *kernel, int kSize, double divisor) |
| void | convolution (double *kernel, int kSize) |
Compute Convolution Kernels | |
| void | computeConvolutionMatrixGausian (double *kernel, int kSize, double sd) |
| Compute a Gaussian convolution kernel (use with divisor==1.0). | |
| void | computeConvolutionMatrixBox (double *kernel, int kSize) |
| Compute a box blur convolution kernel (use with divisor==1.0). | |
Iterators | |
| colorT * | begin () |
| colorT * | end () |
Functional Homogeneous Pixel Transformations (point operators) | |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)()) |
| Apply a homogeneous pixel transformation. | |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double), double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double), double, double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double), double, double, double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double), double, double, double, double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double, double), double, double, double, double, double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double, double, double), double, double, double, double, double, double) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(int), int) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int), int, int) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int, int), int, int, int) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int, int, int), int, int, int, int) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT), colorT) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT), colorT, colorT) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT, colorT), colorT, colorT, colorT) |
| void | applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT, colorT, colorT), colorT, colorT, colorT, colorT) |
| void | applyPixelRefFun (colorT::cr2voidType f) |
| Apply a a function to a each pixel via refrence. | |
Predefined Homogeneous Pixel Transformations (point operators) | |
| void | autoHistStrech () |
| Computes a linear grey level scale homogeneous pixel transformation. | |
| void | autoMaxHistStrechRGB () |
| Computes a, possibly different, linear grey level scale homogeneous pixel transformation on each channel of the image. | |
Canvas Combination Functions | |
| void | combineRamCanvasBinOp (colorT &(colorT::*HPT)(colorT), const ramCanvasTpl &theCanvas, intCrdT trgX=0, intCrdT trgY=0, intCrdT wide=-1, intCrdT tall=-1, intCrdT srcX=0, intCrdT srcY=0) |
| This function takes a ramCanvasTpl and combines it with the current ramCanvasTpl using the provided binary operator. | |
Statistical Canvas Combination Functions (useful for CCD imaging) | |
| void | combineRamCanvasMean (ramCanvasTpl *theCanvasList, const int N) |
| Take a list of ramCanvasTpl objects and combine them with the current ramCanvasTpl using mean. | |
Canvas Clearing Methods | |
| void | clrCanvasToBlack () |
| Clear the canvas to black. | |
| void | clrCanvasToWhite () |
| Clear the canvas to black. | |
| void | clrCanvasChannelToMin (int chan) |
| Set the given channel to the minimum value. | |
| void | clrCanvasChannelToMax (int chan) |
| Set the given channel to the maximum value. | |
| void | clrCanvas () |
| Clear the canvas. | |
| void | clrCanvas (colorArgType color) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Default Point Methods | |
| void | moveTo (intCrdT x, intCrdT y) |
| Set the current default point to the given coordinates. | |
| void | moveTo (fltCrdT x, fltCrdT y) |
| void | moveTo (pointIntType thePoint) |
| void | moveTo (pointFltType thePoint) |
Default Color Methods | |
| void | setDfltColor (colorArgType color) |
| Set the default color. | |
| void | setDfltColor (std::string cornerColor) |
| void | setDfltColor (const char *cornerColor) |
| void | setDfltColor (colorChanType r, colorChanType g, colorChanType b) |
Point drawing functions | |
| void | drawPoint (intCrdT x, intCrdT y, colorArgType color) |
| Draw a point at the specified coordinates with the specified color. | |
| void | drawPoint () |
| void | drawPoint (colorArgType color) |
| void | drawPoint (intCrdT x, intCrdT y) |
| void | drawPoint (fltCrdT x, fltCrdT y) |
| void | drawPoint (fltCrdT x, fltCrdT y, colorArgType color) |
| void | drawPoint (pointIntType thePoint, colorArgType color) |
| void | drawPoint (pointIntType thePoint) |
| void | drawPoint (pointFltType thePoint) |
| void | drawPoint (pointFltType thePoint, colorArgType color) |
Single pixel transformation functions. | |
These functions provide a simple and direct way to modify a pixel by passing a frefrence to a callable (usually a lambda). This can be used to mimic the functality of drawModeType by simply passing the approprate color transformation member for 2D image histograms or the solutions to differential equations – both applications being very common when working with fractals and dynamical systems. While the same result can be obtained with tformPixel() with a lambda like ~[i](auto& c) { c.tfrmAdd(i); }~, these routines can be significantly faster for some compilers. | |
| void | tformPixel (intCrdT x, intCrdT y, colorType::cr2voidType tform) |
| Transform the pixel at the specified coordinates. | |
| void | tformPixel (fltCrdT x, fltCrdT y, colorType::cr2voidType tform) |
| void | tformPixel (pointIntType thePoint, colorType::cr2voidType tform) |
| void | tformPixel (pointFltType thePoint, colorType::cr2voidType tform) |
Increment a channel value for a pixel. | |
These functions provide a simple and direct way to increment a single channel for a particular pixel. Typical use cases are to accumulate values for 2D image histograms or the solutions to differential equations – both applications being very common when working with fractals and dynamical systems. While the same result can be obtained with tformPixel() with a lambda like ~[i](auto& c) { c.tfrmAdd(i); }~, these routines can be significantly faster for some compilers. | |
| template<int chanNum = 0> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| void | incPxChan (intCrdT x, intCrdT y, colorChanType v=1) |
| Increment the specified color channel of the pixel at the given coordinates by the specified value. | |
| template<int chanNum = 0> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| void | incPxChan (fltCrdT x, fltCrdT y, colorChanType v=1) |
| template<int chanNum = 0> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| void | incPxChan (pointIntType thePoint, colorChanType v=1) |
| template<int chanNum = 0> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| void | incPxChan (pointFltType thePoint, colorChanType v=1) |
Line Drawing Methods | |
| void | drawLine (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color) |
| Draw a line. | |
| void | drawLine (pointFltType point1) |
| void | drawLine (pointFltType point1, colorArgType color) |
| void | drawLine (pointIntType point1) |
| void | drawLine (pointIntType point1, colorArgType color) |
| void | drawLine (pointFltType point1, pointFltType point2) |
| void | drawLine (pointFltType point1, pointFltType point2, colorArgType color) |
| void | drawLine (pointIntType point1, pointIntType point2) |
| void | drawLine (pointIntType point1, pointIntType point2, colorArgType color) |
| void | drawLine (intCrdT x, intCrdT y) |
| void | drawLine (fltCrdT x, fltCrdT y) |
| void | drawLine (intCrdT x, intCrdT y, colorArgType color) |
| void | drawLine (fltCrdT x, fltCrdT y, colorArgType color) |
| void | drawLine (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2) |
| void | drawLine (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2) |
| void | drawLine (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color) |
Unfilled Triangle Drawing Methods | |
| void | drawTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color) |
| Draw an un-filled triangle. | |
| void | drawTriangle (pointIntType *thePoints, colorArgType color) |
| void | drawTriangle (pointFltType *thePoints) |
| void | drawTriangle (pointFltType *thePoints, colorArgType color) |
| void | drawTriangle (pointIntType *thePoints) |
| void | drawTriangle (pointIntType point1, pointIntType point2, pointIntType point3) |
| void | drawTriangle (pointFltType point1, pointFltType point2, pointFltType point3) |
| void | drawTriangle (pointFltType point1, pointFltType point2, pointFltType point3, colorArgType color) |
| void | drawTriangle (pointIntType point1, pointIntType point2, pointIntType point3, colorArgType color) |
| void | drawTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3) |
| void | drawTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3, colorArgType color) |
| void | drawTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3) |
Filled Triangle Drawing Methods | |
| void | drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color) |
| Draw a triangle filled with a solid color using a nicely optimized, horizontal scan conversion algorithm. | |
| void | drawFillTriangle (pointIntType *thePoints, colorArgType color) |
| void | drawFillTriangle (pointFltType *thePoints) |
| void | drawFillTriangle (pointFltType *thePoints, colorArgType color) |
| void | drawFillTriangle (pointIntType *thePoints) |
| void | drawFillTriangle (pointIntType point1, pointIntType point2, pointIntType point3) |
| void | drawFillTriangle (pointFltType point1, pointFltType point2, pointFltType point3) |
| void | drawFillTriangle (pointFltType point1, pointFltType point2, pointFltType point3, colorArgType color) |
| void | drawFillTriangle (pointIntType point1, pointIntType point2, pointIntType point3, colorArgType color) |
| void | drawFillTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3) |
| void | drawFillTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3, colorArgType color) |
| void | drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3) |
Shaded Triangle Drawing Methods | |
| void | drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color1, colorArgType color2, colorArgType color3) |
| Draw a filled triangle using barycentric color interpolation. | |
Unfilled Rectangle Drawing Functions | |
| void | drawRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color) |
| Draw an unfilled rectangle with diagonal corners located at (x1, y1) and and (x2, y2). | |
| void | drawRectangle (pointIntType point1, pointIntType point2, colorArgType color) |
| void | drawRectangle (pointIntType point1, pointIntType point2) |
| void | drawRectangle (pointFltType point1, pointFltType point2, colorArgType color) |
| void | drawRectangle (pointFltType point1, pointFltType point2) |
| void | drawRectangle (pointIntType *thePoints, colorArgType color) |
| void | drawRectangle (pointFltType *thePoints) |
| void | drawRectangle (pointFltType *thePoints, colorArgType color) |
| void | drawRectangle (pointIntType *thePoints) |
| void | drawRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2) |
| void | drawRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color) |
| void | drawRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2) |
Filled Rectangle Drawing Methods | |
| void | drawFillRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color) |
| Draw a filled rectangle with diagonal corners located at (x1, y1) and and (x2, y2). | |
| void | drawFillRectangle (pointIntType point1, pointIntType point2, colorArgType color) |
| void | drawFillRectangle (pointIntType point1, pointIntType point2) |
| void | drawFillRectangle (pointFltType point1, pointFltType point2, colorArgType color) |
| void | drawFillRectangle (pointFltType point1, pointFltType point2) |
| void | drawFillRectangle (pointIntType *thePoints, colorArgType color) |
| void | drawFillRectangle (pointFltType *thePoints) |
| void | drawFillRectangle (pointFltType *thePoints, colorArgType color) |
| void | drawFillRectangle (pointIntType *thePoints) |
| void | drawFillRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2) |
| void | drawFillRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color) |
| void | drawFillRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2) |
Unfilled Circle Drawing Methods | |
| void | drawCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX, colorArgType color) |
| Draw an un-filled circle. | |
| void | drawCircle (intCrdT radiusX) |
| void | drawCircle (fltCrdT radiusX) |
| void | drawCircle (pointFltType centerPoint, fltCrdT radiusX) |
| void | drawCircle (pointFltType centerPoint, fltCrdT radiusX, colorArgType color) |
| void | drawCircle (pointIntType centerPoint, intCrdT radiusX) |
| void | drawCircle (pointIntType centerPoint, intCrdT radiusX, colorArgType color) |
| void | drawCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX) |
| void | drawCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX, colorArgType color) |
| void | drawCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX) |
Filled Circle Drawing Methods | |
| void | drawFillCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX, colorArgType color) |
| Draw an un-filled circle. | |
| void | drawFillCircle (fltCrdT radiusX) |
| void | drawFillCircle (intCrdT radiusX) |
| void | drawFillCircle (pointFltType centerPoint, fltCrdT radiusX, colorArgType color) |
| void | drawFillCircle (pointFltType centerPoint, fltCrdT radiusX) |
| void | drawFillCircle (pointIntType centerPoint, intCrdT radiusX, colorArgType color) |
| void | drawFillCircle (pointIntType centerPoint, intCrdT radiusX) |
| void | drawFillCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX) |
| void | drawFillCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX, colorArgType color) |
| void | drawFillCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX) |
Piece-Wise Linear Curve Drawing Methods | |
| void | drawPLCurve (int numPoints, intCrdT *x, intCrdT *y, colorArgType color) |
| Draw Piece-Wise Linear Curves. | |
| void | drawPLCurve (int numPoints, intCrdT *x, intCrdT *y) |
| void | drawPLCurve (int numPoints, fltCrdT *x, fltCrdT *y, colorArgType color) |
| void | drawPLCurve (int numPoints, fltCrdT *x, fltCrdT *y) |
| void | drawPLCurve (int numPoints, pointIntType *thePoints, colorArgType color) |
| void | drawPLCurve (int numPoints, pointIntType *thePoints) |
| void | drawPLCurve (int numPoints, pointFltType *thePoints, colorArgType color) |
| void | drawPLCurve (int numPoints, pointFltType *thePoints) |
Hershey Glyph Rendering Utility Functions | |
| void | drawHersheyGlyph (int glyphNum, intCrdT x, intCrdT y, double magX, double magY, colorArgType aColor) |
| Render a glyph from the Hershey character set. | |
| void | drawHersheyGlyph (int glyphNum, fltCrdT x, fltCrdT y, double magX, double magY, colorArgType aColor) |
ASCII Character Rendering. | |
What are font rendering functions doing in a raster graphics library? Sometimes I like to put a label on image. | |
| void | drawString (std::string aString, mjr::hershey::font aFont, intCrdT x, intCrdT y, colorArgType aColor, double cex, intCrdT spc) |
| Render a string using Hershey ASCII Fonts. | |
| void | drawString (std::string aString, mjr::hershey::font aFont, fltCrdT x, fltCrdT y, colorArgType aColor, double cex, intCrdT spc) |
| void | drawStringBox (std::string aString, mjr::hershey::font aFont, intCrdT x, intCrdT y, colorArgType stringColor, colorArgType boxColor, double cex, intCrdT spc) |
| Renders a filled, bounding box for the given string as rendered via drawString. | |
| void | drawStringBox (std::string aString, mjr::hershey::font aFont, fltCrdT x, fltCrdT y, colorArgType stringColor, colorArgType boxColor, double cex, intCrdT spc) |
File Reading and Writing Methods | |
| bool | supportLibTIFF () |
| Is libTIFF supported – that is: will the readTIFFfile() method do anything? | |
| int | readTIFFfile (std::string fileName) |
| If the libTIFF library was found at build time, this function will read a TIFF file into current ramCanvas object. | |
| template<class rcConT> requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value) | |
| int | writeTIFFfile (std::string fileName, rcConT pxFilter, bool markAlpha=true) |
| Write a TIFF format image file. | |
| int | writeTIFFfile (std::string fileName, bool markAlpha=true) |
| Simplified overload for writeTIFFfile() that only requires the filename. | |
| int | writeTGAfile (std::string fileName) |
| Write a 24-bit (8-bit per channel) RGB, TGA format graphics file. | |
| int | readRAWfile (std::string fileName) |
| Read RAW file. | |
| template<class rcConT> requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value) | |
| int | writeRAWfile (std::string fileName, rcConT pxFilter) |
| Write a MJRRAW file. | |
| int | writeRAWfile (std::string fileName) |
| Simplified overload for writeRAWfile() that only requires the filename. | |
Boolean Clip Test Methods | |
| int | isCliped (fltCrdT x, fltCrdT y) const |
| Determine if the given point is within the bounds of the ramCanvasTpl. | |
| int | isCliped (intCrdT x, intCrdT y) const |
| int | isOnCanvas (fltCrdT x, fltCrdT y) const |
| Determine if the given point is within the bounds of the ramCanvasTpl. | |
| int | isOnCanvas (intCrdT x, intCrdT y) const |
Coordinate Conversions. | |
| intCrdT | real2intX (fltCrdT x) const |
| Convert real x coordinate to integral x coordinate. | |
| intCrdT | real2intY (fltCrdT y) const |
| Convert real y coordinate to integral y coordinate. | |
| fltCrdT | int2realX (intCrdT x) |
| Convert integral x coordinate to real x coordinate. | |
| fltCrdT | int2realY (intCrdT y) |
| Convert integral y coordinate to real y coordinate. | |
Coordinate Pair Conversions. | |
| pointFltType | int2real (intCrdT x, intCrdT y) |
| Convert real x & y coordinates to integer x & y coordinates. | |
| pointIntType | real2int (intCrdT x, intCrdT y) |
| Convert integer x & y coordinates to real x & y coordinates. | |
Pixel Corner Coordinates. | |
| fltCrdT | int2realSideX (intCrdT x, int side) |
| Given integer x coordinate, produce real x coordinate for one of the pixel's edge. | |
| fltCrdT | int2realSideY (intCrdT y, int side) |
| Given integer y coordinate, produce real y coordinate for one of the pixel's edge. | |
| pointFltType | int2realCorner (intCrdT x, intCrdT y, int sideX, int sideY) |
| Given integer x & y coordinates, produce real x & y coordinates for one of the pixel's corners. | |
| pointFltType | int2realCorner (intCrdT x, intCrdT y, int cornerIndex) |
| Given integer x & y coordinates and a corner index, produce real x & y coordinates for one of the pixel's corners. | |
Coordinate Delta Conversions. | |
| intCrdT | realDelta2intX (fltCrdT x) const |
| Convert real distance on the x coordinate axis to an integral distance. | |
| intCrdT | realDelta2intY (fltCrdT y) const |
| Convert real distance on the y coordinate axis to an integral distance. | |
| fltCrdT | intDelta2realX (intCrdT x) const |
| Convert integral distance on the x coordinate to a real distance. | |
| fltCrdT | intDelta2realY (intCrdT y) const |
| Convert integral distance on the y coordinate to a real distance. | |
Orientation of Real Coordinate Systems | |
| realAxisOrientation | getRealAxOrientationX () |
| Get the real X axis orientation. | |
| void | setRealAxOrientationX (realAxisOrientation orientation) |
| Set the real X axis orientation. | |
| realAxisOrientation | getRealAxOrientationY () |
| Get the real Y axis orientation. | |
| void | setRealAxOrientationY (realAxisOrientation orientation) |
| Set the real Y axis orientation. | |
| void | setRealAxisDefaultOrientation () |
| Set the real axis orientation to default (NATURAL for both X and Y axes) | |
Drawing Mode | |
| drawModeType | getDrawMode () |
| Get the current drawing mode. | |
| void | setDrawMode (drawModeType newDrawMode) |
| Set the current drawing mode NOOP if enableDrawModes is false. | |
| void | setDefaultDrawMode () |
| Set the default draw mode. | |
Orientation of Integer Coordinate Systems | |
| intAxisOrientation | getIntAxOrientationX () |
| Get the integer X axis orientation. | |
| bool | isIntAxOrientationNaturalX () |
| Is the integer X axis NATURAL? | |
| void | setIntAxOrientationX (intAxisOrientation orientation) |
| Set the integer X axis orientation. | |
| bool | isIntAxOrientationNaturalY () |
| Get the integer Y axis orientation. | |
| intAxisOrientation | getIntAxOrientationY () |
| Is the integer Y axis orientation NATURAL? | |
| void | setIntAxOrientationY (intAxisOrientation orientation) |
| Set the integer Y axis orientation. | |
| void | setIntAxisDefaultOrientation () |
| Set the integer axis orientation to default (NATURAL for both X and Y axes) | |
Accessor Methods | |
| intCrdT | getNumPixX () const |
| intCrdT | getNumPixY () const |
| colorT * | getPixels () |
| Returns a pointer to the raw pixel store. | |
| colorT * | clonePixels () |
| Return a clone (a copy) of the raw pixel store. | |
Real Coordinate Accessor Methods | |
| fltCrdT | getMinRealX () |
| x coord of min (real coord) | |
| fltCrdT | getMaxRealX () |
| x coord of max (real coord) | |
| fltCrdT | getMinRealY () |
| y coord of min (real coord) | |
| fltCrdT | getMaxRealY () |
| y coord of max (real coord) | |
| fltCrdT | getPixWidX () |
| Width of a pixel (real coord) | |
| fltCrdT | getPixWidY () |
| Height of a pixel (real coord) | |
| fltCrdT | getCanvasWidX () |
| Width of the display (real coord) | |
| fltCrdT | getCanvasWidY () |
| height of the display(real coord) | |
| fltCrdT | getCanvasWidD () |
| Width of the display (real coord) | |
Pixel Value Accessor Methods | |
| colorT | getPxColor (intCrdT x, intCrdT y) const |
| Returns a copy of the color at the given coordinates. | |
| colorT | getPxColor (fltCrdT x, fltCrdT y) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| colorT | getPxColor (pointIntType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| colorT | getPxColor (pointFltType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| colorT | getPxColorWrap (intCrdT x, intCrdT y) const |
| Returns a copy of the color at the given coordinates wrapping x & y if out of range. | |
| colorT | getPxColorWrap (fltCrdT x, fltCrdT y) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| colorT | getPxColorWrap (pointIntType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| colorT | getPxColorWrap (pointFltType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Pixel Channel Value Accessor Methods. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorT | getPxColorChan (intCrdT x, intCrdT y) const |
| Returns a copy of the color channel value at the given coordinates. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorT | getPxColorChan (fltCrdT x, fltCrdT y) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorT | getPxColorChan (pointIntType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorT | getPxColorChan (pointFltType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorChanType | getPxColorChanWrap (intCrdT x, intCrdT y) const |
| Returns a copy of the color channel value at the given coordinates wrapping x & y if out of range. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorChanType | getPxColorChanWrap (fltCrdT x, fltCrdT y) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorChanType | getPxColorChanWrap (pointIntType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<int chanNum> requires ((chanNum >= 0) && (chanNum < colorT::channelCount)) | |
| colorChanType | getPxColorChanWrap (pointFltType thePoint) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Pixel Value Accessor with Interpolation Methods | |
| colorT | getPxColorInterpolate (double x, double y, interpolationType interpMethod=interpolationType::BILINEAR) |
| Returns the interpolated color value at the the given coordinates using the given interpolation method. | |
| colorT | getPxColorInterpBLin (double x, double y) |
| Returns the bilinear interpolated color value at the the given coordinates. | |
| colorT | getPxColorInterpTrunc (double x, double y) |
| Returns the truncated interpolated color value at the the given coordinates. | |
| colorT | getPxColorInterpNear (double x, double y) |
| Returns the nearest neighbor interpolated color value at the the given coordinates. | |
| colorT | getPxColorInterpAvg4 (double x, double y) |
| Returns the average 4 interpolated color value at the the given coordinates. | |
| colorT | getPxColorInterpAvg9 (double x, double y) |
| Returns the average 9 interpolated color value at the the given coordinates. | |
NC stands for No Checks and No Clipping | |
| void | drawPointNC (intCrdT x, intCrdT y, colorArgType color) |
| The functions here work in a similar way to the non-NC functions, but with no clipping or bounds checking. | |
| colorT | getPxColorNC (intCrdT x, intCrdT y) const |
| Get the default point to the specified coordinates with no clipping or bounds checking. | |
| colorT & | getPxColorRefNC (intCrdT x, intCrdT y) const |
| Returns a reference to the color object for the given pixel with no clipping or bounds checking. | |
| void | drawHorzLineNC (intCrdT xMin, intCrdT xMax, intCrdT yConst, colorArgType color) |
| Draw a horizontal line with no clipping or bounds checking. | |
| void | drawVertLineNC (intCrdT yMin, intCrdT yMax, intCrdT xConst, colorArgType color) |
| Draw a vertical line with no clipping or bounds checking. | |
S stands for Simple | |
| void | drawPointS (intCrdT x, intCrdT y, colorArgType color) |
| Draw a point without any special drawing options. | |
Canvas Level Colorization. | |
These are tools designed to make things like escape time fractals very easy to create.
| |
| void | colorizeFltCanvas (std::function< colorT(fltCrdT, fltCrdT)> cFun) |
| void | colorizeFltCanvas (std::function< colorT(pointFltType)> cFun) |
| void | colorizeIntCanvas (std::function< colorT(intCrdT, intCrdT)> cFun) |
| void | colorizeIntCanvas (std::function< colorT(pointIntType)> cFun) |
Canvas Level Statistical Computation. | |
| intCrdT | statNumNonZeroPixels (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2) |
| intCrdT | statNumNonZeroPixels () |
Class providing off-screen drawing functionality.
This class essentially manages a 2D array of pixels (represented as colorTpl objects). Both integer and floating point coordinates are supported.
The traditional coordinate system used in mathematics is the Cartesian Coordinate system. In this system the axes represent real numbers which increase as one moves to the right or up.
^ y (increasing upward)
|
. (0, 1)
|
|
|
(-1,0) | (0,0) x (increasing to the right)
<-.--------+--------.----->
| (1,0)
|
|
|
. (0, -1)
|
v
Unlike the Cartesian coordinate system, the traditional coordinates used in computer graphics have only positive, integer coordinates, the origin at the upper left, and the x and y coordinates increasing to the right and down. This is a very natural choice given the discrete nature of digital displays and the typical layout of 2D arrays in RAM.
(0,0) +------------+ (numPixX-1, 0)
| |
| |
| |
| |
| |
(numPixY-1, 0) +------------+ (numPixX-1, numPixY-1)
This library supports two sets of coordinates for each image:
The integer coordinates are a generalization of the traditional integer coordinates used for computer graphics. Like the traditional system, they are unsigned integers (so the coordinates start at 0), each pixel is one unit from the previous, and the maximum pixel coordinate is one minus the canvas size in that coordinate direction. The generalization is that the origin of the coordinate system can be any of the four corners. By default the origin is the lower, left corner. Note that the memory layout of the image is not modified by the integer coordinate system – i.e. the location of the origin is irrelevant when it comes to the layout of bits in RAM. In RAM the layout is the same as the traditional coordinate system where the coordinates are the indexes of the image array. What is the point? The location of the origin is taken into consideration when the image is exported/imported by functions like writeRAWfile.
| intCrdT | An integral type used for the integer image coordinates. Should be signed, and at least \( 4\cdot\log_2(\mathtt{numPixX} \cdot \mathtt{numPixY}) \) bits in size |
| colorT | A type for the image pixels (a color) |
| fltCrdT | A floating point type used for the floating point image coordinates |
| enableDrawModes | If true, enables drawing modes other than drawModeType::SET. |
Definition at line 146 of file ramCanvasTpl.hpp.
| typedef point2d<fltCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointFltType |
Real coordinate pair type.
Definition at line 152 of file ramCanvasTpl.hpp.
| typedef point2d<intCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointIntType |
Integer coordinate pair type.
Definition at line 153 of file ramCanvasTpl.hpp.
| typedef std::vector<pointIntType> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointIntVecType |
Integer coordinate pair type.
Definition at line 154 of file ramCanvasTpl.hpp.
| typedef std::complex<fltCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cplxFltType |
Real coordinate complex type (Provided for convince – not used in ramCanvasTpl)
Definition at line 155 of file ramCanvasTpl.hpp.
| typedef std::complex<intCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cplxIntType |
Integer coordinate complex type (Provided for convince – not used in ramCanvasTpl)
Definition at line 156 of file ramCanvasTpl.hpp.
| typedef intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordIntType |
Integer type for coordinates.
Definition at line 157 of file ramCanvasTpl.hpp.
| typedef fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordFltType |
Real type for coordinates.
Definition at line 158 of file ramCanvasTpl.hpp.
| typedef colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorType |
Color type for pixels.
Definition at line 159 of file ramCanvasTpl.hpp.
| typedef std::function<colorT (fltCrdT, fltCrdT)> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::fltCrd2ColType |
std::function type floating point coordinates to a color
Definition at line 165 of file ramCanvasTpl.hpp.
| typedef std::function<colorT (pointFltType)> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::fltPnt2ColType |
std::function type floating point point to a color
Definition at line 166 of file ramCanvasTpl.hpp.
| typedef std::function<colorT (intCrdT, intCrdT)> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intCrd2ColType |
std::function type int point coordinates to a color
Definition at line 167 of file ramCanvasTpl.hpp.
| typedef std::function<colorT (pointIntType)> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intPnt2ColType |
std::function type int point point to a color
Definition at line 168 of file ramCanvasTpl.hpp.
| typedef colorT::channelType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanType |
colorT: Channel type
Definition at line 174 of file ramCanvasTpl.hpp.
| typedef colorT::maskType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorMaskType |
colorT: Mask type
Definition at line 175 of file ramCanvasTpl.hpp.
| typedef colorT::channelArithDType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithDType |
colorT: Channel arithmatic (Int: -)
Definition at line 176 of file ramCanvasTpl.hpp.
| typedef colorT::channelArithSPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSPType |
colorT: Channel arithmatic (Int: +*)
Definition at line 177 of file ramCanvasTpl.hpp.
| typedef colorT::channelArithSDPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSDPType |
colorT: Channel arithmatic (Int: +-*)
Definition at line 178 of file ramCanvasTpl.hpp.
| typedef colorT::channelArithFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithFltType |
colorT: Channel arithmatic (Flt: +-*)
Definition at line 179 of file ramCanvasTpl.hpp.
| typedef colorT::channelArithLogType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithLogType |
colorT: Channel arithmatic (Int: ^|&~)
Definition at line 180 of file ramCanvasTpl.hpp.
| typedef colorT::colorSpaceEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorSpaceEnum |
colorT: Color spaces
Definition at line 181 of file ramCanvasTpl.hpp.
| typedef colorT::cornerColorEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCornerEnum |
colorT: RGB Color Corners
Definition at line 182 of file ramCanvasTpl.hpp.
| typedef colorT::colorArgType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorArgType |
colorT: Argument passing type
Definition at line 183 of file ramCanvasTpl.hpp.
| typedef colorT::colorPtrType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorPtrType |
colorT: Pointer to color
Definition at line 184 of file ramCanvasTpl.hpp.
| typedef colorT::colorRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorRefType |
colorT: Ref to a color
Definition at line 185 of file ramCanvasTpl.hpp.
| typedef colorT::colorCRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCRefType |
colorT: Const Ref to a color
Definition at line 186 of file ramCanvasTpl.hpp.
| typedef colorT::csIntType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csIntType |
colorT: Color Scheme Integer Type
Definition at line 187 of file ramCanvasTpl.hpp.
| typedef colorT::csFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csFltType |
colorT: Color Scheme Float Type
Definition at line 188 of file ramCanvasTpl.hpp.
| typedef colorT::csNatType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csNatType |
colorT: Color Scheme Natural Type
Definition at line 189 of file ramCanvasTpl.hpp.
| typedef colorT::cmfInterpolationEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cmfInterpolationEnum |
colorT: Interpolation for color match functions
Definition at line 190 of file ramCanvasTpl.hpp.
| typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelIterator |
pixel store iterators
Definition at line 196 of file ramCanvasTpl.hpp.
| typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::iterator |
pixel store iterators
Definition at line 197 of file ramCanvasTpl.hpp.
|
strong |
Enum for real axis orientation.
| Enumerator | |
|---|---|
| INVERTED | Real axis is inverted with respect to the integer axis. |
| NATURAL | Real axis is not inverted with respect to the integer axis. |
Definition at line 204 of file ramCanvasTpl.hpp.
|
strong |
Enum for integer axis orientation.
Note integer axis orientation has no impact on the in-ram representation of the image. i.e. Pixel (0,0) will always be the first element of the pixels array. The integer axis orientation is used to arrange the pixels when a canvas is saved/loaded to/from an image file.
| Enumerator | |
|---|---|
| INVERTED | Zero is to the right or bottom. |
| NATURAL | Zero is to the left or top. |
Definition at line 212 of file ramCanvasTpl.hpp.
|
strong |
Enum for drawing Mode.
Definition at line 217 of file ramCanvasTpl.hpp.
|
strong |
Enum for drawing Mode.
Definition at line 227 of file ramCanvasTpl.hpp.
|
strongprivate |
Endianness Identifiers.
| Enumerator | |
|---|---|
| BIG | PowerPC. |
| LITTLE | Intel. |
| AUTO | Whatever the platform uses. |
Definition at line 248 of file ramCanvasTpl.hpp.
| mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | ) |
No arg constructor.
Sets numPixX and numPixY to -1, and pixels to NULL.
Definition at line 1975 of file ramCanvasTpl.hpp.
References newIntCoordsNC(), newRealCoords(), pixels, pixelsE, ramCanvasTpl(), setDefaultDrawMode(), setIntAxisDefaultOrientation(), and setRealAxisDefaultOrientation().
Referenced by combineRamCanvasBinOp(), geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), geomTfrmRevRPoly(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), and ~ramCanvasTpl().


| mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & | theCanvas | ) |
Copy constructor.
Definition at line 1989 of file ramCanvasTpl.hpp.
References drawMode, getPxColorRefNC(), intAxOrientationX, intAxOrientationY, maxRealX, maxRealY, minRealX, minRealY, newIntCoordsNC(), newRealCoords(), numPixX, numPixY, pixels, pixelsE, ramCanvasTpl(), realAxOrientationX, and realAxOrientationY.

| mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | intCrdT | numPixX_p, |
| intCrdT | numPixY_p, | ||
| fltCrdT | minRealX_p = -1, | ||
| fltCrdT | maxRealX_p = 1, | ||
| fltCrdT | minRealY_p = -1, | ||
| fltCrdT | maxRealY_p = 1 ) |
Most commonly used constructor.
The real coordinates have default values with -1 as the min values and 1 used as the max values.
| numPixX_p | Number of pixels in the X direction |
| numPixY_p | Number of pixels in the Y direction |
| minRealX_p | Minimum real x coordinate value |
| maxRealX_p | Maximum real x coordinate value |
| minRealY_p | Minimum real y coordinate value |
| maxRealY_p | Maximum real y coordinate value |
Definition at line 2044 of file ramCanvasTpl.hpp.
References clrCanvasToBlack(), newIntCoordsNC(), newRealCoords(), numPixX, numPixY, pixels, pixelsE, ramCanvasTpl(), setDefaultDrawMode(), setIntAxisDefaultOrientation(), and setRealAxisDefaultOrientation().

| mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > && | theCanvas | ) |
Move constructor.
Definition at line 2008 of file ramCanvasTpl.hpp.
References drawMode, intAxOrientationX, intAxOrientationY, maxRealX, maxRealY, minRealX, minRealY, newIntCoordsNC(), newRealCoords(), numPixX, numPixY, pixels, pixelsE, ramCanvasTpl(), realAxOrientationX, and realAxOrientationY.

| mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::~ramCanvasTpl | ( | ) |
Destructor deallocates memory for the canvas.
Definition at line 2058 of file ramCanvasTpl.hpp.
References pixels, and ramCanvasTpl().

|
private |
Utliity function behind the drawFillTriangle() functions.
| x1 | The x coordinate of the first point |
| y1 | The y coordinate of the first point |
| x2 | The x coordinate of the second point |
| y2 | The y coordinate of the second point |
| x3 | The x coordinate of the third point |
| y3 | The y coordinate of the third point |
| c1 | The color of the first point (x1, y1) |
| c2 | The color of the second point (x2, y2) |
| c3 | The color of the third point (x3, y3) |
| solid | Use only c1 if true, otherwise use barycentric interpolation |
Definition at line 3773 of file ramCanvasTpl.hpp.
References drawFillTriangleUtl(), drawLine(), drawPointNC(), isCliped(), numPixY, and triangleEdger().
Referenced by drawFillTriangle(), drawFillTriangle(), and drawFillTriangleUtl().


|
inlineprivate |
Write an unsigned integer to a stream with given length and endianness.
| oStream | The ostream object to which to write |
| endianness | The endianness to use for the integer. |
| numBytes | The number of bytes of the data parameter to use (logically the least significant bits) |
| data | The integer to write |
Definition at line 2826 of file ramCanvasTpl.hpp.
References AUTO, LITTLE, platformEndianness(), and writeUIntToStream().
Referenced by writeTGAfile(), writeTIFFfile(), and writeUIntToStream().


|
inlineprivate |
Determine the platform's endianness.
Definition at line 2813 of file ramCanvasTpl.hpp.
References BIG, LITTLE, and platformEndianness().
Referenced by platformEndianness(), readRAWfile(), writeRAWfile(), writeTIFFfile(), and writeUIntToStream().


|
inlineprivate |
Several internal parameters are maintained within this class that make conversion between real coordinates and integer coordinate very fast.
This function will update the internal parameters if the real coordinate sizes or the integer coordinate sizes have changed. This function is intended for internal use. An example of when to use this function is right after the integer coordinate axes have changed via a call to newIntCoordsNC().
Definition at line 2103 of file ramCanvasTpl.hpp.
References canvasWidX, canvasWidY, maxRealX, maxRealY, minRealX, minRealY, numPixX, numPixY, pixWidX, pixWidY, and updRealCoords().
Referenced by newRealCoords(), rePointPixels(), and updRealCoords().


|
inlineprivate |
Change the logical coordinate sizes.
It is important that the specified coordinate sizes describe an image with FEWER pixels than the previous sizes. This function will NOT allocate a new pixel array, so the previous array contents will be interpreted as valid data – just at different coordinates. This function causes no memory leaks. This function will NOT update the internal parameters related to real coordinate systems and so updRealCoords() should be called after this function in most cases. This function is intended for internal use and provides no safety checks.
| numPixX_p | The width of the new canvas |
| numPixY_p | The height of the new canvas |
Definition at line 2069 of file ramCanvasTpl.hpp.
References intCrdMax, numPix, numPixX, and numPixY.
Referenced by freeCanvas(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), and rePointPixels().

|
private |
Destroy the current pixel memory and reallocate a new pixel space of the given size.
This will not clear the canvas. It will not reallocate the canvas unless the new size is different from the current size. It will not allocate a new canvas if either argument is zero or less. Updates coordinates.
| numPixX_p | The width of the new canvas |
| numPixY_p | The height of the new canvas |
Definition at line 2655 of file ramCanvasTpl.hpp.
References freeCanvas(), numPixX, numPixY, reallocCanvas(), and rePointPixels().
Referenced by reallocCanvas(), and resizeCanvas().


|
private |
Free the pixel memory (i)
Definition at line 2626 of file ramCanvasTpl.hpp.
References freeCanvas(), newIntCoordsNC(), pixels, and pixelsE.
Referenced by freeCanvas(), reallocCanvas(), and rePointPixels().


|
private |
Points the pixels pointer at a new pixel store, and updates coordinates.
Pixels pointer not changed if new_pixels is NULL
Definition at line 2639 of file ramCanvasTpl.hpp.
References freeCanvas(), newIntCoordsNC(), pixels, pixelsE, rePointPixels(), and updRealCoords().
Referenced by convolution(), cropCanvas(), expandCanvas(), flipTranspose(), reallocCanvas(), rePointPixels(), rotate180(), rotate90CCW(), rotate90CW(), scaleDown1pt(), scaleDownMax(), scaleDownMean(), and scaleUpProximal().


|
inlineprivate |
Used to find the left and right edges of a triangle.
Definition at line 3621 of file ramCanvasTpl.hpp.
References triangleEdger().
Referenced by drawFillTriangleUtl(), and triangleEdger().


| int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::exportRasterData | ( | void *& | rasterData, |
| intCrdT | x1, | ||
| intCrdT | y1, | ||
| intCrdT | x2, | ||
| intCrdT | y2, | ||
| int | redChan, | ||
| int | greenChan, | ||
| int | blueChan, | ||
| int | alphaChan ) |
Extract raster data from the image, and pack it into a typical form used by imaging applications.
Each pixel is packed into a 1, 2, 3, or 4 byte memory block with the location of each channel given by redChan, blueChan, greenChan, and alphaChan. If one of these values is -1, then that channel is not extracted. For example, all of them set to -1 except redChan (set to 0), an 8-bit gray scale image would be extracted. One might extract 24-bit RGB with redChan=0, greenChan=1, and blueChan=2. Add alphaChan=3, and extract 24-bit RGB with alpha – sometimes called 24-bit RGBA or 32-bit RGBA. Many systems expect the alpha bit to be first, so one might use alphaChan=0, redChan=1, greenChan=2, and blueChan=3 to get ARGB. As a fine example, TARGA images use BGR – blueChan=0, greenChan=1, and redChan=2. In summary:
Examples of how to pack various common raster data formats
..........RGB RGBA ARGB BGR ABGR Grey
redChan 0 0 1 2 3 0
greenChan 1 1 2 1 2 -1
blueChan 2 2 3 0 1 -1
alphaChan -1 3 0 -1 0 -1
| rasterData | Unsigned char pointer to image data. If NULL,then data will be allocated for image. |
| x1 | First x coordinate first corner of sub-image to extract |
| x2 | First x coordinate second corner of sub-image to extract |
| y1 | First y coordinate first corner of sub-image to extract |
| y2 | First y coordinate second corner of sub-image to extract |
| redChan | Channel index to use for red |
| blueChan | Channel index to use for blue |
| greenChan | Channel index to use for green |
| alphaChan | Channel index to use for alpha |
Definition at line 3197 of file ramCanvasTpl.hpp.
References exportRasterData(), getPxColorNC(), numPixX, and numPixY.
Referenced by exportRasterData().


| ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator= | ( | ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > && | theCanvas | ) |
Move assignment operator.
Definition at line 2025 of file ramCanvasTpl.hpp.
References drawMode, intAxOrientationX, intAxOrientationY, maxRealX, maxRealY, minRealX, minRealY, newIntCoordsNC(), newRealCoords(), numPixX, numPixY, pixels, pixelsE, ramCanvasTpl(), realAxOrientationX, and realAxOrientationY.

|
inline |
Adjoin the canvas to the side of the current canvas.
| theCanvas | The canvas to adjoin. |
Definition at line 474 of file ramCanvasTpl.hpp.
|
inline |
Adjoin the canvas to the side of the current canvas.
| theCanvas | The canvas to adjoin. |
Definition at line 485 of file ramCanvasTpl.hpp.
|
inline |
Adjoin the canvas to the side of the current canvas.
| theCanvas | The canvas to adjoin. |
Definition at line 496 of file ramCanvasTpl.hpp.
|
inline |
Adjoin the canvas to the side of the current canvas.
| theCanvas | The canvas to adjoin. |
Definition at line 507 of file ramCanvasTpl.hpp.
|
inline |
Draw the given canvas at the indicated point.
| theCanvas | The canvas to draw on the current canvas. |
| x1 | X coordinate at which to place the canvas. |
| y1 | Y coordinate at which to place the canvas. |
Definition at line 520 of file ramCanvasTpl.hpp.
| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::resizeCanvas | ( | intCrdT | new_numPixX_p, |
| intCrdT | new_numPixY_p ) |
Resize the canvas to the given size.
Contents of new canvas may be random data. Not guarnteed to reallocate the canvas.
| new_numPixX_p | The width of the new canvas |
| new_numPixY_p | The height of the new canvas |
Definition at line 2672 of file ramCanvasTpl.hpp.
References reallocCanvas(), and resizeCanvas().
Referenced by readRAWfile(), readTIFFfile(), and resizeCanvas().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::expandCanvas | ( | intCrdT | new_numPixX_p, |
| intCrdT | new_numPixY_p, | ||
| intCrdT | x1 = 0, | ||
| intCrdT | y1 = 0, | ||
| colorArgType | color = colorT(colorT::minChanVal) ) |
Expand the current canvas.
The current image will appear within the new canvas at the specified location. All pixels not set by the previous image will be set to the given color.
| new_numPixX_p | The width of the new canvas |
| new_numPixY_p | The height of the new canvas |
| x1 | Coord at which the left of the old image will appear in the new image |
| y1 | Coord at which the top of the old image will appear in the new image |
| color | Color to use for the background of the new image. |
Definition at line 2680 of file ramCanvasTpl.hpp.
References expandCanvas(), getPxColor(), numPixX, numPixY, and rePointPixels().
Referenced by expandCanvas().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cropCanvas | ( | intCrdT | x1, |
| intCrdT | y1, | ||
| intCrdT | x2, | ||
| intCrdT | y2 ) |
This function will crop the canvas to the given rectangular region.
| x1 | Left, or right, edge of region to keep. |
| x2 | Right, or left, edge of region to keep. |
| y1 | Left, or right, edge of region to keep. |
| y2 | Right, or left, edge of region to keep. |
Definition at line 2707 of file ramCanvasTpl.hpp.
References cropCanvas(), getPxColor(), isCliped(), and rePointPixels().
Referenced by cropCanvas().


|
inline |
Change the real coordinate system associated with a canvas.
It updates all internal parameters are required.
| minRealX_p | Minimum real x coordinate value |
| maxRealX_p | Maximum real x coordinate value |
| minRealY_p | Minimum real y coordinate value |
| maxRealY_p | Maximum real y coordinate value |
Definition at line 2085 of file ramCanvasTpl.hpp.
References maxRealX, maxRealY, minRealX, minRealY, newRealCoords(), and updRealCoords().
Referenced by newRealCoords(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), and ramCanvasTpl().


|
inline |
Return true if given canvas and current canvas are the same size.
Definition at line 572 of file ramCanvasTpl.hpp.
|
inline |
Return true if given canvas and current canvas are NOT the same size.
Definition at line 580 of file ramCanvasTpl.hpp.
|
inline |
Return true if corresponding pixels in each canvas are "close" as defined by colorTpl::isClose().
Definition at line 588 of file ramCanvasTpl.hpp.
|
inline |
Return true if corresponding pixels in each canvas are "equal" as defined by colorTpl::isEqual().
Definition at line 599 of file ramCanvasTpl.hpp.
| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate90CW | ( | ) |
Loss-less 90 degree clockwise rotation of the canvas about the center.
The top row of pixels will be on the right side after the rotation. The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.
Definition at line 2771 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and rotate90CW().
Referenced by rotate90CW().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate90CCW | ( | ) |
Loss-less 90 degree counter clockwise rotation of the canvas about the center.
The top row of pixels will be on the left side after the rotation. The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.
Definition at line 2785 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and rotate90CCW().
Referenced by rotate90CCW().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate180 | ( | ) |
Loss-less 180 degree rotation of the canvas about the center.
The top row of pixels will be on the bottom side after the rotation. The transformation is not done "in place", so enough memory is required to duplicate the canvas.
Definition at line 2799 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and rotate180().
Referenced by rotate180().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipHorz | ( | ) |
Loss-less, horizontal flip of the canvas about the center.
The top row of pixels will be on the bottom side after the flip. The transformation is done "in place" so no extra RAM is required.
Definition at line 2731 of file ramCanvasTpl.hpp.
References drawPointNC(), flipHorz(), getPxColor(), numPixX, and numPixY.
Referenced by flipHorz().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipVert | ( | ) |
Loss-less, vertical flip of the canvas about the center.
The left row of pixels will be on the right side after the flip. The transformation is done "in place" so no extra RAM is required.
Definition at line 2744 of file ramCanvasTpl.hpp.
References drawPointNC(), flipVert(), getPxColor(), numPixX, and numPixY.
Referenced by flipVert().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipTranspose | ( | ) |
Loss-less, vertical flip of the canvas about the center.
The top row of pixels will be on the left side after the flip, and pixel (x,y) will be in position (y,x). The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.
Definition at line 2757 of file ramCanvasTpl.hpp.
References flipTranspose(), getPxColor(), numPixX, numPixY, and rePointPixels().
Referenced by flipTranspose().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleUpProximal | ( | int | xfactor | ) |
Scale up the image using proximal interpolation.
For each source pixel we create an xfactor*xfactor box filled with the color of the original pixel. The resulting images are block, but the histograms stay accurate. The algorithm is very fast as it is very simple.
| xfactor | The factor to scale up to – must be a positive integer. |
Definition at line 4186 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and scaleUpProximal().
Referenced by scaleUpProximal().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDown1pt | ( | int | xfactor | ) |
Scale down using only the upper left pixel from each block.
This will tend to highlight horizontal and vertical detail and generally sharpen up the image. Much data is lost with this sort of scaling operation.
| xfactor | The factor to scale up to – must be a positive integer. |
Definition at line 4214 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and scaleDown1pt().
Referenced by scaleDown1pt().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDownMax | ( | int | xfactor | ) |
Scale down using only the pixel with maximum luminosity in each block.
Much like scaleDown1pt(), this will sharpen up a scaled image, but it will also tend to brighten up the image as well.
| xfactor | The factor to scale up to – must be a positive integer. |
Definition at line 4255 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and scaleDownMax().
Referenced by scaleDownMax().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDownMean | ( | int | xfactor | ) |
Scale down using the mean pixel value from each block.
This creates each pixel value by averaging all of the pixels that contribute – i.e. a mean on the xfactor*xfactor pixel corresponding to each new pixel. This algorithm tends to "fuzz-up" the result – frequently used for super-sampling.
| xfactor | The factor to scale down to – must be a positive integer. |
Definition at line 4230 of file ramCanvasTpl.hpp.
References getPxColor(), numPixX, numPixY, rePointPixels(), and scaleDownMean().
Referenced by scaleDownMean().


| ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevRPoly | ( | std::vector< double > const & | RPoly, |
| double | rScale, | ||
| double | Xo, | ||
| double | Yo, | ||
| double | oScale, | ||
| colorArgType | errorColor = colorCornerEnum::GREEN, | ||
| interpolationType | interpMethod = interpolationType::BILINEAR ) |
Geometric Transform via Radial Polynomial implemented with Reverse Mapping.
| RPoly | RPoly is a vector listing the coefficients of a univariate polynomial in lexicographical order – i.e. RPoly[0] is the coefficients on the highest power term. |
| rScale | Scale to apply before the transformation to the radius. |
| Xo | X coordinate for origin translation – applied before RPoly and reversed after RPoly & scale. |
| Yo | Y coordinate for origin translation – applied before RPoly and reversed after RPoly & scale. |
| oScale | Scale to apply after RPoly and before reverse translation. |
| errorColor | The color to use for pixels with no valid mapping. |
| interpMethod | Eventually this will be the interpolation method used. |
Definition at line 4789 of file ramCanvasTpl.hpp.
References drawPointNC(), geomTfrmRevRPoly(), getPxColorInterpolate(), isCliped(), numPixX, numPixY, and ramCanvasTpl().
Referenced by geomTfrmRevRPoly().


| ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevBiPoly | ( | std::vector< double > const & | BiPolyX, |
| std::vector< double > const & | BiPolyY, | ||
| double | Xo, | ||
| double | Yo, | ||
| double | oScale, | ||
| colorArgType | errorColor = colorCornerEnum::GREEN, | ||
| interpolationType | interpMethod = interpolationType::BILINEAR ) |
Geometric Transform via bivariate polynomial implemented with Reverse Mapping.
| BiPolyX | Coefficients for a bivariate polynomial in lexicographical order – used to map x coordinates. |
| BiPolyY | Coefficients for a bivariate polynomial in lexicographical order – used to map y coordinates. |
| Xo | X coordinate for origin translation – applied before BiPoly*and reversed after BiPoly*& scale. |
| Yo | Y coordinate for origin translation – applied before BiPoly*and reversed after BiPoly*& scale. |
| oScale | Scale to apply after BiPoly*and before reverse translation. |
| errorColor | The color to use for pixels with no valid mapping. |
| interpMethod | Eventually this will be the interpolation method used. |
Definition at line 4822 of file ramCanvasTpl.hpp.
References drawPointNC(), geomTfrmRevBiPoly(), getPxColorInterpolate(), isCliped(), numPixX, numPixY, and ramCanvasTpl().
Referenced by geomTfrmRevBiPoly().


| ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevAff | ( | std::vector< double > const & | HAMatrix, |
| double | Xo, | ||
| double | Yo, | ||
| double | oScale, | ||
| colorArgType | errorColor = colorCornerEnum::GREEN, | ||
| interpolationType | interpMethod = interpolationType::BILINEAR ) |
Homogenious Affine Geometric Transform implemented with Reverse Mapping.
[1 0 T_x] [S_x 0 0] [cA sA 0] [x_in] [x_out] [0 1 T_y] [0 S_y 0] [-SA cA 0] T * [y_in] => [y_out] [0 0 1 ] [0 0 1] [0 0 1] [1 ] [1 ]
| HAMatrix | Homogeneous affine transform matrix – 9 elements interpreted as a row major order 3x3 matrix. |
| Xo | X coordinate for origin translation – applied before HAMatrixand reversed after HAMatrix& scale. |
| Yo | Y coordinate for origin translation – applied before HAMatrixand reversed after HAMatrix& scale. |
| oScale | Scale to apply after HAMatrixand before reverse translation. |
| errorColor | The color to use for pixels with no valid mapping. |
| interpMethod | Eventually this will be the interpolation method used. |
Definition at line 4762 of file ramCanvasTpl.hpp.
References drawPointNC(), geomTfrmRevAff(), getPxColorInterpolate(), isCliped(), numPixX, numPixY, and ramCanvasTpl().
Referenced by geomTfrmRevAff().


| ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevArb | ( | mjr::point2d< double >(* | f )(double, double), |
| double | Xo, | ||
| double | Yo, | ||
| double | oScale, | ||
| colorArgType | errorColor = colorCornerEnum::GREEN, | ||
| interpolationType | interpMethod = interpolationType::BILINEAR ) |
Geometric Transform via provided mapping function implemented with Reverse Mapping.
| f | The coordinate transformation function |
| Xo | X coordinate for origin translation – applied before f and reversed after f & scale. |
| Yo | Y coordinate for origin translation – applied before f and reversed after f & scale. |
| oScale | Scale to apply after f and before reverse translation. |
| errorColor | The color to use for pixels with no valid mapping. |
| interpMethod | Eventually this will be the interpolation method used. |
Definition at line 4734 of file ramCanvasTpl.hpp.
References drawPointNC(), geomTfrmRevArb(), getPxColorInterpolate(), isCliped(), numPixX, numPixY, ramCanvasTpl(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by geomTfrmRevArb().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::convolution | ( | double * | kernel, |
| int | kWide, | ||
| int | kTall, | ||
| double | divisor ) |
Apply a convolution filter.
The implementation for this method is quite naive and super slow! Frankly, this kind of functionality is beyond the scope of this library; however, sometimes you just need a convolution filter and you don't want to go to the extra effort of using yet another external library. Pixels outside the canvas are considered black.
| kernel | The convolution kernel. Must be of length kWide*kTall. |
| kWide | The width of the kernel. Must be odd. |
| kTall | The height of the kernel. Must be odd. |
| divisor | Used to normalize dot product at each step. i.e. one might say the kernel for the convolution is really kernel/divisor. |
Definition at line 4301 of file ramCanvasTpl.hpp.
References convolution(), getPxColor(), isCliped(), numPixX, numPixY, and rePointPixels().
Referenced by convolution(), convolution(), and convolution().


|
inline |
Definition at line 4337 of file ramCanvasTpl.hpp.
References convolution().

|
inline |
Definition at line 4344 of file ramCanvasTpl.hpp.
References convolution().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::computeConvolutionMatrixGausian | ( | double * | kernel, |
| int | kSize, | ||
| double | sd ) |
Compute a Gaussian convolution kernel (use with divisor==1.0).
| kernel | Pointer to space for the convolution kernel. Must have at least space for kSize*kSize doubles |
| kSize | The width and height of the kernel. Must be odd. |
| sd | The standard deviation. |
Definition at line 4276 of file ramCanvasTpl.hpp.
References computeConvolutionMatrixGausian().
Referenced by computeConvolutionMatrixGausian().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::computeConvolutionMatrixBox | ( | double * | kernel, |
| int | kSize ) |
Compute a box blur convolution kernel (use with divisor==1.0).
| kernel | Pointer to space for the convolution kernel. Must have at least space for kSize*kSize doubles |
| kSize | The width and height of the kernel. Must be odd. |
Definition at line 4291 of file ramCanvasTpl.hpp.
References computeConvolutionMatrixBox().
Referenced by computeConvolutionMatrixBox().


|
inline |
Definition at line 793 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 794 of file ramCanvasTpl.hpp.
|
inline |
Apply a homogeneous pixel transformation.
Homogeneous pixel transformations don't vary based upon the coordinates of the pixel in question, but depend only upon the value of the pixel. Thus, a homogeneous pixel transformation can be considered as a pixel function applied to each pixel in an image. Many standard pixel functions are defined within the colorT object. The ramCanvasTpl object must then only apply the methods available within each colorT class to support most of the standard homogeneous pixel transformations. Additionally, new functions are automatically available to the ramCanvasTpl (both in the colorT class and new functions from other sources).
Definition at line 2252 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), autoHistStrech(), and autoMaxHistStrechRGB().


|
inline |
Definition at line 2342 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2352 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2362 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2372 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2383 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2393 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2302 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2312 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2322 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2332 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2262 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2272 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2282 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Definition at line 2292 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), getPxColorRefNC(), numPixX, and numPixY.

|
inline |
Apply a a function to a each pixel via refrence.
Definition at line 2242 of file ramCanvasTpl.hpp.
References applyPixelRefFun(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by applyPixelRefFun().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::autoHistStrech | ( | ) |
Computes a linear grey level scale homogeneous pixel transformation.
f(c)=(c-cmin)*maxChanVal/(cmax-cmin) where cmin is the lowest integer value assumed by any pixel color component and cmax is the largest integer value assumed by any pixel color component. This function is sometimes called "auto contrast adjust" or "linear auto contrast adjust".
Definition at line 2190 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), autoHistStrech(), getPxColorNC(), numPixX, and numPixY.
Referenced by autoHistStrech().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::autoMaxHistStrechRGB | ( | ) |
Computes a, possibly different, linear grey level scale homogeneous pixel transformation on each channel of the image.
Channel n is transformed such that f_n(c)=(c-cmin_n)*maxChanVal/(cmax_n-cmin_n) where cmin_n and cmax_n are the minimum and maximum values in channel n. i.e. this is the same as applying autoHistStrech independently to each channel.
Definition at line 2215 of file ramCanvasTpl.hpp.
References applyHomoPixTfrm(), autoMaxHistStrechRGB(), getPxColorNC(), numPixX, and numPixY.
Referenced by autoMaxHistStrechRGB().


|
inline |
This function takes a ramCanvasTpl and combines it with the current ramCanvasTpl using the provided binary operator.
| HPT | Pointer to a binary operator. |
| theCanvas | This is the ramCanvasTpl to combine with. |
| trgX | Final X coordinate for the left of the combined region. Default: 0 |
| trgY | Final Y coordinate for the top of the combined region. Default: 0 |
| srcX | Left edge of the region to combine with. Default: 0 |
| srcY | Top edge of the region to combine with. Default: 0 |
| wide | Width of the region to combine with. Default: -1 (indicates to edge of canvas) |
| tall | Height of the region to combine with. Default: -1 (indicates to edge of canvas) |
Definition at line 2403 of file ramCanvasTpl.hpp.
References combineRamCanvasBinOp(), getNumPixX(), getNumPixY(), getPxColor(), getPxColorRefNC(), numPixX, numPixY, and ramCanvasTpl().
Referenced by combineRamCanvasBinOp().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasMean | ( | ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > * | theCanvasList, |
| const int | N ) |
Take a list of ramCanvasTpl objects and combine them with the current ramCanvasTpl using mean.
| theCanvasList | This is the array of ramCanvasTpl's to combine with. |
| N | The number of canvas objects. |
|
inline |
Clear the canvas to black.
Faster than clrCanvas().
Definition at line 2134 of file ramCanvasTpl.hpp.
References clrCanvasToBlack(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by clrCanvasToBlack(), and ramCanvasTpl().


|
inline |
Clear the canvas to black.
Faster than clrCanvas().
Definition at line 2162 of file ramCanvasTpl.hpp.
References clrCanvasToWhite(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by clrCanvasToWhite().


|
inline |
Set the given channel to the minimum value.
Definition at line 2114 of file ramCanvasTpl.hpp.
References clrCanvasChannelToMin(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by clrCanvasChannelToMin().


|
inline |
Set the given channel to the maximum value.
Definition at line 2124 of file ramCanvasTpl.hpp.
References clrCanvasChannelToMax(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by clrCanvasChannelToMax().


|
inline |
Clear the canvas.
Definition at line 2172 of file ramCanvasTpl.hpp.
References clrCanvas(), and dfltColor.
Referenced by clrCanvas(), and clrCanvas().


|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 2180 of file ramCanvasTpl.hpp.
References clrCanvas(), drawPointS(), numPixX, and numPixY.

|
inline |
Set the current default point to the given coordinates.
| x | The x coordinate of the point to move to. |
| y | The y coordinate of the point to move to. |
Definition at line 907 of file ramCanvasTpl.hpp.
Referenced by drawHersheyGlyph(), and drawLine().

|
inline |
Definition at line 908 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::moveTo().

|
inline |
Definition at line 909 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::moveTo().

|
inline |
Definition at line 910 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::moveTo().

|
inline |
Set the default color.
Definition at line 918 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 919 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 920 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 921 of file ramCanvasTpl.hpp.
|
inline |
Draw a point at the specified coordinates with the specified color.
Overloaded versions exist with various arguments.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
| color | The color to draw the point |
Definition at line 933 of file ramCanvasTpl.hpp.
Referenced by colorizeFltCanvas(), colorizeFltCanvas(), colorizeIntCanvas(), colorizeIntCanvas(), drawCircle(), drawLine(), and main().

|
inline |
Definition at line 937 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 938 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 939 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 940 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 941 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 942 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 943 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 944 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Definition at line 945 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawPoint().

|
inline |
Transform the pixel at the specified coordinates.
Overloaded versions exist with various arguments.
| x | The x coordinate of the pixel |
| y | The y coordinate of the pixel |
| transform | The color to draw the pixel |
Definition at line 964 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 968 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::tformPixel().

|
inline |
Definition at line 969 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::tformPixel().

|
inline |
Definition at line 970 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::tformPixel().

|
inline |
Increment the specified color channel of the pixel at the given coordinates by the specified value.
Overloaded versions exist with various arguments.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
| v | The incriment value |
Definition at line 989 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 996 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1004 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1008 of file ramCanvasTpl.hpp.
| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine | ( | intCrdT | x1, |
| intCrdT | y1, | ||
| intCrdT | x2, | ||
| intCrdT | y2, | ||
| colorArgType | color ) |
Draw a line.
This function is optimized for speed, and has special code for handling lines of slope 0, 1, -1, and infinity. Line is clipped to the current canvas.
| x1 | x coordinate of the first point |
| y1 | y coordinate of the first point |
| x2 | x coordinate of the second point |
| y2 | y coordinate of the second point |
| color | The color to use |
The algorithms used to draw lines in the last four cases are related to the classic algorithm presented by Bresenham in 1965 and the extensions to Bresenham's algorithm given by Pitteway in 1967 and Van Aken in 1984. The basic algorithm described by Bresenham, Pitteway, and Van Aken is known as the "Midpoint Algorithm". For the case 0<m<1, the algorithm used is actually the midpoint algorithm, and the remaining cases are obvious extensions to the midpoint algorithm. Each case is customized and optimized for the given slope class.
The clipping algorithm used for the last slope classes is similar in spirit to the Cohen-Sutherland Line-Clipping algorithm, but is optimized for each slope class. Several pre-checks are made in order to avoid the slope computations in the Cohen-Sutherland algorithm – in fact intersections are only computed if absolutely required. Note that the only floating point computations in this function are the intersection computations, and they will be avoided completely if the given line need not be clipped.
Definition at line 2443 of file ramCanvasTpl.hpp.
References drawHorzLineNC(), drawLine(), drawPoint(), drawPointNC(), drawVertLineNC(), moveTo(), numPixX, and numPixY.
Referenced by drawFillCircle(), drawFillTriangleUtl(), drawHersheyGlyph(), drawLine(), drawPLCurve(), drawPLCurve(), drawPLCurve(), drawPLCurve(), and drawTriangle().


|
inline |
Definition at line 1043 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1044 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1045 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1046 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1047 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1048 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1049 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1050 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1051 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1052 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1053 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1054 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1055 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1056 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Definition at line 1057 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawLine().

|
inline |
Draw an un-filled triangle.
| x1 | The x coordinate of the first point |
| y1 | The y coordinate of the first point |
| x2 | The x coordinate of the second point |
| y2 | The y coordinate of the second point |
| x3 | The x coordinate of the third point |
| y3 | The y coordinate of the third point |
| color | The color to use for the triangle |
Definition at line 4005 of file ramCanvasTpl.hpp.
References drawLine(), and drawTriangle().
Referenced by drawTriangle().


|
inline |
Definition at line 1074 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1075 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1078 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1081 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1082 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1083 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1086 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1089 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1090 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1091 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Definition at line 1092 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawTriangle().

|
inline |
Draw a triangle filled with a solid color using a nicely optimized, horizontal scan conversion algorithm.
Triangles not entirely on the canvas are not rendered.
Not thread safe.
| x1 | The x coordinate of the first point |
| y1 | The y coordinate of the first point |
| x2 | The x coordinate of the second point |
| y2 | The y coordinate of the second point |
| x3 | The x coordinate of the third point |
| y3 | The y coordinate of the third point |
| color | The color to use for the triangle |
Definition at line 3754 of file ramCanvasTpl.hpp.
References drawFillTriangle(), and drawFillTriangleUtl().
Referenced by drawFillTriangle(), and drawFillTriangle().


|
inline |
Definition at line 1110 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1111 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1114 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1117 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1120 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1121 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1124 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1127 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1128 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1129 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Definition at line 1130 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillTriangle().

|
inline |
Draw a filled triangle using barycentric color interpolation.
Triangles not entirely on the canvas are not rendered.
Degenerate trainagles are not rendered
Painfully slow
| x1 | The x coordinate of the first point |
| y1 | The y coordinate of the first point |
| x2 | The x coordinate of the second point |
| y2 | The y coordinate of the second point |
| x3 | The x coordinate of the third point |
| y3 | The y coordinate of the third point |
| color1 | The color of the first point (x1, y1) |
| color2 | The color of the second point (x2, y2) |
| color3 | The color of the third point (x3, y3) |
Definition at line 3762 of file ramCanvasTpl.hpp.
References drawFillTriangle(), and drawFillTriangleUtl().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle | ( | intCrdT | x1, |
| intCrdT | y1, | ||
| intCrdT | x2, | ||
| intCrdT | y2, | ||
| colorArgType | color ) |
Draw an unfilled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).
Best performance will be achieved if (x1, y1) is the upper left corner, and (x2,y2) is the lower left corner and both (x1,y1) and (x2,y2) are within the bounds of the canvas using the specified color.
| x1 | The x coordinate of first corner |
| y1 | The y coordinate of first corner |
| x2 | The x coordinate of second corner |
| y2 | The y coordinate of second corner |
| color | The color to use |
Definition at line 4112 of file ramCanvasTpl.hpp.
References drawHorzLineNC(), drawRectangle(), drawVertLineNC(), numPixX, and numPixY.
Referenced by drawRectangle().


|
inline |
Definition at line 1166 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1167 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1168 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1169 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1170 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1171 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1172 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1173 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1174 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1175 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Definition at line 1176 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawRectangle().

|
inline |
Draw a filled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).
Best performance will be achieved if (x1, y1) is the upper left corner, and (x2,y2) is the lower left corner and both (x1,y1) and (x2,y2) are within the bounds of the canvas using the specified color.
| x1 | The x coordinate of first corner |
| y1 | The y coordinate of first corner |
| x2 | The x coordinate of second corner |
| y2 | The y coordinate of second corner |
| color | The color to use |
Definition at line 4143 of file ramCanvasTpl.hpp.
References drawFillRectangle(), drawHorzLineNC(), numPixX, and numPixY.
Referenced by drawFillRectangle(), and drawStringBox().


|
inline |
Definition at line 1192 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1193 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1194 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1195 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1196 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1197 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1198 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1199 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1200 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1201 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

|
inline |
Definition at line 1202 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillRectangle().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle | ( | intCrdT | centerX, |
| intCrdT | centerY, | ||
| intCrdT | radiusX, | ||
| colorArgType | color ) |
Draw an un-filled circle.
The algorithm used is based upon the one presented in "A Linear Algorithm for Incremental Digital Display of Circular Arcs" published in the Communications of the AMC in Feb 1977 and written by J.E. Bresenham. Bresenham's algorithm has been significantly improved by using only integer arithmetic and adding second order differences to the computation – much the way the line drawing algorithm works in this package. The algorithm is essentially a scan line conversion algorithm, so the circle is always approximately one pixel thick. One subtle point: The real X and Y axes in this package can have different scaling. This means that one must pick a direction in which the radius will be measured in real coordinate deltas. In this function, that direction is along the X axis – i.e. the radius of the drawn circle will be measured horizontally. This function is well optimized.
| centerX | The x coordinate of the center |
| centerY | The y coordinate of the center |
| radiusX | The radius of the circle |
| color | The color to draw the circle with |
Definition at line 4015 of file ramCanvasTpl.hpp.
References drawCircle(), and drawPoint().
Referenced by drawCircle().


|
inline |
Definition at line 1223 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1224 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1225 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1226 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1227 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1228 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1229 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1230 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

|
inline |
Definition at line 1231 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawCircle().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle | ( | intCrdT | centerX, |
| intCrdT | centerY, | ||
| intCrdT | radiusX, | ||
| colorArgType | color ) |
Draw an un-filled circle.
The algorithm used to compute circle edge points is the same as that used in drawCircle; however, the algorithm used to fill the circle is of my own design. I doubt that it is new, but I have never come across it in my readings – not that I have looked too hard. The algorithm has the advantage that most of the interior points are only drawn one time. One subtle point: The real X and Y axes in this package can have different scaling. This means that one must pick a direction in which the radius will be measured in real coordinate deltas. In this function, that direction is along the X axis – i.e. the radius of the drawn circle will be measured horizontally. This function is well optimized.
| centerX | The x coordinate of the center |
| centerY | The y coordinate of the center |
| radiusX | The radius of the circle |
| color | The color to draw the circle with |
Definition at line 4059 of file ramCanvasTpl.hpp.
References drawFillCircle(), and drawLine().
Referenced by drawFillCircle().


|
inline |
Definition at line 1250 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1251 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1252 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1253 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1254 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1255 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1256 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1257 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Definition at line 1258 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawFillCircle().

|
inline |
Draw Piece-Wise Linear Curves.
Definition at line 3962 of file ramCanvasTpl.hpp.
References drawLine(), and drawPLCurve().
Referenced by drawPLCurve(), drawPLCurve(), drawPLCurve(), drawPLCurve(), drawPLCurve(), drawPLCurve(), drawPLCurve(), and drawPLCurve().


|
inline |
Definition at line 3954 of file ramCanvasTpl.hpp.
References dfltColor, and drawPLCurve().

|
inline |
Definition at line 3945 of file ramCanvasTpl.hpp.
References drawLine(), drawPLCurve(), real2intX(), and real2intY().

|
inline |
Definition at line 3937 of file ramCanvasTpl.hpp.
References dfltColor, and drawPLCurve().

|
inline |
Definition at line 3971 of file ramCanvasTpl.hpp.
References drawLine(), and drawPLCurve().

|
inline |
Definition at line 3989 of file ramCanvasTpl.hpp.
References dfltColor, and drawPLCurve().

|
inline |
Definition at line 3980 of file ramCanvasTpl.hpp.
References drawLine(), and drawPLCurve().

|
inline |
Definition at line 3997 of file ramCanvasTpl.hpp.
References dfltColor, and drawPLCurve().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph | ( | int | glyphNum, |
| intCrdT | x, | ||
| intCrdT | y, | ||
| double | magX, | ||
| double | magY, | ||
| colorArgType | aColor ) |
Render a glyph from the Hershey character set.
The glyph is rendered with its origin at the given coordinates. This function is intended to provide only the most basic glyph rendering. For example, glyphs are rendered with the line drawing functions, and therefore are not anti-aliased.
| glyphNum | The character number of the glyph to render |
| x | The x coordinate at which to render the glyph |
| y | The x coordinate at which to render the glyph |
| magX | The magnification of the glyph in the x direction |
| magY | The magnification of the glyph in the y direction |
| aColor | The color with which to render the glyph |
Definition at line 4352 of file ramCanvasTpl.hpp.
References mjr::hershey::chars, drawHersheyGlyph(), drawLine(), isIntAxOrientationNaturalX(), isIntAxOrientationNaturalY(), and moveTo().
Referenced by drawHersheyGlyph(), and drawString().


|
inline |
Definition at line 1292 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::drawHersheyGlyph().

|
inline |
Render a string using Hershey ASCII Fonts.
While the string is rendered with fixed font spacing, the Hershey fonts are not fixed width fonts.
| aString | The string |
| aFont | The font to set the default with |
| x | The x coordinate at which to render the first glyph |
| y | The x coordinate at which to render the first glyph |
| aColor | The color with which to render the glyphs |
| cex | A factor by which to expand the size of each glyph – 1 is a good value (the name comes from R). |
| spc | Space to jump for each charcter – 20 for SL fonts, 23 for DL fonts, and 25 for TL fonts. Scaled with cex. |
Definition at line 4388 of file ramCanvasTpl.hpp.
References mjr::hershey::ascii2hershey, drawHersheyGlyph(), and drawString().
Referenced by drawString(), and drawStringBox().


|
inline |
Definition at line 1310 of file ramCanvasTpl.hpp.
|
inline |
Renders a filled, bounding box for the given string as rendered via drawString.
| aString | A string to render |
| aFont | The font to set the default with |
| x | The x coordinate at which to render the first glyph |
| y | The x coordinate at which to render the first glyph |
| stringColor | The color with which to render the glyphs |
| boxColor | The color with which to render the BOX |
| cex | A factor by which to expand the size of each glyph – 1 is a good value (the name comes from R). |
| spc | Space to jump for each charcter – 20 for SL fonts, 23 for DL fonts, and 25 for TL fonts. Scaled with cex. |
Definition at line 4402 of file ramCanvasTpl.hpp.
References drawFillRectangle(), drawString(), and drawStringBox().
Referenced by drawStringBox().


|
inline |
Definition at line 1324 of file ramCanvasTpl.hpp.
|
inline |
Is libTIFF supported – that is: will the readTIFFfile() method do anything?
Note that readTIFFfile() is the only method that needs libTIFF. In particular, writeTIFFfile() works without libTIFF.
Definition at line 4722 of file ramCanvasTpl.hpp.
References supportLibTIFF().
Referenced by supportLibTIFF().


| int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::readTIFFfile | ( | std::string | fileName | ) |
If the libTIFF library was found at build time, this function will read a TIFF file into current ramCanvas object.
If libTIFF is not supported, then this function returns 32. You can test if this method works via the supportLibTIFF() method.
Notable features:
| fileName | The file name from which to read data from. |
| 0 | Image file loaded successfully |
| 1 | File open (TIFFOpen) failure |
| 2 | File missing TIFF tag: IMAGEWIDTH |
| 3 | File missing TIFF tag: IMAGELENGTH |
| 4 | File missing TIFF tag: SAMPLESPERPIXEL |
| 5 | File missing TIFF tag: PLANARCONFIG |
| 6 | File missing TIFF tag: PHOTOMETRIC |
| 7 | File missing TIFF tag: BITSPERSAMPLE |
| 8 | File of zero width |
| 9 | File of zero height |
| 10 | Allocation failed (temp image buffer) |
| 11 | Read (TIFFReadRGBAImage) failure |
| 12 | Canvas Allocation failed (insufficient width) |
| 14 | Canvas Allocation failed (insufficient height) |
| 15 | TIFF bps not 8, 16, 32, or 64 |
| 16 | Allocation failed (scan line buffer) |
| 17 | Read (TIFFReadScanline) failure |
| 18 | Sample Format is not unsigned integer or IEEE floating point |
| 19 | File and ramCanvas samples per pixel (channel count) differs |
| 20 | File and ramCanvas channel depth differ |
| 21 | File and ramCanvas channel format (int vs float) differ |
| 22 | Planar configuration is invalid (not 1 or 2) |
| 23 | Tiled images are not supported |
| 24 | PHOTOMETRIC_PALETTE not supported |
| 32 | TIFF read support not provided in this compile |
Definition at line 4583 of file ramCanvasTpl.hpp.
References getNumPixX(), getNumPixY(), getPxColorRefNC(), isIntAxOrientationNaturalX(), isIntAxOrientationNaturalY(), readTIFFfile(), and resizeCanvas().
Referenced by readTIFFfile().


|
inline |
Write a TIFF format image file.
Respects integer coordinate system orientation.
Why TIFF? TIFF is both broadly supported and flexible enough to represent almost every ramCanvas image type perfectly.
Use Cases (In order of priority)
Limitations
Limitations for bit perfect (toTRU is NULL) files:
| fileName | The file name to write data to |
| pxFilter | An pxFilter object instance |
| markAlpha | If an alpha channel is present, then mark it as such in the TIFF file. |
| 0 | Everything seems to have worked |
| 2 | Image channels are too shallow for TIFF format |
| 3 | Image channels are too deep for TIFF format |
| 4 | Image has too few channels for TIFF format |
| 5 | Image has too many channels for TIFF format |
| 6 | Image has too few columns for TIFF format |
| 7 | Image has too many columns for TIFF format |
| 8 | Image has too few rows for TIFF format |
| 9 | Image has too few rows for TIFF format |
| 10 | Image rows are too large (too much data) for TIFF format |
| 11 | Image is too large (too much data) for TIFF format |
Definition at line 3026 of file ramCanvasTpl.hpp.
References LITTLE, platformEndianness(), writeTIFFfile(), and writeUIntToStream().
Referenced by main(), writeTIFFfile(), and writeTIFFfile().


|
inline |
Simplified overload for writeTIFFfile() that only requires the filename.
Definition at line 3016 of file ramCanvasTpl.hpp.
References writeTIFFfile().

|
inline |
Write a 24-bit (8-bit per channel) RGB, TGA format graphics file.
Respects integer coordinate system orientation.
Why TGA? TGA files are not well supported by modern software. When supported, it is normally only 8-bit RGBA. With these limitations one might ask why this function exists. I am a POV-Ray fan, and it uses a specialized TGA format for height maps. That's really it... One could use this function to dump out regular RGB images, but I suggest writeTIFFfile() for that.
Note TGA files are 8-bit files, and *_byte functions are used to convert channel values to 8-bit before being written.
| fileName | The file name name to write data to |
| 0 | Everything seems to have worked |
| 1 | File open failure |
| 6 | Image of zero width |
| 7 | Image too wide for TGA format (> 2^16-1) |
| 8 | Image of zero height |
| 9 | Image too tall for TGA format (> 2^16-1) |
Definition at line 2913 of file ramCanvasTpl.hpp.
References getPxColorRefNC(), isIntAxOrientationNaturalX(), isIntAxOrientationNaturalY(), LITTLE, numPixX, numPixY, writeTGAfile(), and writeUIntToStream().
Referenced by writeTGAfile().


| int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::readRAWfile | ( | std::string | fileName | ) |
Read RAW file.
| 0 | Image file loaded successfully |
| 1 | File open failure |
| 2 | NOT USED |
| 3 | NOT USED |
| 4 | NOT USED |
| 5 | NOT USED |
| 6 | NOT USED |
| 7 | NOT USED |
| 8 | File of zero width |
| 9 | File of zero height |
| 10 | NOT USED |
| 11 | Read failure |
| 12 | Canvas Allocation failed (insufficient width) |
| 14 | Canvas Allocation failed (insufficient height) |
| 15 | bps not 8, 16, 32, or 64 |
| 16 | NOT USED |
| 17 | NOT USED |
| 18 | Sample Format is not unsigned integer or IEEE floating point |
| 19 | File and ramCanvas samples per pixel (channel count) differs |
| 20 | File and ramCanvas channel depth differ |
| 21 | File and ramCanvas channel format (int vs float) differ |
| 22 | NOT USED |
| 23 | File is signed integer or unsigned float |
| 24 | File is missing MJRRAW magic number |
| 25 | Image data read failure (file may have ended prematurely) |
| 26 | Malformed header |
| 27 | Image is too wide to be supported by ramCanvas |
| 28 | Image is too tall to be supported by ramCanvas |
| 29 | Error reading numbers in header |
| 32 | NOT USED |
| 33 | Image width missing from header |
| 34 | Image height missing from header |
| 35 | Image channel count missing from header |
| 36 | Image channel depth missing from header |
Definition at line 4419 of file ramCanvasTpl.hpp.
References BIG, getPxColorRefNC(), intCrdMax, isIntAxOrientationNaturalX(), isIntAxOrientationNaturalY(), LITTLE, numPixX, numPixY, platformEndianness(), readRAWfile(), and resizeCanvas().
Referenced by readRAWfile().


|
inline |
Write a MJRRAW file.
Respects integer coordinate system orientation.
Why? This simple file format is designed to house the more exotic images this library supports, and be easily consumed by many image processing and data visualization tools – usually via a feature referred to as a raw importer. ImageMagick, VisIT, ParaView, and ImageJ all can read this type of data. The header is exactly 100 bytes, ASCII, and contains two newlines. The idea being that one can do a 'head -n 2 FILENAME' on the image file, and get a human readable output of basic image info that also happens to be easy to parse. The first line of the header is the text "MJRRAW". The second line of the header consists of a sequence of values & value labels and followed by enough zero characters to pad to get to the 100 byte mark. That's 100 bytes for the two lines including the two newline characters. The values consist of uppercase letters and numbers, and each label is a single lower case letter. If a value is a number, then it is expressed as a decimal number in ASCII – possibly zero padded. While the code in ramCanvasTpl doesn't make assumptions about the order of the header values, some of the example scripts require them to be in the following order: x, y, c, b, s, t, & i. The header is followed by the binary image.
Labels:
Two headers that both specify a 256x128 image with 3 unsigned 8-bit integer channels encoded little endian:
MJRRAW
256x128y3c8bUNSsINTtLTLi00000000000000000000000000000000000000000000000000000000000000000000
MJRRAW
0000000000000000256x0000000000000000128y000000000000000000000000003c00000000008bSGNsINTtLTLi
| fileName | The file name name to write data to |
| pxFilter | An pxFilter object instance |
| 0 | The write was successful. |
| 1 | Could not open file. |
Definition at line 2976 of file ramCanvasTpl.hpp.
References LITTLE, platformEndianness(), and writeRAWfile().
Referenced by writeRAWfile(), and writeRAWfile().


|
inline |
Simplified overload for writeRAWfile() that only requires the filename.
Definition at line 2966 of file ramCanvasTpl.hpp.
References writeRAWfile().

|
inline |
Determine if the given point is within the bounds of the ramCanvasTpl.
| x | The x coordinate of the point to test |
| y | The y coordinate of the point to test |
Definition at line 1542 of file ramCanvasTpl.hpp.
Referenced by convolution(), cropCanvas(), drawFillTriangleUtl(), geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), geomTfrmRevRPoly(), getPxColorInterpAvg9(), and mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isCliped().

|
inline |
Definition at line 1543 of file ramCanvasTpl.hpp.
|
inline |
Determine if the given point is within the bounds of the ramCanvasTpl.
| x | The x coordinate of the point to test |
| y | The y coordinate of the point to test |
Definition at line 1549 of file ramCanvasTpl.hpp.
Referenced by getPxColor().

|
inline |
Definition at line 1550 of file ramCanvasTpl.hpp.
|
inline |
Convert real x coordinate to integral x coordinate.
| x | The real x coordinate value to be converted. |
Definition at line 3240 of file ramCanvasTpl.hpp.
References maxRealX, minRealX, NATURAL, pixWidX, real2intX(), and realAxOrientationX.
Referenced by drawPLCurve(), and real2intX().


|
inline |
Convert real y coordinate to integral y coordinate.
| y | The real y coordinate value to be converted. |
Definition at line 3251 of file ramCanvasTpl.hpp.
References maxRealY, minRealY, NATURAL, pixWidY, real2intY(), and realAxOrientationY.
Referenced by drawPLCurve(), and real2intY().


|
inline |
Convert integral x coordinate to real x coordinate.
| x | The integer x coordinate value to be converted. |
Definition at line 3262 of file ramCanvasTpl.hpp.
References int2realX(), maxRealX, minRealX, NATURAL, pixWidX, and realAxOrientationX.
Referenced by colorizeFltCanvas(), colorizeFltCanvas(), and int2realX().


|
inline |
Convert integral y coordinate to real y coordinate.
| y | The integer y coordinate value to be converted. |
Definition at line 3273 of file ramCanvasTpl.hpp.
References int2realY(), maxRealY, minRealY, NATURAL, pixWidY, and realAxOrientationY.
Referenced by colorizeFltCanvas(), colorizeFltCanvas(), and int2realY().


|
inline |
Convert real x & y coordinates to integer x & y coordinates.
| x | The integer x coordinate value to be converted. |
| y | The integer y coordinate value to be converted. |
Definition at line 1586 of file ramCanvasTpl.hpp.
|
inline |
Convert integer x & y coordinates to real x & y coordinates.
| x | The real x coordinate value to be converted. |
| y | The real y coordinate value to be converted. |
Definition at line 1591 of file ramCanvasTpl.hpp.
|
inline |
Given integer x coordinate, produce real x coordinate for one of the pixel's edge.
| x | The integer x coordinate value to be converted. |
| side | The integer x coordinate of the corner – should be 0 (lower) or 1 (upper). |
Definition at line 1603 of file ramCanvasTpl.hpp.
|
inline |
Given integer y coordinate, produce real y coordinate for one of the pixel's edge.
| y | The integer y coordinate value to be converted. |
| side | The integer y coordinate of the corner – should be 0 (lower) or 1 (upper). |
Definition at line 1608 of file ramCanvasTpl.hpp.
|
inline |
Given integer x & y coordinates, produce real x & y coordinates for one of the pixel's corners.
| x | The integer x coordinate value to be converted. |
| y | The integer y coordinate value to be converted. |
| sideX | The integer x coordinate of the corner – should be 0 (lower) or 1 (upper). |
| sideY | The integer y coordinate of the corner – should be 0 (lower) or 1 (upper). |
Definition at line 1615 of file ramCanvasTpl.hpp.
|
inline |
Given integer x & y coordinates and a corner index, produce real x & y coordinates for one of the pixel's corners.
| x | The integer x coordinate value to be converted. |
| y | The integer y coordinate value to be converted. |
| cornerIndex | Corner index. 0 => (0, 0); 1 => (0, 1); 2 => (1, 0); 3 => (1, 1); |
Definition at line 1621 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::int2realCorner().

|
inline |
Convert real distance on the x coordinate axis to an integral distance.
| x | The real delta x to be converted |
Definition at line 1631 of file ramCanvasTpl.hpp.
|
inline |
Convert real distance on the y coordinate axis to an integral distance.
| y | The real delta y to be converted |
Definition at line 1636 of file ramCanvasTpl.hpp.
|
inline |
Convert integral distance on the x coordinate to a real distance.
| x | The real x coordinate value to be converted. |
Definition at line 1641 of file ramCanvasTpl.hpp.
|
inline |
Convert integral distance on the y coordinate to a real distance.
| y | real y coordinate value to be converted. |
Definition at line 1646 of file ramCanvasTpl.hpp.
|
inline |
Get the real X axis orientation.
Definition at line 1655 of file ramCanvasTpl.hpp.
|
inline |
Set the real X axis orientation.
| orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1659 of file ramCanvasTpl.hpp.
|
inline |
Get the real Y axis orientation.
Definition at line 1663 of file ramCanvasTpl.hpp.
|
inline |
Set the real Y axis orientation.
| orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1667 of file ramCanvasTpl.hpp.
|
inline |
Set the real axis orientation to default (NATURAL for both X and Y axes)
Definition at line 1670 of file ramCanvasTpl.hpp.
Referenced by ramCanvasTpl(), and ramCanvasTpl().

|
inline |
Get the current drawing mode.
Definition at line 1679 of file ramCanvasTpl.hpp.
|
inline |
Set the current drawing mode NOOP if enableDrawModes is false.
| newDrawMode | The drawing mode |
Definition at line 1684 of file ramCanvasTpl.hpp.
|
inline |
Set the default draw mode.
Definition at line 1687 of file ramCanvasTpl.hpp.
Referenced by ramCanvasTpl(), and ramCanvasTpl().

|
inline |
Get the integer X axis orientation.
Definition at line 1696 of file ramCanvasTpl.hpp.
|
inline |
Is the integer X axis NATURAL?
Definition at line 1700 of file ramCanvasTpl.hpp.
Referenced by drawHersheyGlyph(), readRAWfile(), readTIFFfile(), and writeTGAfile().

|
inline |
Set the integer X axis orientation.
| orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1704 of file ramCanvasTpl.hpp.
|
inline |
Get the integer Y axis orientation.
Definition at line 1708 of file ramCanvasTpl.hpp.
Referenced by drawHersheyGlyph(), readRAWfile(), readTIFFfile(), and writeTGAfile().

|
inline |
Is the integer Y axis orientation NATURAL?
Definition at line 1712 of file ramCanvasTpl.hpp.
|
inline |
Set the integer Y axis orientation.
| orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1716 of file ramCanvasTpl.hpp.
|
inline |
Set the integer axis orientation to default (NATURAL for both X and Y axes)
Definition at line 1719 of file ramCanvasTpl.hpp.
Referenced by ramCanvasTpl(), and ramCanvasTpl().

|
inline |
Definition at line 1727 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasBottom(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasLeft(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasRight(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasTop(), combineRamCanvasBinOp(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::insertCanvas(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isNotSameSize(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isSameSize(), main(), and readTIFFfile().

|
inline |
Definition at line 1730 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasBottom(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasLeft(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasRight(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::adjoinCanvasTop(), combineRamCanvasBinOp(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::insertCanvas(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isNotSameSize(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isSameSize(), main(), and readTIFFfile().

|
inline |
Returns a pointer to the raw pixel store.
This generally violates the ramCanvasTpl object interface; however, this may be required for performance.
Definition at line 1735 of file ramCanvasTpl.hpp.
| colorT * mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clonePixels | ( | ) |
Return a clone (a copy) of the raw pixel store.
This function copies the internal pixel store and returns a pointer to this copy.
Definition at line 3284 of file ramCanvasTpl.hpp.
References clonePixels(), getPxColorNC(), numPixX, and numPixY.
Referenced by clonePixels().


|
inline |
x coord of min (real coord)
Definition at line 1747 of file ramCanvasTpl.hpp.
|
inline |
x coord of max (real coord)
Definition at line 1748 of file ramCanvasTpl.hpp.
|
inline |
y coord of min (real coord)
Definition at line 1749 of file ramCanvasTpl.hpp.
|
inline |
y coord of max (real coord)
Definition at line 1750 of file ramCanvasTpl.hpp.
|
inline |
Width of a pixel (real coord)
Definition at line 1751 of file ramCanvasTpl.hpp.
|
inline |
Height of a pixel (real coord)
Definition at line 1752 of file ramCanvasTpl.hpp.
|
inline |
Width of the display (real coord)
Definition at line 1753 of file ramCanvasTpl.hpp.
|
inline |
height of the display(real coord)
Definition at line 1754 of file ramCanvasTpl.hpp.
|
inline |
Width of the display (real coord)
Definition at line 1755 of file ramCanvasTpl.hpp.
|
inline |
Returns a copy of the color at the given coordinates.
Definition at line 3295 of file ramCanvasTpl.hpp.
References getPxColor(), isOnCanvas(), numPixX, and pixels.
Referenced by combineRamCanvasBinOp(), convolution(), cropCanvas(), expandCanvas(), flipHorz(), flipTranspose(), flipVert(), getPxColor(), getPxColorInterpAvg9(), getPxColorInterpNear(), getPxColorInterpTrunc(), rotate180(), rotate90CCW(), rotate90CW(), scaleDown1pt(), scaleDownMax(), scaleDownMean(), and scaleUpProximal().


|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1766 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColor().

|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1769 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColor().

|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1772 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColor().

|
inline |
Returns a copy of the color at the given coordinates wrapping x & y if out of range.
Definition at line 1775 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1778 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColorWrap().

|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1781 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColorWrap().

|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1784 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::getPxColorWrap().

|
inline |
Returns a copy of the color channel value at the given coordinates.
Definition at line 1794 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1799 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1804 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1809 of file ramCanvasTpl.hpp.
|
inline |
Returns a copy of the color channel value at the given coordinates wrapping x & y if out of range.
Definition at line 1814 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1819 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1824 of file ramCanvasTpl.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1829 of file ramCanvasTpl.hpp.
|
inline |
Returns the interpolated color value at the the given coordinates using the given interpolation method.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
| interpMethod | The interpolation method (default: interpolationType::BILINEAR) |
Definition at line 3306 of file ramCanvasTpl.hpp.
References AVERAGE4, AVERAGE9, BILINEAR, getPxColorInterpBLin(), getPxColorInterpolate(), NEAREST, and TRUNCATE.
Referenced by geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), geomTfrmRevRPoly(), and getPxColorInterpolate().


| colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpBLin | ( | double | x, |
| double | y ) |
Returns the bilinear interpolated color value at the the given coordinates.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
Definition at line 3321 of file ramCanvasTpl.hpp.
References getPxColorInterpBLin(), getPxColorRefNC(), numPixX, and numPixY.
Referenced by getPxColorInterpBLin(), and getPxColorInterpolate().


|
inline |
Returns the truncated interpolated color value at the the given coordinates.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
Definition at line 3360 of file ramCanvasTpl.hpp.
References getPxColor(), and getPxColorInterpTrunc().
Referenced by getPxColorInterpTrunc().


|
inline |
Returns the nearest neighbor interpolated color value at the the given coordinates.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
Definition at line 3368 of file ramCanvasTpl.hpp.
References getPxColor(), and getPxColorInterpNear().
Referenced by getPxColorInterpNear().


| colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpAvg4 | ( | double | x, |
| double | y ) |
Returns the average 4 interpolated color value at the the given coordinates.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
Definition at line 3400 of file ramCanvasTpl.hpp.
References getPxColorInterpAvg4(), numPixX, numPixY, and pixels.
Referenced by getPxColorInterpAvg4().


|
inline |
Returns the average 9 interpolated color value at the the given coordinates.
| x | The x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2) |
| y | The y coordinate |
Definition at line 3376 of file ramCanvasTpl.hpp.
References getPxColor(), getPxColorInterpAvg9(), and isCliped().
Referenced by getPxColorInterpAvg9().


|
inline |
The functions here work in a similar way to the non-NC functions, but with no clipping or bounds checking.
Thus, if an argument would cause something to be drawn beyond the bounds of the ramCanvasTpl, a core dump will most certainly result. The intent is to provide less overhead for very careful code that handles clipping and error checking by itself – a good line drawing algorithm for example. Draw a point with no clipping or bounds checking.
| x | The x coordinate of the point to be drawn |
| y | The y coordinate of the point to be drawn |
| color | The color to draw the point. |
Definition at line 4167 of file ramCanvasTpl.hpp.
References ADDCLAMP, AND, DIFFCLAMP, drawMode, drawPointNC(), getPxColorRefNC(), MULTCLAMP, OR, SET, and XOR.
Referenced by drawFillTriangleUtl(), drawLine(), drawPointNC(), flipHorz(), flipVert(), geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), and geomTfrmRevRPoly().


|
inline |
Get the default point to the specified coordinates with no clipping or bounds checking.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
Definition at line 1890 of file ramCanvasTpl.hpp.
Referenced by autoHistStrech(), autoMaxHistStrechRGB(), clonePixels(), and exportRasterData().

|
inline |
Returns a reference to the color object for the given pixel with no clipping or bounds checking.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
Definition at line 1896 of file ramCanvasTpl.hpp.
Referenced by applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyPixelRefFun(), clrCanvasChannelToMax(), clrCanvasChannelToMin(), clrCanvasToBlack(), clrCanvasToWhite(), combineRamCanvasBinOp(), drawPointNC(), getPxColorInterpBLin(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::insertCanvas(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isClose(), mjr::ramCanvasTpl< color8c8b, rcSimpleIntCrdT, rcSimpleFltCrdT, false >::isEqual(), ramCanvasTpl(), readRAWfile(), readTIFFfile(), and writeTGAfile().

|
inline |
Draw a horizontal line with no clipping or bounds checking.
| xMin | The MINIMUM x coordinate of the line to be drawn |
| xMax | The MAXIMUM x coordinate of the line to be drawn |
| yConst | The y coordinate at which the line is to be drawn |
| color | The color to draw the line |
Definition at line 1903 of file ramCanvasTpl.hpp.
Referenced by drawFillRectangle(), drawLine(), and drawRectangle().

|
inline |
Draw a vertical line with no clipping or bounds checking.
| yMin | The MINIMUM y coordinate of the line to be drawn |
| yMax | The MAXIMUM y coordinate of the line to be drawn |
| xConst | The x coordinate at which the line is to be drawn |
| color | The color to draw the line |
Definition at line 1910 of file ramCanvasTpl.hpp.
Referenced by drawLine(), and drawRectangle().

|
inline |
Draw a point without any special drawing options.
It simply sets the pixel to the given color. In addition, no clipping or bounds checking is performed. Thus, if an argument would cause something to be drawn beyond the bounds of the ramCanvasTpl, a segfault will most certainly result. The intent is to provide a less overhead for very careful code that handles clipping and error checking and drawing options by itself – an image filter algorithm for example. Note that enableDrawModes is ignored.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
| color | The color with which to draw the point |
Definition at line 1925 of file ramCanvasTpl.hpp.
Referenced by clrCanvas().

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas | ( | std::function< colorT(fltCrdT, fltCrdT)> | cFun | ) |
Definition at line 2857 of file ramCanvasTpl.hpp.
References colorizeFltCanvas(), drawPoint(), int2realX(), int2realY(), numPixX, and numPixY.
Referenced by colorizeFltCanvas(), and colorizeFltCanvas().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas | ( | std::function< colorT(pointFltType)> | cFun | ) |
Definition at line 2872 of file ramCanvasTpl.hpp.
References colorizeFltCanvas(), drawPoint(), int2realX(), int2realY(), numPixX, and numPixY.

| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas | ( | std::function< colorT(intCrdT, intCrdT)> | cFun | ) |
Definition at line 2886 of file ramCanvasTpl.hpp.
References colorizeIntCanvas(), drawPoint(), numPixX, and numPixY.
Referenced by colorizeIntCanvas(), and colorizeIntCanvas().


| void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas | ( | std::function< colorT(pointIntType)> | cFun | ) |
Definition at line 2899 of file ramCanvasTpl.hpp.
References colorizeIntCanvas(), drawPoint(), numPixX, and numPixY.

|
inline |
Definition at line 1949 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1965 of file ramCanvasTpl.hpp.
|
static |
maximum for numPixX, numPixY, & numPix.
Definition at line 239 of file ramCanvasTpl.hpp.
Referenced by newIntCoordsNC(), and readRAWfile().
|
staticprivate |
Large sentinel value (always off canvas)
Definition at line 258 of file ramCanvasTpl.hpp.
|
staticprivate |
Small sentinel value (always off canvas)
Definition at line 259 of file ramCanvasTpl.hpp.
|
private |
Number of x pixels.
Definition at line 265 of file ramCanvasTpl.hpp.
Referenced by applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyPixelRefFun(), autoHistStrech(), autoMaxHistStrechRGB(), clonePixels(), clrCanvas(), clrCanvasChannelToMax(), clrCanvasChannelToMin(), clrCanvasToBlack(), clrCanvasToWhite(), colorizeFltCanvas(), colorizeFltCanvas(), colorizeIntCanvas(), colorizeIntCanvas(), combineRamCanvasBinOp(), convolution(), drawFillRectangle(), drawLine(), drawRectangle(), expandCanvas(), exportRasterData(), flipHorz(), flipTranspose(), flipVert(), geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), geomTfrmRevRPoly(), getPxColor(), getPxColorInterpAvg4(), getPxColorInterpBLin(), newIntCoordsNC(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), readRAWfile(), reallocCanvas(), rotate180(), rotate90CCW(), rotate90CW(), scaleDown1pt(), scaleDownMax(), scaleDownMean(), scaleUpProximal(), updRealCoords(), and writeTGAfile().
|
private |
Number of y pixels.
Definition at line 266 of file ramCanvasTpl.hpp.
Referenced by applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyHomoPixTfrm(), applyPixelRefFun(), autoHistStrech(), autoMaxHistStrechRGB(), clonePixels(), clrCanvas(), clrCanvasChannelToMax(), clrCanvasChannelToMin(), clrCanvasToBlack(), clrCanvasToWhite(), colorizeFltCanvas(), colorizeFltCanvas(), colorizeIntCanvas(), colorizeIntCanvas(), combineRamCanvasBinOp(), convolution(), drawFillRectangle(), drawFillTriangleUtl(), drawLine(), drawRectangle(), expandCanvas(), exportRasterData(), flipHorz(), flipTranspose(), flipVert(), geomTfrmRevAff(), geomTfrmRevArb(), geomTfrmRevBiPoly(), geomTfrmRevRPoly(), getPxColorInterpAvg4(), getPxColorInterpBLin(), newIntCoordsNC(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), readRAWfile(), reallocCanvas(), rotate180(), rotate90CCW(), rotate90CW(), scaleDown1pt(), scaleDownMax(), scaleDownMean(), scaleUpProximal(), updRealCoords(), and writeTGAfile().
|
private |
|
private |
x coord of min (real coord)
Definition at line 273 of file ramCanvasTpl.hpp.
Referenced by int2realX(), newRealCoords(), operator=(), ramCanvasTpl(), ramCanvasTpl(), real2intX(), and updRealCoords().
|
private |
x coord of max (real coord)
Definition at line 274 of file ramCanvasTpl.hpp.
Referenced by int2realX(), newRealCoords(), operator=(), ramCanvasTpl(), ramCanvasTpl(), real2intX(), and updRealCoords().
|
private |
y coord of min (real coord)
Definition at line 275 of file ramCanvasTpl.hpp.
Referenced by int2realY(), newRealCoords(), operator=(), ramCanvasTpl(), ramCanvasTpl(), real2intY(), and updRealCoords().
|
private |
y coord of max (real coord)
Definition at line 276 of file ramCanvasTpl.hpp.
Referenced by int2realY(), newRealCoords(), operator=(), ramCanvasTpl(), ramCanvasTpl(), real2intY(), and updRealCoords().
|
private |
Width of a pixel (real coord)
Definition at line 282 of file ramCanvasTpl.hpp.
Referenced by int2realX(), real2intX(), and updRealCoords().
|
private |
Height of a pixel (real coord)
Definition at line 283 of file ramCanvasTpl.hpp.
Referenced by int2realY(), real2intY(), and updRealCoords().
|
private |
Width of the canvas (real coord)
Definition at line 285 of file ramCanvasTpl.hpp.
Referenced by updRealCoords().
|
private |
height of the canvas (real coord)
Definition at line 286 of file ramCanvasTpl.hpp.
Referenced by updRealCoords().
|
private |
Orientation of x axis.
Definition at line 292 of file ramCanvasTpl.hpp.
Referenced by int2realX(), operator=(), ramCanvasTpl(), ramCanvasTpl(), and real2intX().
|
private |
Orientation of y axis.
Definition at line 293 of file ramCanvasTpl.hpp.
Referenced by int2realY(), operator=(), ramCanvasTpl(), ramCanvasTpl(), and real2intY().
|
private |
Flip horizontally.
Definition at line 294 of file ramCanvasTpl.hpp.
Referenced by operator=(), ramCanvasTpl(), and ramCanvasTpl().
|
private |
Flip vertically.
Definition at line 295 of file ramCanvasTpl.hpp.
Referenced by operator=(), ramCanvasTpl(), and ramCanvasTpl().
|
private |
Array to hold the color values.
Definition at line 301 of file ramCanvasTpl.hpp.
Referenced by freeCanvas(), getPxColor(), getPxColorInterpAvg4(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), rePointPixels(), and ~ramCanvasTpl().
|
private |
Point one beyond end of pixels array.
Definition at line 302 of file ramCanvasTpl.hpp.
Referenced by freeCanvas(), operator=(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), ramCanvasTpl(), and rePointPixels().
|
private |
Default color.
Definition at line 308 of file ramCanvasTpl.hpp.
Referenced by clrCanvas(), drawPLCurve(), drawPLCurve(), drawPLCurve(), and drawPLCurve().
|
private |
Drawing mode.
Definition at line 309 of file ramCanvasTpl.hpp.
Referenced by drawPointNC(), operator=(), ramCanvasTpl(), and ramCanvasTpl().
|
private |
x coordinate used by default.
Definition at line 310 of file ramCanvasTpl.hpp.
|
private |
y coordinate used by default.
Definition at line 311 of file ramCanvasTpl.hpp.