MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
MRcolorTpl.hpp File Reference

Header for the ramColor class. More...

#include "MRMathCPP.hpp"
#include <algorithm>
#include <array>
#include <bit>
#include <climits>
#include <cmath>
#include <complex>
#include <concepts>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <span>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for MRcolorTpl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >
 Template Class used to house colors for ramCanvas objects. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csPLY_tpl< coefs >
 Compute a color from a polynomial space curve in the RGB color space. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csCubeHelix_tpl< start, rots, hue, gamma >
 Compute a color from Dave Green's cubehelix scheme. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csHSLh_tpl< corner >
 Template for HSL color schemes. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csCC_tpl< corners >
 Template providing RGB color cube gradiant color schemes. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csBin_tpl< a, b >
 Binary color scheme. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csFP_tpl< colors >
 Template for fixed size pallets. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csCB_tpl< mx, colors >
 Template for Color Brewer 2 variable sized pallets. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csVarToFixed_tpl< varColorScheme, numClr >
 Wrapper for Color Brewer 2 variable sized pallet template to produce a simple fixed color scheme with a numC member. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::csWS_tpl< colors >
 Template for web safe 216 pallets. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::cs2dThaller_tpl< useHSL, maxV, cutDepth, argCuts, absCuts, logAbs >
 Template for Thaller 2D color schemes. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::cs2dRichardson< cutDepth, argCuts, absCuts, logAbs >
 Compute a color from Richardson's 2D complex number coloring scheme. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::cs2dIdxPalArg< colorScheme, argWrap, cutDepth, argCuts, absCuts, logAbs >
 Compute a color for a point in \(\mathbb{R}^2\) using a discrete color scheme for the phase angle. More...
 
class  mjr::colorTpl< clrChanT, numChan, redChanIdx, greenChanIdx, blueChanIdx, alphaChanIdx >::cs2dFltPalArg< colorScheme, argWrap, cutDepth, argCuts, absCuts, logAbs >
 Compute a color for a point in \(\mathbb{R}^2\) using a continuous color scheme for the phase angle. More...
 

Namespaces

namespace  mjr
 

Macros

#define MJR_LOOK_FOR_128_BIT_TYPES   MRASTER_OPT_128_INT
 Set to 1 to look for 128-bit integer types, and 0 to not look for them.
 
#define MJR_INCLUDE_MRcolorTpl
 

Typedefs

typedef uint64_t mjr_uintBiggest_t
 The largest unsigned integer supported on the platform.
 
typedef int64_t mjr_intBiggest_t
 The largest signed integer supported on the platform.
 

Functions

template<class clrChanT , int numChan, int redChanIdx = -1, int blueChanIdx = -1, int greenChanIdx = -1, int alphaChanIdx = -1>
requires ((numChan>0) && // Must have at least 1 chan (std::is_unsigned<clrChanT>::value || std::is_floating_point<clrChanT>::value) && // unsigned integral or floating point (std::is_floating_point<clrChanT>::value || (sizeof(clrChanT) >= 1)) && // If clrChanT int, then must be >= 1 char size (redChanIdx < numChan) && (blueChanIdx < numChan) && (greenChanIdx < numChan) && (alphaChanIdx < numChan) && (((blueChanIdx < 0) && (redChanIdx < 0) && (greenChanIdx < 0)) || ((blueChanIdx >= 0) && (redChanIdx >= 0) && (greenChanIdx >= 0))) && // R, G, & B all non-negative or all negative ((alphaChanIdx < 0) || (redChanIdx >= 0)) && // If A is non-negative, then all non-negative ((redChanIdx < 0) || ((redChanIdx != greenChanIdx) && (redChanIdx != blueChanIdx) && (redChanIdx != alphaChanIdx) && (greenChanIdx != blueChanIdx) && (greenChanIdx != alphaChanIdx) && (blueChanIdx != alphaChanIdx))))
std::ostream & mjr::operator<< (std::ostream &out, colorTpl< clrChanT, numChan > const &color)
 i/O stream output operator for colorTpl types.
 
template<class clrChanT , int numChan, int redChanIdx = -1, int blueChanIdx = -1, int greenChanIdx = -1, int alphaChanIdx = -1>
requires ((numChan>0) && // Must have at least 1 chan (std::is_unsigned<clrChanT>::value || std::is_floating_point<clrChanT>::value) && // unsigned integral or floating point (std::is_floating_point<clrChanT>::value || (sizeof(clrChanT) >= 1)) && // If clrChanT int, then must be >= 1 char size (redChanIdx < numChan) && (blueChanIdx < numChan) && (greenChanIdx < numChan) && (alphaChanIdx < numChan) && (((blueChanIdx < 0) && (redChanIdx < 0) && (greenChanIdx < 0)) || ((blueChanIdx >= 0) && (redChanIdx >= 0) && (greenChanIdx >= 0))) && // R, G, & B all non-negative or all negative ((alphaChanIdx < 0) || (redChanIdx >= 0)) && // If A is non-negative, then all non-negative ((redChanIdx < 0) || ((redChanIdx != greenChanIdx) && (redChanIdx != blueChanIdx) && (redChanIdx != alphaChanIdx) && (greenChanIdx != blueChanIdx) && (greenChanIdx != alphaChanIdx) && (blueChanIdx != alphaChanIdx))))
bool mjr::operator!= (colorTpl< clrChanT, numChan > const &color1, colorTpl< clrChanT, numChan > const &color2)
 Inequality operator for colorTpl types.
 

Detailed Description

Header for the ramColor class.

Author
Mitch Richling https://www.mitchr.me

Definition in file MRcolorTpl.hpp.

Macro Definition Documentation

◆ MJR_LOOK_FOR_128_BIT_TYPES

#define MJR_LOOK_FOR_128_BIT_TYPES   MRASTER_OPT_128_INT

Set to 1 to look for 128-bit integer types, and 0 to not look for them.

Right now this only works on GCC & Clang!

Definition at line 60 of file MRcolorTpl.hpp.

◆ MJR_INCLUDE_MRcolorTpl

#define MJR_INCLUDE_MRcolorTpl

Definition at line 5190 of file MRcolorTpl.hpp.

Typedef Documentation

◆ mjr_uintBiggest_t

typedef uint64_t mjr_uintBiggest_t

The largest unsigned integer supported on the platform.

Definition at line 81 of file MRcolorTpl.hpp.

◆ mjr_intBiggest_t

typedef int64_t mjr_intBiggest_t

The largest signed integer supported on the platform.

Definition at line 82 of file MRcolorTpl.hpp.