MRaster lib 21.0.0.0
Image Processing Library
|
Class providing off-screen drawing functionality. More...
#include <ramCanvasTpl.hpp>
Classes | |
class | rcConverterColorScheme |
Colorize a ramCanvasTpl with integer channels using a color scheme. More... | |
class | rcConverterHomoBase |
This class is an incomplete rcConverter (no getPxColorNC method) that provides a nice base for homogenious rcConverters. More... | |
class | rcConverterIdentity |
class | rcConverterMonoIntensity |
Convert a ramCanvasTpl to a greyscale image using colorT::intensity(). More... | |
class | rcConverterRGBAbyte |
class | rcConverterRGBAdbl |
class | rcConverterRGBbyte |
class | rcConverterRGBdbl |
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::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. | |
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) |
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) |
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? Note that readTIFFfile() is the only method that needs libTIFF. | |
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 rcConverter, bool markAlpha) |
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 rcConverter) |
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. | |
| |
pointFltType | int2corner (intCrdT x, intCrdT y, int cornerX, int cornerY) |
Given integer x & y coordinates, produce real x & y coordinates for one of the pixel's corners. | |
pointFltType | int2corner (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 |
colorT | getPxColor (pointIntType thePoint) const |
colorT | getPxColor (pointFltType thePoint) const |
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 othe than drawModeType::SET. |
Definition at line 141 of file ramCanvasTpl.hpp.
typedef point2d<fltCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointFltType |
Real coordinate pair type.
Definition at line 229 of file ramCanvasTpl.hpp.
typedef point2d<intCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointIntType |
Integer coordinate pair type.
Definition at line 230 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 231 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 232 of file ramCanvasTpl.hpp.
typedef intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordIntType |
Integer type for coordinates.
Definition at line 233 of file ramCanvasTpl.hpp.
typedef fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordFltType |
Real type for coordinates.
Definition at line 234 of file ramCanvasTpl.hpp.
typedef colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorType |
Color type for pixels.
Definition at line 235 of file ramCanvasTpl.hpp.
typedef colorT::channelType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanType |
colorT: Channel type
Definition at line 241 of file ramCanvasTpl.hpp.
typedef colorT::maskType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorMaskType |
colorT: Mask type
Definition at line 242 of file ramCanvasTpl.hpp.
typedef colorT::channelArithDType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithDType |
colorT: Channel arithmatic (Int: -)
Definition at line 243 of file ramCanvasTpl.hpp.
typedef colorT::channelArithSPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSPType |
colorT: Channel arithmatic (Int: +*)
Definition at line 244 of file ramCanvasTpl.hpp.
typedef colorT::channelArithSDPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSDPType |
colorT: Channel arithmatic (Int: +-*)
Definition at line 245 of file ramCanvasTpl.hpp.
typedef colorT::channelArithFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithFltType |
colorT: Channel arithmatic (Flt: +-*)
Definition at line 246 of file ramCanvasTpl.hpp.
typedef colorT::channelArithLogType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithLogType |
colorT: Channel arithmatic (Int: ^|&~)
Definition at line 247 of file ramCanvasTpl.hpp.
typedef colorT::colorSpaceEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorSpaceEnum |
colorT: Color spaces
Definition at line 248 of file ramCanvasTpl.hpp.
typedef colorT::cornerColorEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCornerEnum |
colorT: RGB Color Corners
Definition at line 249 of file ramCanvasTpl.hpp.
typedef colorT::colorArgType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorArgType |
colorT: Argument passing type
Definition at line 250 of file ramCanvasTpl.hpp.
typedef colorT::colorPtrType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorPtrType |
colorT: Pointer to color
Definition at line 251 of file ramCanvasTpl.hpp.
typedef colorT::colorRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorRefType |
colorT: Ref to a color
Definition at line 252 of file ramCanvasTpl.hpp.
typedef colorT::colorCRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCRefType |
colorT: Const Ref to a color
Definition at line 253 of file ramCanvasTpl.hpp.
typedef colorT::csIntType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csIntType |
colorT: Color Scheme Integer Type
Definition at line 254 of file ramCanvasTpl.hpp.
typedef colorT::csFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csFltType |
colorT: Color Scheme Float Type
Definition at line 255 of file ramCanvasTpl.hpp.
typedef colorT::csNatType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csNatType |
colorT: Color Scheme Natural Type
Definition at line 256 of file ramCanvasTpl.hpp.
typedef colorT::cmfInterpolationEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cmfInterpolationEnum |
colorT: Interpolation for color match functions
Definition at line 257 of file ramCanvasTpl.hpp.
typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelIterator |
pixel store iterators
Definition at line 263 of file ramCanvasTpl.hpp.
typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::iterator |
pixel store iterators
Definition at line 264 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 271 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 279 of file ramCanvasTpl.hpp.
|
strong |
Enum for drawing Mode.
Definition at line 284 of file ramCanvasTpl.hpp.
|
strong |
Enum for drawing Mode.
Definition at line 294 of file ramCanvasTpl.hpp.
|
strongprivate |
Endianness Identifiers.
Enumerator | |
---|---|
BIG | PowerPC. |
LITTLE | Intel. |
AUTO | Whatever the platform uses. |
Definition at line 315 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 1907 of file ramCanvasTpl.hpp.
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & | theCanvas | ) |
Copy constructor.
Definition at line 1921 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawMode, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationX, and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 1976 of file ramCanvasTpl.hpp.
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl | ( | ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > && | theCanvas | ) |
Move constructor.
Definition at line 1940 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawMode, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixels, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelsE, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationX, and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationY.
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::~ramCanvasTpl | ( | ) |
Destructor deallocates memory for the canvas.
Definition at line 1990 of file ramCanvasTpl.hpp.
|
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 3695 of file ramCanvasTpl.hpp.
|
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 2748 of file ramCanvasTpl.hpp.
|
inlineprivate |
Determine the platform's endianness.
Definition at line 2735 of file ramCanvasTpl.hpp.
|
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 2035 of file ramCanvasTpl.hpp.
|
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 2001 of file ramCanvasTpl.hpp.
|
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 2577 of file ramCanvasTpl.hpp.
|
private |
Free the pixel memory (i)
Definition at line 2548 of file ramCanvasTpl.hpp.
|
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 2561 of file ramCanvasTpl.hpp.
|
inlineprivate |
Used to find the left and right edges of a triangle.
Definition at line 3543 of file ramCanvasTpl.hpp.
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 3119 of file ramCanvasTpl.hpp.
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator= | ( | ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > && | theCanvas | ) |
Move assignment operator.
Definition at line 1957 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawMode, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixX, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixY, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixels, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelsE, mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationX, and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationY.
|
inline |
Adjoin the canvas to the side of the current canvas.
theCanvas | The canvas to adjoin. |
Definition at line 542 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
inline |
Adjoin the canvas to the side of the current canvas.
theCanvas | The canvas to adjoin. |
Definition at line 553 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
inline |
Adjoin the canvas to the side of the current canvas.
theCanvas | The canvas to adjoin. |
Definition at line 564 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
inline |
Adjoin the canvas to the side of the current canvas.
theCanvas | The canvas to adjoin. |
Definition at line 575 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
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 588 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().
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 2594 of file ramCanvasTpl.hpp.
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 2602 of file ramCanvasTpl.hpp.
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 2629 of file ramCanvasTpl.hpp.
|
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 2017 of file ramCanvasTpl.hpp.
|
inline |
Return true if given canvas and current canvas are the same size.
Definition at line 640 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
inline |
Return true if given canvas and current canvas are NOT the same size.
Definition at line 648 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().
|
inline |
Return true if corresponding pixels in each canvas are "close" as defined by colorTpl::isClose().
Definition at line 656 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().
|
inline |
Return true if corresponding pixels in each canvas are "equal" as defined by colorTpl::isEqual().
Definition at line 667 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().
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 2693 of file ramCanvasTpl.hpp.
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 2707 of file ramCanvasTpl.hpp.
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 2721 of file ramCanvasTpl.hpp.
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 2653 of file ramCanvasTpl.hpp.
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 2666 of file ramCanvasTpl.hpp.
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 2679 of file ramCanvasTpl.hpp.
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 4109 of file ramCanvasTpl.hpp.
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 4135 of file ramCanvasTpl.hpp.
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 4174 of file ramCanvasTpl.hpp.
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 4150 of file ramCanvasTpl.hpp.
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 4707 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().
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 4740 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().
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 4680 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().
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 4652 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
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 4220 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 4256 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 4263 of file ramCanvasTpl.hpp.
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 4195 of file ramCanvasTpl.hpp.
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 4210 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 861 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 862 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 2174 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2264 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2274 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2284 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2294 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2305 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2315 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2224 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2234 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2244 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2254 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2184 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2194 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2204 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 2214 of file ramCanvasTpl.hpp.
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 2122 of file ramCanvasTpl.hpp.
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 2147 of file ramCanvasTpl.hpp.
|
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 2325 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().
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 2066 of file ramCanvasTpl.hpp.
|
inline |
Clear the canvas to black.
Faster than clrCanvas().
Definition at line 2094 of file ramCanvasTpl.hpp.
|
inline |
Set the given channel to the minimum value.
Definition at line 2046 of file ramCanvasTpl.hpp.
|
inline |
Set the given channel to the maximum value.
Definition at line 2056 of file ramCanvasTpl.hpp.
|
inline |
|
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 2112 of file ramCanvasTpl.hpp.
|
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 967 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 968 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().
|
inline |
Definition at line 969 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().
|
inline |
Definition at line 970 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().
|
inline |
Set the default color.
Definition at line 978 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 979 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 980 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 981 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 993 of file ramCanvasTpl.hpp.
Referenced by main().
|
inline |
Definition at line 997 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 998 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 999 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1000 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1001 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1002 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1003 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1004 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
|
inline |
Definition at line 1005 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().
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 2365 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1040 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1041 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1042 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1043 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1044 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1045 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1046 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1047 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1048 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1049 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1050 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1051 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1052 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1053 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
|
inline |
Definition at line 1054 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 3927 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1071 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1072 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1075 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1078 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1079 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1080 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1083 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1086 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1087 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1088 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
|
inline |
Definition at line 1089 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 3676 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1107 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1108 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1111 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1114 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1117 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1118 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1121 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1124 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1125 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1126 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
|
inline |
Definition at line 1127 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 3684 of file ramCanvasTpl.hpp.
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 4034 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1163 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1164 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1165 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1166 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1167 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1168 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1169 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1170 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1171 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1172 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
|
inline |
Definition at line 1173 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 4065 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1189 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1190 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1191 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1192 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1193 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1194 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1195 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1196 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1197 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1198 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
|
inline |
Definition at line 1199 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 3937 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1220 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1221 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1222 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1223 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1224 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1225 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1226 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1227 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
|
inline |
Definition at line 1228 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 3981 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1247 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1248 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1249 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1250 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1251 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1252 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1253 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1254 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Definition at line 1255 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().
|
inline |
Draw Piece-Wise Linear Curves.
Definition at line 3884 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3876 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3867 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3859 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3893 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3911 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3902 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 3919 of file ramCanvasTpl.hpp.
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 4271 of file ramCanvasTpl.hpp.
References mjr::hershey::chars.
|
inline |
Definition at line 1289 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 4307 of file ramCanvasTpl.hpp.
References mjr::hershey::ascii2hershey.
|
inline |
Definition at line 1307 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 4321 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1321 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 4640 of file ramCanvasTpl.hpp.
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) |
32 | TIFF read support not provided in this compile |
Definition at line 4505 of file ramCanvasTpl.hpp.
|
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 |
rcConverter | An rcConverter 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 2948 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX().
Referenced by main().
|
inline |
Simplified overload for writeTIFFfile() that only requires the filename.
Definition at line 2938 of file ramCanvasTpl.hpp.
|
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 2835 of file ramCanvasTpl.hpp.
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 4338 of file ramCanvasTpl.hpp.
|
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 using – it may be 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 |
rcConverter | An rcConverter object instance |
0 | The write was successful. |
1 | Could not open file. |
Definition at line 2898 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX().
|
inline |
Simplified overload for writeRAWfile() that only requires the filename.
Definition at line 2888 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 1537 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped().
|
inline |
Definition at line 1538 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 1544 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1545 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 3162 of file ramCanvasTpl.hpp.
|
inline |
Convert real y coordinate to integral y coordinate.
y | The real y coordinate value to be converted. |
Definition at line 3173 of file ramCanvasTpl.hpp.
|
inline |
Convert integral x coordinate to real x coordinate.
x | The integer x coordinate value to be converted. |
Definition at line 3184 of file ramCanvasTpl.hpp.
|
inline |
Convert integral y coordinate to real y coordinate.
y | The integer y coordinate value to be converted. |
Definition at line 3195 of file ramCanvasTpl.hpp.
|
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 1581 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 1586 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. |
cornerX | The integer x coordinate of the corner – should be 0 or 1. |
cornerY | The integer y coordinate of the corner – should be 0 or 1. |
Definition at line 1606 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 1615 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner().
|
inline |
Convert real distance on the x coordinate axis to an integral distance.
x | The real delta x to be converted |
Definition at line 1625 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 1630 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 1635 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 1640 of file ramCanvasTpl.hpp.
|
inline |
Get the real X axis orientation.
Definition at line 1649 of file ramCanvasTpl.hpp.
|
inline |
Set the real X axis orientation.
orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1653 of file ramCanvasTpl.hpp.
|
inline |
Get the real Y axis orientation.
Definition at line 1657 of file ramCanvasTpl.hpp.
|
inline |
Set the real Y axis orientation.
orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1661 of file ramCanvasTpl.hpp.
|
inline |
Set the real axis orientation to default (NATURAL for both X and Y axes)
Definition at line 1664 of file ramCanvasTpl.hpp.
|
inline |
Get the current drawing mode.
Definition at line 1673 of file ramCanvasTpl.hpp.
|
inline |
Set the current drawing mode NOOP if enableDrawModes is false.
newDrawMode | The drawing mode |
Definition at line 1678 of file ramCanvasTpl.hpp.
|
inline |
Set the default draw mode.
Definition at line 1681 of file ramCanvasTpl.hpp.
|
inline |
Get the integer X axis orientation.
Definition at line 1690 of file ramCanvasTpl.hpp.
|
inline |
Is the integer X axis NATURAL?
Definition at line 1694 of file ramCanvasTpl.hpp.
|
inline |
Set the integer X axis orientation.
orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1698 of file ramCanvasTpl.hpp.
|
inline |
Get the integer Y axis orientation.
Definition at line 1702 of file ramCanvasTpl.hpp.
|
inline |
Is the integer Y axis orientation NATURAL?
Definition at line 1706 of file ramCanvasTpl.hpp.
|
inline |
Set the integer Y axis orientation.
orientation | The orientation (INVERTED or NATURAL) |
Definition at line 1710 of file ramCanvasTpl.hpp.
|
inline |
Set the integer axis orientation to default (NATURAL for both X and Y axes)
Definition at line 1713 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1721 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasBottom(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasLeft(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasRight(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasTop(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasBinOp(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::insertCanvas(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isNotSameSize(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isSameSize(), main(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeRAWfile(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeTIFFfile().
|
inline |
Definition at line 1724 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasBottom(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasLeft(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasRight(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasTop(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasBinOp(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::insertCanvas(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isNotSameSize(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isSameSize(), and main().
|
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 1729 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 3206 of file ramCanvasTpl.hpp.
|
inline |
x coord of min (real coord)
Definition at line 1741 of file ramCanvasTpl.hpp.
|
inline |
x coord of max (real coord)
Definition at line 1742 of file ramCanvasTpl.hpp.
|
inline |
y coord of min (real coord)
Definition at line 1743 of file ramCanvasTpl.hpp.
|
inline |
y coord of max (real coord)
Definition at line 1744 of file ramCanvasTpl.hpp.
|
inline |
Width of a pixel (real coord)
Definition at line 1745 of file ramCanvasTpl.hpp.
|
inline |
Height of a pixel (real coord)
Definition at line 1746 of file ramCanvasTpl.hpp.
|
inline |
Width of the display (real coord)
Definition at line 1747 of file ramCanvasTpl.hpp.
|
inline |
height of the display(real coord)
Definition at line 1748 of file ramCanvasTpl.hpp.
|
inline |
Width of the display (real coord)
Definition at line 1749 of file ramCanvasTpl.hpp.
|
inline |
Returns a copy of the color at the given coordinates.
Definition at line 3217 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasBinOp().
|
inline |
Definition at line 1758 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().
|
inline |
Definition at line 1759 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().
|
inline |
Definition at line 1760 of file ramCanvasTpl.hpp.
References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().
|
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 3228 of file ramCanvasTpl.hpp.
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 3243 of file ramCanvasTpl.hpp.
|
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 3282 of file ramCanvasTpl.hpp.
|
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 3290 of file ramCanvasTpl.hpp.
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 3322 of file ramCanvasTpl.hpp.
|
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 3298 of file ramCanvasTpl.hpp.
|
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 4089 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevAff(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevArb(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevBiPoly(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::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 1821 of file ramCanvasTpl.hpp.
|
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 1827 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::insertCanvas(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isClose(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isEqual(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
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 1834 of file ramCanvasTpl.hpp.
|
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 1841 of file ramCanvasTpl.hpp.
|
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 1856 of file ramCanvasTpl.hpp.
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas | ( | std::function< colorT(fltCrdT, fltCrdT)> | cFun | ) |
Definition at line 2779 of file ramCanvasTpl.hpp.
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas | ( | std::function< colorT(pointFltType)> | cFun | ) |
Definition at line 2794 of file ramCanvasTpl.hpp.
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas | ( | std::function< colorT(intCrdT, intCrdT)> | cFun | ) |
Definition at line 2808 of file ramCanvasTpl.hpp.
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas | ( | std::function< colorT(pointIntType)> | cFun | ) |
Definition at line 2821 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1881 of file ramCanvasTpl.hpp.
|
inline |
Definition at line 1897 of file ramCanvasTpl.hpp.
|
static |
maximum for numPixX, numPixY, & numPix.
Definition at line 306 of file ramCanvasTpl.hpp.
|
staticprivate |
Large sentinel value (always off canvas)
Definition at line 325 of file ramCanvasTpl.hpp.
|
staticprivate |
Small sentinel value (always off canvas)
Definition at line 326 of file ramCanvasTpl.hpp.
|
private |
Number of x pixels.
Definition at line 332 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Number of y pixels.
Definition at line 333 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Number of pixels.
Definition at line 334 of file ramCanvasTpl.hpp.
|
private |
x coord of min (real coord)
Definition at line 340 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
x coord of max (real coord)
Definition at line 341 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
y coord of min (real coord)
Definition at line 342 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
y coord of max (real coord)
Definition at line 343 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Width of a pixel (real coord)
Definition at line 349 of file ramCanvasTpl.hpp.
|
private |
Height of a pixel (real coord)
Definition at line 350 of file ramCanvasTpl.hpp.
|
private |
Width of the canvas (real coord)
Definition at line 352 of file ramCanvasTpl.hpp.
|
private |
height of the canvas (real coord)
Definition at line 353 of file ramCanvasTpl.hpp.
|
private |
Orientation of x axis.
Definition at line 359 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Orientation of y axis.
Definition at line 360 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Flip horizontally.
Definition at line 361 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Flip vertically.
Definition at line 362 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Array to hold the color values.
Definition at line 368 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Point one beyond end of pixels array.
Definition at line 369 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
Default color.
Definition at line 375 of file ramCanvasTpl.hpp.
|
private |
Drawing mode.
Definition at line 376 of file ramCanvasTpl.hpp.
Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::operator=(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().
|
private |
x coordinate used by default.
Definition at line 377 of file ramCanvasTpl.hpp.
|
private |
y coordinate used by default.
Definition at line 378 of file ramCanvasTpl.hpp.