52 #ifndef __PCL_PixelTraits_h
53 #define __PCL_PixelTraits_h
58 #include <pcl/Diagnostics.h>
79 const double* p1DLUT8;
80 const double* pDLUT16;
81 const double* pDLUT20;
95 extern PCL_DATA
const PixelTraitsLUT* PTLUT;
97 #ifndef __PCL_DONT_USE_PIXTRAITS_LUT
98 # define pFLUT8 PTLUT->pFLUT8
99 # define pFLUTA PTLUT->pFLUTA
100 # define p1FLUT8 PTLUT->p1FLUT8
101 # define pFLUT16 PTLUT->pFLUT16
102 # define pFLUT20 PTLUT->pFLUT20
103 # define pDLUT8 PTLUT->pDLUT8
104 # define pDLUTA PTLUT->pDLUTA
105 # define p1DLUT8 PTLUT->p1DLUT8
106 # define pDLUT16 PTLUT->pDLUT16
107 # define pDLUT20 PTLUT->pDLUT20
108 # define p8LUT16 PTLUT->p8LUT16
109 # define p8LUT20 PTLUT->p8LUT20
110 # define p16LUT8 PTLUT->p16LUT8
111 # define p16LUT20 PTLUT->p16LUT20
112 # define p20LUT8 PTLUT->p20LUT8
113 # define p20LUT16 PTLUT->p20LUT16
114 # define p24LUT8 PTLUT->p24LUT8
115 # define p24LUT16 PTLUT->p24LUT16
116 # define p32LUT8 PTLUT->p32LUT8
117 # define p32LUT16 PTLUT->p32LUT16
118 # define p32LUT20 PTLUT->p32LUT20
121 #define EPSILON_D 1.0e-16
122 #define EPSILON_F 1.0e-8F
185 enum { bytesPerSample =
sizeof(
sample ) };
186 enum { bitsPerSample = bytesPerSample << 3 };
193 return bytesPerSample;
201 return bitsPerSample;
214 #define IMPLEMENT_TRANSFER_OPERATIONS \
216 template <typename T> \
217 static void Fill( sample* __restrict__ f, T x, size_type n ) noexcept \
219 PCL_PRECONDITION( f != nullptr ) \
220 sample v = ToSample( x ); \
222 for ( ; n > 0; --n, ++f ) \
226 static void Fill( sample* __restrict__ f, sample x, size_type n ) noexcept \
228 PCL_PRECONDITION( f != nullptr ) \
230 for ( ; n > 0; --n, ++f ) \
234 template <typename T> \
235 static void Get( T* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
237 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
239 for ( ; n > 0; --n, ++f, ++g ) \
240 FromSample( *f, *g ); \
243 static void Get( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) \
245 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
247 for ( ; n > 0; --n, ++f, ++g ) \
251 template <typename T> \
252 static void Copy( sample* __restrict__ f, const T* __restrict__ g, size_type n ) noexcept \
254 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
256 for ( ; n > 0; --n, ++f, ++g ) \
257 *f = ToSample( *g ); \
260 static void Copy( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) \
262 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
264 for ( ; n > 0; --n, ++f, ++g ) \
268 template <typename T> \
269 static void GetMin( T* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
271 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
273 for ( ; n > 0; --n, ++f, ++g ) \
275 T h; FromSample( h, *g ); \
281 static void GetMin( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
283 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
285 for ( ; n > 0; --n, ++f, ++g ) \
290 template <typename T> \
291 static void CopyMin( sample* __restrict__ f, const T* __restrict__ g, size_type n ) noexcept \
293 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
295 for ( ; n > 0; --n, ++f, ++g ) \
297 sample h = ToSample( *g ); \
303 static void CopyMin( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
305 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
307 for ( ; n > 0; --n, ++f, ++g ) \
312 template <typename T> \
313 static void GetMax( T* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
315 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
317 for ( ; n > 0; --n, ++f, ++g ) \
319 T h; FromSample( h, *g ); \
325 static void GetMax( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
327 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
329 for ( ; n > 0; --n, ++f, ++g ) \
334 template <typename T> \
335 static void CopyMax( sample* __restrict__ f, const T* __restrict__ g, size_type n ) noexcept \
337 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
339 for ( ; n > 0; --n, ++f, ++g ) \
341 sample h = ToSample( *g ); \
347 static void CopyMax( sample* __restrict__ f, const sample* __restrict__ g, size_type n ) noexcept \
349 PCL_PRECONDITION( f != nullptr && g != nullptr ) \
351 for ( ; n > 0; --n, ++f, ++g ) \
436 return std::numeric_limits<float>::lowest();
447 return std::numeric_limits<float>::max();
453 template <
typename T>
464 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
476 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
488 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
500 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
542 template <
typename T>
615 template <
typename T>
625 template <
typename T>
635 template <
typename T>
645 template <
typename T>
655 template <
typename T>
665 template <
typename T>
675 template <
typename T>
685 template <
typename T>
695 template <
typename T>
705 template <
typename T>
717 template <
typename T>
720 uint8 ia; FromSample( ia, a );
721 uint8 ib; FromSample( ib, ToSample( b ) );
722 a = ToSample(
uint8( ia | ib ) );
731 template <
typename T>
734 uint8 ia; FromSample( ia, a );
735 uint8 ib; FromSample( ib, ToSample( b ) );
736 a = ToSample(
uint8( ~(ia | ib) ) );
745 template <
typename T>
748 uint8 ia; FromSample( ia, a );
749 uint8 ib; FromSample( ib, ToSample( b ) );
750 a = ToSample(
uint8( ia & ib ) );
760 uint8 ia; FromSample( ia, a );
761 a = ToSample(
uint8( ~ia ) );
770 template <
typename T>
773 uint8 ib; FromSample( ib, ToSample( b ) );
774 a = ToSample(
uint8( ~ib ) );
783 template <
typename T>
786 uint8 ia; FromSample( ia, a );
787 uint8 ib; FromSample( ib, ToSample( b ) );
788 a = ToSample(
uint8( ~(ia & ib) ) );
797 template <
typename T>
800 uint8 ia; FromSample( ia, a );
801 uint8 ib; FromSample( ib, ToSample( b ) );
802 a = ToSample(
uint8( ia ^ ib ) );
811 template <
typename T>
814 uint8 ia; FromSample( ia, a );
815 uint8 ib; FromSample( ib, ToSample( b ) );
816 a = ToSample(
uint8( ~(ia ^ ib) ) );
824 template <
typename T>
835 template <
typename T>
838 a = a + ToSample( b ) - 1;
846 template <
typename T>
849 a = 1 - (1 - a)*(1 - ToSample( b ));
857 template <
typename T>
868 template <
typename T>
871 a = (a > 0.5F) ? 1 - ((1 - 2*(a - 0.5F)) * (1 - ToSample( b ))) : 2*a*ToSample( b );
879 template <
typename T>
882 sample fb = ToSample( b );
883 a = (1 - 2*fb)*a*a + 2*a*fb;
891 template <
typename T>
894 sample fb = ToSample( b );
895 a = (fb > 0.5F) ? 1 - (1 - a)*(1 - 2*(fb - 0.5F)) : 2*a*fb;
903 template <
typename T>
906 sample fb = ToSample( b );
915 template <
typename T>
918 sample fb = ToSample( b );
927 template <
typename T>
930 sample fb = ToSample( b );
939 template <
typename T>
942 a =
pcl::Range( 0.5F - 2*(a - 0.5F)*(ToSample( b ) - 0.5F), 0.0F, 1.0F );
947 IMPLEMENT_TRANSFER_OPERATIONS
1030 return std::numeric_limits<double>::lowest();
1041 return std::numeric_limits<double>::max();
1047 template <
typename T>
1058 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1070 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1073 return pDLUT8[int( x ) -
int8_min];
1082 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1094 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1136 template <
typename T>
1209 template <
typename T>
1219 template <
typename T>
1229 template <
typename T>
1239 template <
typename T>
1249 template <
typename T>
1259 template <
typename T>
1269 template <
typename T>
1279 template <
typename T>
1289 template <
typename T>
1299 template <
typename T>
1311 template <
typename T>
1314 uint8 ia; FromSample( ia, a );
1315 uint8 ib; FromSample( ib, ToSample( b ) );
1316 a = ToSample(
uint8( ia | ib ) );
1325 template <
typename T>
1328 uint8 ia; FromSample( ia, a );
1329 uint8 ib; FromSample( ib, ToSample( b ) );
1330 a = ToSample(
uint8( ~(ia | ib) ) );
1339 template <
typename T>
1342 uint8 ia; FromSample( ia, a );
1343 uint8 ib; FromSample( ib, ToSample( b ) );
1344 a = ToSample(
uint8( ia & ib ) );
1354 uint8 ia; FromSample( ia, a );
1355 a = ToSample(
uint8( ~ia ) );
1364 template <
typename T>
1367 uint8 ib; FromSample( ib, ToSample( b ) );
1368 a = ToSample(
uint8( ~ib ) );
1377 template <
typename T>
1380 uint8 ia; FromSample( ia, a );
1381 uint8 ib; FromSample( ib, ToSample( b ) );
1382 a = ToSample(
uint8( ~(ia & ib) ) );
1391 template <
typename T>
1394 uint8 ia; FromSample( ia, a );
1395 uint8 ib; FromSample( ib, ToSample( b ) );
1396 a = ToSample(
uint8( ia ^ ib ) );
1405 template <
typename T>
1408 uint8 ia; FromSample( ia, a );
1409 uint8 ib; FromSample( ib, ToSample( b ) );
1410 a = ToSample(
uint8( ~(ia ^ ib) ) );
1418 template <
typename T>
1429 template <
typename T>
1432 a = a + ToSample( b ) - 1;
1440 template <
typename T>
1443 a = 1 - (1 - a)*(1 - ToSample( b ));
1451 template <
typename T>
1462 template <
typename T>
1465 a = (a > 0.5) ? 1 - ((1 - 2*(a - 0.5)) * (1 - ToSample( b ))) : 2*a*ToSample( b );
1473 template <
typename T>
1476 sample fb = ToSample( b );
1477 a = (1 - 2*fb)*a*a + 2*a*fb;
1485 template <
typename T>
1488 sample fb = ToSample( b );
1489 a = (fb > 0.5) ? 1 - (1 - a)*(1 - 2*(fb - 0.5)) : 2*a*fb;
1497 template <
typename T>
1500 sample fb = ToSample( b );
1509 template <
typename T>
1512 sample fb = ToSample( b );
1521 template <
typename T>
1524 sample fb = ToSample( b );
1533 template <
typename T>
1536 a =
pcl::Range( 0.5 - 2*(a - 0.5)*(ToSample( b ) - 0.5), 0.0, 1.0 );
1541 IMPLEMENT_TRANSFER_OPERATIONS
1576 static constexpr
int BitsPerSample() noexcept
1628 return sample(
component( std::numeric_limits<component>::lowest() ) );
1645 template <
typename T>
1651 template <
typename T>
1652 static sample FloatToSample( sample x ) noexcept
1662 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1674 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1686 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1698 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
1740 template <
typename T>
1813 template <
typename T>
1823 template <
typename T>
1833 template <
typename T>
1843 template <
typename T>
1853 template <
typename T>
1863 template <
typename T>
1873 template <
typename T>
1883 template <
typename T>
1893 template <
typename T>
1903 template <
typename T>
1915 template <
typename T>
1918 uint8 ia; FromSample( ia, a );
1919 uint8 ib; FromSample( ib, ToSample( b ) );
1920 a = ToSample(
uint8( ia | ib ) );
1929 template <
typename T>
1932 uint8 ia; FromSample( ia, a );
1933 uint8 ib; FromSample( ib, ToSample( b ) );
1934 a = ToSample(
uint8( ~(ia | ib) ) );
1943 template <
typename T>
1946 uint8 ia; FromSample( ia, a );
1947 uint8 ib; FromSample( ib, ToSample( b ) );
1948 a = ToSample(
uint8( ia & ib ) );
1958 uint8 ia; FromSample( ia, a );
1959 a = ToSample(
uint8( ~ia ) );
1968 template <
typename T>
1971 uint8 ib; FromSample( ib, ToSample( b ) );
1972 a = ToSample(
uint8( ~ib ) );
1981 template <
typename T>
1984 uint8 ia; FromSample( ia, a );
1985 uint8 ib; FromSample( ib, ToSample( b ) );
1986 a = ToSample(
uint8( ~(ia & ib) ) );
1995 template <
typename T>
1998 uint8 ia; FromSample( ia, a );
1999 uint8 ib; FromSample( ib, ToSample( b ) );
2000 a = ToSample(
uint8( ia ^ ib ) );
2009 template <
typename T>
2012 uint8 ia; FromSample( ia, a );
2013 uint8 ib; FromSample( ib, ToSample( b ) );
2014 a = ToSample(
uint8( ~(ia ^ ib) ) );
2022 template <
typename T>
2025 float fa; FromSample( fa, a );
2026 float fb; FromSample( fb, ToSample( b ) );
2030 static void ColorBurn( sample& a,
float b ) noexcept
2032 float fa; FromSample( fa, a );
2036 static void ColorBurn( sample& a,
double b ) noexcept
2038 double fa; FromSample( fa, a );
2047 template <
typename T>
2050 float fa; FromSample( fa, a );
2051 float fb; FromSample( fb, ToSample( b ) );
2052 a = ToSample( fa + fb - 1 );
2055 static void LinearBurn( sample& a,
float b ) noexcept
2057 float fa; FromSample( fa, a );
2058 a = ToSample( fa + b - 1 );
2061 static void LinearBurn( sample& a,
double b ) noexcept
2063 double fa; FromSample( fa, a );
2064 a = ToSample( fa + b - 1 );
2072 template <
typename T>
2075 float fa; FromSample( fa, a );
2076 float fb; FromSample( fb, ToSample( b ) );
2077 a = ToSample( 1 - (1 - fa)*(1 - fb) );
2080 static void Screen( sample& a,
float b ) noexcept
2082 float fa; FromSample( fa, a );
2083 a = ToSample( 1 - (1 - fa)*(1 - b) );
2086 static void Screen( sample& a,
double b ) noexcept
2088 double fa; FromSample( fa, a );
2089 a = ToSample( 1 - (1 - fa)*(1 - b) );
2097 template <
typename T>
2100 float fa; FromSample( fa, a );
2101 float fb; FromSample( fb, ToSample( b ) );
2105 static void ColorDodge( sample& a,
float b ) noexcept
2107 float fa; FromSample( fa, a );
2111 static void ColorDodge( sample& a,
double b ) noexcept
2113 double fa; FromSample( fa, a );
2122 template <
typename T>
2125 float fa; FromSample( fa, a );
2126 float fb; FromSample( fb, ToSample( b ) );
2127 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - fb)) : 2*a*fb );
2130 static void Overlay( sample& a,
float b ) noexcept
2132 float fa; FromSample( fa, a );
2133 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - b)) : 2*a*b );
2136 static void Overlay( sample& a,
double b ) noexcept
2138 double fa; FromSample( fa, a );
2139 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - b)) : 2*a*b );
2147 template <
typename T>
2150 float fa; FromSample( fa, a );
2151 float fb; FromSample( fb, ToSample( b ) );
2152 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
2155 static void SoftLight( sample& a,
float b ) noexcept
2157 float fa; FromSample( fa, a );
2158 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
2161 static void SoftLight( sample& a,
double b ) noexcept
2163 double fa; FromSample( fa, a );
2164 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
2172 template <
typename T>
2175 float fa; FromSample( fa, a );
2176 float fb; FromSample( fb, ToSample( b ) );
2177 a = ToSample( (fb > 0.5F) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5F)) : 2*fa*fb );
2180 static void HardLight( sample& a,
float b ) noexcept
2182 float fa; FromSample( fa, a );
2183 a = ToSample( (b > 0.5F) ? 1 - (1 - fa)*(1 - 2*(b - 0.5F)) : 2*fa*b );
2186 static void HardLight( sample& a,
double b ) noexcept
2188 double fa; FromSample( fa, a );
2189 a = ToSample( (b > 0.5) ? 1 - (1 - fa)*(1 - 2*(b - 0.5)) : 2*fa*b );
2197 template <
typename T>
2200 float fa; FromSample( fa, a );
2201 float fb; FromSample( fb, ToSample( b ) );
2205 static void VividLight( sample& a,
float b ) noexcept
2207 float fa; FromSample( fa, a );
2211 static void VividLight( sample& a,
double b ) noexcept
2213 double fa; FromSample( fa, a );
2222 template <
typename T>
2225 float fa; FromSample( fa, a );
2226 float fb; FromSample( fb, ToSample( b ) );
2227 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0F, 1.0F ) );
2230 static void LinearLight( sample& a,
float b ) noexcept
2232 float fa; FromSample( fa, a );
2233 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0F, 1.0F ) );
2236 static void LinearLight( sample& a,
double b ) noexcept
2238 double fa; FromSample( fa, a );
2239 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0, 1.0 ) );
2247 template <
typename T>
2250 float fa; FromSample( fa, a );
2251 float fb; FromSample( fb, ToSample( b ) );
2252 a = ToSample( (fb > 0.5F) ?
pcl::Max( fa, 2*(fb - 0.5F) ) :
pcl::Min( fa, 2*fb ) );
2255 static void PinLight( sample& a,
float b ) noexcept
2257 float fa; FromSample( fa, a );
2258 a = ToSample( (b > 0.5F) ?
pcl::Max( fa, 2*(b - 0.5F) ) :
pcl::Min( fa, 2*b ) );
2261 static void PinLight( sample& a,
double b ) noexcept
2263 double fa; FromSample( fa, a );
2264 a = ToSample( (b > 0.5) ?
pcl::Max( fa, 2*(b - 0.5) ) :
pcl::Min( fa, 2*b ) );
2272 template <
typename T>
2275 float fa; FromSample( fa, a );
2276 float fb; FromSample( fb, ToSample( b ) );
2277 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(fb - 0.5F), 0.0F, 1.0F ) );
2280 static void Exclusion( sample& a,
float b ) noexcept
2282 float fa; FromSample( fa, a );
2283 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(b - 0.5F), 0.0F, 1.0F ) );
2286 static void Exclusion( sample& a,
double b ) noexcept
2288 double fa; FromSample( fa, a );
2289 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(b - 0.5), 0.0, 1.0 ) );
2294 IMPLEMENT_TRANSFER_OPERATIONS
2331 static constexpr
int BitsPerSample() noexcept
2383 return sample(
component( std::numeric_limits<component>::lowest() ) );
2400 template <
typename T>
2406 template <
typename T>
2407 static sample FloatToSample( sample x ) noexcept
2417 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
2429 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
2441 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
2453 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
2495 template <
typename T>
2568 template <
typename T>
2578 template <
typename T>
2588 template <
typename T>
2598 template <
typename T>
2608 template <
typename T>
2618 template <
typename T>
2628 template <
typename T>
2638 template <
typename T>
2648 template <
typename T>
2658 template <
typename T>
2670 template <
typename T>
2673 uint8 ia; FromSample( ia, a );
2674 uint8 ib; FromSample( ib, ToSample( b ) );
2675 a = ToSample(
uint8( ia | ib ) );
2684 template <
typename T>
2687 uint8 ia; FromSample( ia, a );
2688 uint8 ib; FromSample( ib, ToSample( b ) );
2689 a = ToSample(
uint8( ~(ia | ib) ) );
2698 template <
typename T>
2701 uint8 ia; FromSample( ia, a );
2702 uint8 ib; FromSample( ib, ToSample( b ) );
2703 a = ToSample(
uint8( ia & ib ) );
2713 uint8 ia; FromSample( ia, a );
2714 a = ToSample(
uint8( ~ia ) );
2723 template <
typename T>
2726 uint8 ib; FromSample( ib, ToSample( b ) );
2727 a = ToSample(
uint8( ~ib ) );
2736 template <
typename T>
2739 uint8 ia; FromSample( ia, a );
2740 uint8 ib; FromSample( ib, ToSample( b ) );
2741 a = ToSample(
uint8( ~(ia & ib) ) );
2750 template <
typename T>
2753 uint8 ia; FromSample( ia, a );
2754 uint8 ib; FromSample( ib, ToSample( b ) );
2755 a = ToSample(
uint8( ia ^ ib ) );
2764 template <
typename T>
2767 uint8 ia; FromSample( ia, a );
2768 uint8 ib; FromSample( ib, ToSample( b ) );
2769 a = ToSample(
uint8( ~(ia ^ ib) ) );
2777 template <
typename T>
2780 double fa; FromSample( fa, a );
2781 double fb; FromSample( fb, ToSample( b ) );
2785 static void ColorBurn( sample& a,
float b ) noexcept
2787 double fa; FromSample( fa, a );
2788 a = ToSample( 1 -
pcl::Min( (1 - fa)/
pcl::Max( EPSILON_D,
double( b ) ), 1.0 ) );
2791 static void ColorBurn( sample& a,
double b ) noexcept
2793 double fa; FromSample( fa, a );
2802 template <
typename T>
2805 double fa; FromSample( fa, a );
2806 double fb; FromSample( fb, ToSample( b ) );
2807 a = ToSample( fa + fb - 1 );
2810 static void LinearBurn( sample& a,
float b ) noexcept
2812 double fa; FromSample( fa, a );
2813 a = ToSample( fa +
double( b ) - 1 );
2816 static void LinearBurn( sample& a,
double b ) noexcept
2818 double fa; FromSample( fa, a );
2819 a = ToSample( fa + b - 1 );
2827 template <
typename T>
2830 double fa; FromSample( fa, a );
2831 double fb; FromSample( fb, ToSample( b ) );
2832 a = ToSample( 1 - (1 - fa)*(1 - fb) );
2835 static void Screen( sample& a,
float b ) noexcept
2837 double fa; FromSample( fa, a );
2838 a = ToSample( 1 - (1 - fa)*(1 -
double( b )) );
2841 static void Screen( sample& a,
double b ) noexcept
2843 double fa; FromSample( fa, a );
2844 a = ToSample( 1 - (1 - fa)*(1 - b) );
2852 template <
typename T>
2855 double fa; FromSample( fa, a );
2856 double fb; FromSample( fb, ToSample( b ) );
2860 static void ColorDodge( sample& a,
float b ) noexcept
2862 double fa; FromSample( fa, a );
2863 a = ToSample(
pcl::Min( fa/
pcl::Max( EPSILON_D, 1 -
double( b ) ), 1.0 ) );
2866 static void ColorDodge( sample& a,
double b ) noexcept
2868 double fa; FromSample( fa, a );
2877 template <
typename T>
2880 double fa; FromSample( fa, a );
2881 double fb; FromSample( fb, ToSample( b ) );
2882 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - fb)) : 2*a*fb );
2885 static void Overlay( sample& a,
float b ) noexcept
2887 double fa; FromSample( fa, a );
2888 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 -
double( b ))) : 2*a*
double( b ) );
2891 static void Overlay( sample& a,
double b ) noexcept
2893 double fa; FromSample( fa, a );
2894 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - b)) : 2*a*b );
2902 template <
typename T>
2905 double fa; FromSample( fa, a );
2906 double fb; FromSample( fb, ToSample( b ) );
2907 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
2910 static void SoftLight( sample& a,
float b ) noexcept
2912 double fa; FromSample( fa, a );
2913 double fb = double( b );
2914 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
2917 static void SoftLight( sample& a,
double b ) noexcept
2919 double fa; FromSample( fa, a );
2920 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
2928 template <
typename T>
2931 double fa; FromSample( fa, a );
2932 double fb; FromSample( fb, ToSample( b ) );
2933 a = ToSample( (fb > 0.5) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5)) : 2*fa*fb );
2936 static void HardLight( sample& a,
float b ) noexcept
2938 double fa; FromSample( fa, a );
2939 double fb = double( b );
2940 a = ToSample( (fb > 0.5) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5)) : 2*fa*fb );
2943 static void HardLight( sample& a,
double b ) noexcept
2945 double fa; FromSample( fa, a );
2946 a = ToSample( (b > 0.5) ? 1 - (1 - fa)*(1 - 2*(b - 0.5)) : 2*fa*b );
2954 template <
typename T>
2957 double fa; FromSample( fa, a );
2958 double fb; FromSample( fb, ToSample( b ) );
2962 static void VividLight( sample& a,
float b ) noexcept
2964 double fa; FromSample( fa, a );
2965 double fb = double( b );
2969 static void VividLight( sample& a,
double b ) noexcept
2971 double fa; FromSample( fa, a );
2980 template <
typename T>
2983 double fa; FromSample( fa, a );
2984 double fb; FromSample( fb, ToSample( b ) );
2985 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0, 1.0 ) );
2988 static void LinearLight( sample& a,
float b ) noexcept
2990 double fa; FromSample( fa, a );
2991 double fb = double( b );
2992 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0, 1.0 ) );
2995 static void LinearLight( sample& a,
double b ) noexcept
2997 double fa; FromSample( fa, a );
2998 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0, 1.0 ) );
3006 template <
typename T>
3009 double fa; FromSample( fa, a );
3010 double fb; FromSample( fb, ToSample( b ) );
3011 a = ToSample( (fb > 0.5) ?
pcl::Max( fa, 2*(fb - 0.5) ) :
pcl::Min( fa, 2*fb ) );
3014 static void PinLight( sample& a,
float b ) noexcept
3016 double fa; FromSample( fa, a );
3017 double fb = double( b );
3018 a = ToSample( (fb > 0.5) ?
pcl::Max( fa, 2*(fb - 0.5) ) :
pcl::Min( fa, 2*fb ) );
3021 static void PinLight( sample& a,
double b ) noexcept
3023 double fa; FromSample( fa, a );
3024 a = ToSample( (b > 0.5) ?
pcl::Max( fa, 2*(b - 0.5) ) :
pcl::Min( fa, 2*b ) );
3032 template <
typename T>
3035 double fa; FromSample( fa, a );
3036 double fb; FromSample( fb, ToSample( b ) );
3037 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(fb - 0.5), 0.0, 1.0 ) );
3040 static void Exclusion( sample& a,
float b ) noexcept
3042 double fa; FromSample( fa, a );
3043 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(
double( b ) - 0.5), 0.0, 1.0 ) );
3046 static void Exclusion( sample& a,
double b ) noexcept
3048 double fa; FromSample( fa, a );
3049 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(b - 0.5), 0.0, 1.0 ) );
3054 IMPLEMENT_TRANSFER_OPERATIONS
3152 template <
typename T>
3155 #ifdef __PCL_ENFORCE_PIXTRAITS_FLOAT_RANGE
3184 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3196 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3258 template <
typename T>
3285 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3297 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3309 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3321 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3333 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3345 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
3355 template <
typename T>
3367 template <
typename T>
3377 template <
typename T>
3388 template <
typename T>
3399 template <
typename T>
3402 float fa; FromSample( fa, a );
3403 float fb; FromSample( fb, ToSample( b ) );
3404 a = ToSample( fa * fb );
3411 float fa; FromSample( fa, a );
3412 a = ToSample( fa * b );
3419 double fa; FromSample( fa, a );
3420 a = ToSample( fa * b );
3427 float fa; FromSample( fa, a );
3428 a = ToSample( fa * b );
3435 double fa; FromSample( fa, a );
3436 a = ToSample( fa * b );
3443 template <
typename T>
3446 a = FloatToSample(
float( a )/
float( ToSample( b ) ) );
3453 float fa; FromSample( fa, a );
3454 a = ToSample( fa / b );
3461 double fa; FromSample( fa, a );
3462 a = ToSample( fa / b );
3469 float fa; FromSample( fa, a );
3470 a = ToSample( fa / b );
3477 double fa; FromSample( fa, a );
3478 a = ToSample( fa / b );
3485 template <
typename T>
3488 float fa; FromSample( fa, a );
3489 float fb; FromSample( fb, ToSample( b ) );
3490 a = ToSample(
pcl::Pow( fa, fb ) );
3497 float fa; FromSample( fa, a );
3505 double fa; FromSample( fa, a );
3513 float fa; FromSample( fa, a );
3521 double fa; FromSample( fa, a );
3529 template <
typename T>
3540 template <
typename T>
3550 template <
typename T>
3561 template <
typename T>
3572 template <
typename T>
3575 a = ~(a | ToSample( b ));
3583 template <
typename T>
3602 template <
typename T>
3605 a =
sample( ~ToSample( b ) );
3613 template <
typename T>
3616 a =
sample( ~(a & ToSample( b )) );
3624 template <
typename T>
3635 template <
typename T>
3638 a =
sample( ~(a ^ ToSample( b )) );
3646 template <
typename T>
3649 float fa; FromSample( fa, a );
3650 float fb; FromSample( fb, ToSample( b ) );
3654 static void ColorBurn( sample& a,
float b ) noexcept
3656 float fa; FromSample( fa, a );
3660 static void ColorBurn( sample& a,
double b ) noexcept
3662 double fa; FromSample( fa, a );
3671 template <
typename T>
3674 float fa; FromSample( fa, a );
3675 float fb; FromSample( fb, ToSample( b ) );
3676 a = ToSample( fa + fb - 1 );
3679 static void LinearBurn( sample& a,
float b ) noexcept
3681 float fa; FromSample( fa, a );
3682 a = ToSample( fa + b - 1 );
3685 static void LinearBurn( sample& a,
double b ) noexcept
3687 double fa; FromSample( fa, a );
3688 a = ToSample( fa + b - 1 );
3696 template <
typename T>
3699 float fa; FromSample( fa, a );
3700 float fb; FromSample( fb, ToSample( b ) );
3701 a = ToSample( 1 - (1 - fa)*(1 - fb) );
3704 static void Screen( sample& a,
float b ) noexcept
3706 float fa; FromSample( fa, a );
3707 a = ToSample( 1 - (1 - fa)*(1 - b) );
3710 static void Screen( sample& a,
double b ) noexcept
3712 double fa; FromSample( fa, a );
3713 a = ToSample( 1 - (1 - fa)*(1 - b) );
3721 template <
typename T>
3724 float fa; FromSample( fa, a );
3725 float fb; FromSample( fb, ToSample( b ) );
3729 static void ColorDodge( sample& a,
float b ) noexcept
3731 float fa; FromSample( fa, a );
3735 static void ColorDodge( sample& a,
double b ) noexcept
3737 double fa; FromSample( fa, a );
3746 template <
typename T>
3749 float fa; FromSample( fa, a );
3750 float fb; FromSample( fb, ToSample( b ) );
3751 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - fb)) : 2*a*fb );
3754 static void Overlay( sample& a,
float b ) noexcept
3756 float fa; FromSample( fa, a );
3757 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - b)) : 2*a*b );
3760 static void Overlay( sample& a,
double b ) noexcept
3762 double fa; FromSample( fa, a );
3763 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - b)) : 2*a*b );
3771 template <
typename T>
3774 float fa; FromSample( fa, a );
3775 float fb; FromSample( fb, ToSample( b ) );
3776 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
3779 static void SoftLight( sample& a,
float b ) noexcept
3781 float fa; FromSample( fa, a );
3782 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
3785 static void SoftLight( sample& a,
double b ) noexcept
3787 double fa; FromSample( fa, a );
3788 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
3796 template <
typename T>
3799 float fa; FromSample( fa, a );
3800 float fb; FromSample( fb, ToSample( b ) );
3801 a = ToSample( (fb > 0.5F) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5F)) : 2*fa*fb );
3804 static void HardLight( sample& a,
float b ) noexcept
3806 float fa; FromSample( fa, a );
3807 a = ToSample( (b > 0.5F) ? 1 - (1 - fa)*(1 - 2*(b - 0.5F)) : 2*fa*b );
3810 static void HardLight( sample& a,
double b ) noexcept
3812 double fa; FromSample( fa, a );
3813 a = ToSample( (b > 0.5) ? 1 - (1 - fa)*(1 - 2*(b - 0.5)) : 2*fa*b );
3821 template <
typename T>
3824 float fa; FromSample( fa, a );
3825 float fb; FromSample( fb, ToSample( b ) );
3829 static void VividLight( sample& a,
float b ) noexcept
3831 float fa; FromSample( fa, a );
3835 static void VividLight( sample& a,
double b ) noexcept
3837 double fa; FromSample( fa, a );
3846 template <
typename T>
3849 float fa; FromSample( fa, a );
3850 float fb; FromSample( fb, ToSample( b ) );
3851 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0F, 1.0F ) );
3854 static void LinearLight( sample& a,
float b ) noexcept
3856 float fa; FromSample( fa, a );
3857 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0F, 1.0F ) );
3860 static void LinearLight( sample& a,
double b ) noexcept
3862 double fa; FromSample( fa, a );
3863 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0, 1.0 ) );
3871 template <
typename T>
3874 float fa; FromSample( fa, a );
3875 float fb; FromSample( fb, ToSample( b ) );
3876 a = ToSample( (fb > 0.5F) ?
pcl::Max( fa, 2*(fb - 0.5F) ) :
pcl::Min( fa, 2*fb ) );
3879 static void PinLight( sample& a,
float b ) noexcept
3881 float fa; FromSample( fa, a );
3882 a = ToSample( (b > 0.5F) ?
pcl::Max( fa, 2*(b - 0.5F) ) :
pcl::Min( fa, 2*b ) );
3885 static void PinLight( sample& a,
double b ) noexcept
3887 double fa; FromSample( fa, a );
3888 a = ToSample( (b > 0.5) ?
pcl::Max( fa, 2*(b - 0.5) ) :
pcl::Min( fa, 2*b ) );
3896 template <
typename T>
3899 float fa; FromSample( fa, a );
3900 float fb; FromSample( fb, ToSample( b ) );
3901 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(fb - 0.5F), 0.0F, 1.0F ) );
3904 static void Exclusion( sample& a,
float b ) noexcept
3906 float fa; FromSample( fa, a );
3907 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(b - 0.5F), 0.0F, 1.0F ) );
3910 static void Exclusion( sample& a,
double b ) noexcept
3912 double fa; FromSample( fa, a );
3913 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(b - 0.5), 0.0, 1.0 ) );
3918 IMPLEMENT_TRANSFER_OPERATIONS
4016 template <
typename T>
4019 #ifdef __PCL_ENFORCE_PIXTRAITS_FLOAT_RANGE
4032 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4044 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4047 return p16LUT8[int( x ) - int(
int8_min )];
4122 template <
typename T>
4133 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4145 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4173 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4185 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4197 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4209 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4219 template <
typename T>
4231 template <
typename T>
4241 template <
typename T>
4252 template <
typename T>
4263 template <
typename T>
4266 double fa; FromSample( fa, a );
4267 double fb; FromSample( fb, ToSample( b ) );
4268 a = ToSample( fa * fb );
4275 double fa; FromSample( fa, a );
4276 a = ToSample( fa * b );
4283 double fa; FromSample( fa, a );
4284 a = ToSample( fa * b );
4291 double fa; FromSample( fa, a );
4292 a = ToSample( fa * b );
4299 double fa; FromSample( fa, a );
4300 a = ToSample( fa * b );
4307 template <
typename T>
4310 a = FloatToSample(
double( a )/
double( ToSample( b ) ) );
4317 double fa; FromSample( fa, a );
4318 a = ToSample( fa / b );
4325 double fa; FromSample( fa, a );
4326 a = ToSample( fa / b );
4333 double fa; FromSample( fa, a );
4334 a = ToSample( fa / b );
4341 double fa; FromSample( fa, a );
4342 a = ToSample( fa / b );
4349 template <
typename T>
4352 double fa; FromSample( fa, a );
4353 double fb; FromSample( fb, ToSample( b ) );
4354 a = ToSample(
pcl::Pow( fa, fb ) );
4361 double fa; FromSample( fa, a );
4362 a = ToSample(
pcl::Pow( fa,
double( b ) ) );
4369 double fa; FromSample( fa, a );
4377 double fa; FromSample( fa, a );
4385 double fa; FromSample( fa, a );
4393 template <
typename T>
4404 template <
typename T>
4414 template <
typename T>
4425 template <
typename T>
4436 template <
typename T>
4439 a = ~(a | ToSample( b ));
4447 template <
typename T>
4466 template <
typename T>
4469 a =
sample( ~ToSample( b ) );
4477 template <
typename T>
4480 a =
sample( ~(a & ToSample( b )) );
4488 template <
typename T>
4499 template <
typename T>
4502 a =
sample( ~(a ^ ToSample( b )) );
4510 template <
typename T>
4513 float fa; FromSample( fa, a );
4514 float fb; FromSample( fb, ToSample( b ) );
4518 static void ColorBurn( sample& a,
float b ) noexcept
4520 float fa; FromSample( fa, a );
4524 static void ColorBurn( sample& a,
double b ) noexcept
4526 double fa; FromSample( fa, a );
4535 template <
typename T>
4538 float fa; FromSample( fa, a );
4539 float fb; FromSample( fb, ToSample( b ) );
4540 a = ToSample( fa + fb - 1 );
4543 static void LinearBurn( sample& a,
float b ) noexcept
4545 float fa; FromSample( fa, a );
4546 a = ToSample( fa + b - 1 );
4549 static void LinearBurn( sample& a,
double b ) noexcept
4551 double fa; FromSample( fa, a );
4552 a = ToSample( fa + b - 1 );
4560 template <
typename T>
4563 float fa; FromSample( fa, a );
4564 float fb; FromSample( fb, ToSample( b ) );
4565 a = ToSample( 1 - (1 - fa)*(1 - fb) );
4568 static void Screen( sample& a,
float b ) noexcept
4570 float fa; FromSample( fa, a );
4571 a = ToSample( 1 - (1 - fa)*(1 - b) );
4574 static void Screen( sample& a,
double b ) noexcept
4576 double fa; FromSample( fa, a );
4577 a = ToSample( 1 - (1 - fa)*(1 - b) );
4585 template <
typename T>
4588 float fa; FromSample( fa, a );
4589 float fb; FromSample( fb, ToSample( b ) );
4593 static void ColorDodge( sample& a,
float b ) noexcept
4595 float fa; FromSample( fa, a );
4599 static void ColorDodge( sample& a,
double b ) noexcept
4601 double fa; FromSample( fa, a );
4610 template <
typename T>
4613 float fa; FromSample( fa, a );
4614 float fb; FromSample( fb, ToSample( b ) );
4615 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - fb)) : 2*a*fb );
4618 static void Overlay( sample& a,
float b ) noexcept
4620 float fa; FromSample( fa, a );
4621 a = ToSample( (fa > 0.5F) ? 1 - ((1 - 2*(fa - 0.5F)) * (1 - b)) : 2*a*b );
4624 static void Overlay( sample& a,
double b ) noexcept
4626 double fa; FromSample( fa, a );
4627 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - b)) : 2*a*b );
4635 template <
typename T>
4638 float fa; FromSample( fa, a );
4639 float fb; FromSample( fb, ToSample( b ) );
4640 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
4643 static void SoftLight( sample& a,
float b ) noexcept
4645 float fa; FromSample( fa, a );
4646 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
4649 static void SoftLight( sample& a,
double b ) noexcept
4651 double fa; FromSample( fa, a );
4652 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
4660 template <
typename T>
4663 float fa; FromSample( fa, a );
4664 float fb; FromSample( fb, ToSample( b ) );
4665 a = ToSample( (fb > 0.5F) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5F)) : 2*fa*fb );
4668 static void HardLight( sample& a,
float b ) noexcept
4670 float fa; FromSample( fa, a );
4671 a = ToSample( (b > 0.5F) ? 1 - (1 - fa)*(1 - 2*(b - 0.5F)) : 2*fa*b );
4674 static void HardLight( sample& a,
double b ) noexcept
4676 double fa; FromSample( fa, a );
4677 a = ToSample( (b > 0.5) ? 1 - (1 - fa)*(1 - 2*(b - 0.5)) : 2*fa*b );
4685 template <
typename T>
4688 float fa; FromSample( fa, a );
4689 float fb; FromSample( fb, ToSample( b ) );
4693 static void VividLight( sample& a,
float b ) noexcept
4695 float fa; FromSample( fa, a );
4699 static void VividLight( sample& a,
double b ) noexcept
4701 double fa; FromSample( fa, a );
4710 template <
typename T>
4713 float fa; FromSample( fa, a );
4714 float fb; FromSample( fb, ToSample( b ) );
4715 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0F, 1.0F ) );
4718 static void LinearLight( sample& a,
float b ) noexcept
4720 float fa; FromSample( fa, a );
4721 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0F, 1.0F ) );
4724 static void LinearLight( sample& a,
double b ) noexcept
4726 double fa; FromSample( fa, a );
4727 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0, 1.0 ) );
4735 template <
typename T>
4738 float fa; FromSample( fa, a );
4739 float fb; FromSample( fb, ToSample( b ) );
4740 a = ToSample( (fb > 0.5F) ?
pcl::Max( fa, 2*(fb - 0.5F) ) :
pcl::Min( fa, 2*fb ) );
4743 static void PinLight( sample& a,
float b ) noexcept
4745 float fa; FromSample( fa, a );
4746 a = ToSample( (b > 0.5F) ?
pcl::Max( fa, 2*(b - 0.5F) ) :
pcl::Min( fa, 2*b ) );
4749 static void PinLight( sample& a,
double b ) noexcept
4751 double fa; FromSample( fa, a );
4752 a = ToSample( (b > 0.5) ?
pcl::Max( fa, 2*(b - 0.5) ) :
pcl::Min( fa, 2*b ) );
4760 template <
typename T>
4763 float fa; FromSample( fa, a );
4764 float fb; FromSample( fb, ToSample( b ) );
4765 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(fb - 0.5F), 0.0F, 1.0F ) );
4768 static void Exclusion( sample& a,
float b ) noexcept
4770 float fa; FromSample( fa, a );
4771 a = ToSample(
pcl::Range( 0.5F - 2*(fa - 0.5F)*(b - 0.5F), 0.0F, 1.0F ) );
4774 static void Exclusion( sample& a,
double b ) noexcept
4776 double fa; FromSample( fa, a );
4777 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(b - 0.5), 0.0, 1.0 ) );
4782 IMPLEMENT_TRANSFER_OPERATIONS
4880 template <
typename T>
4883 #ifdef __PCL_ENFORCE_PIXTRAITS_FLOAT_RANGE
4896 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4908 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4911 return p32LUT8[int( x ) - int(
int8_min )];
4920 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4932 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
4935 return p32LUT16[int( x ) - int(
int16_min )];
4960 return FloatToSample(
double( x )*
uint32_max );
4994 template <
typename T>
5067 template <
typename T>
5079 template <
typename T>
5089 template <
typename T>
5100 template <
typename T>
5111 template <
typename T>
5114 double fa; FromSample( fa, a );
5115 double fb; FromSample( fb, ToSample( b ) );
5116 a = ToSample( fa * fb );
5123 double fa; FromSample( fa, a );
5124 a = ToSample( fa * b );
5131 double fa; FromSample( fa, a );
5132 a = ToSample( fa * b );
5139 double fa; FromSample( fa, a );
5140 a = ToSample( fa * b );
5147 double fa; FromSample( fa, a );
5148 a = ToSample( fa * b );
5155 template <
typename T>
5158 a = FloatToSample(
double( a )/
double( ToSample( b ) ) );
5165 double fa; FromSample( fa, a );
5166 a = ToSample( fa / b );
5173 double fa; FromSample( fa, a );
5174 a = ToSample( fa / b );
5181 double fa; FromSample( fa, a );
5182 a = ToSample( fa / b );
5189 double fa; FromSample( fa, a );
5190 a = ToSample( fa / b );
5197 template <
typename T>
5200 double fa; FromSample( fa, a );
5201 double fb; FromSample( fb, ToSample( b ) );
5202 a = ToSample(
pcl::Pow( fa, fb ) );
5209 double fa; FromSample( fa, a );
5210 a = ToSample(
pcl::Pow( fa,
double( b ) ) );
5217 double fa; FromSample( fa, a );
5225 double fa; FromSample( fa, a );
5233 double fa; FromSample( fa, a );
5241 template <
typename T>
5252 template <
typename T>
5262 template <
typename T>
5273 template <
typename T>
5284 template <
typename T>
5287 a = ~(a | ToSample( b ));
5295 template <
typename T>
5314 template <
typename T>
5317 a =
sample( ~ToSample( b ) );
5325 template <
typename T>
5328 a =
sample( ~(a & ToSample( b )) );
5336 template <
typename T>
5347 template <
typename T>
5350 a =
sample( ~(a ^ ToSample( b )) );
5358 template <
typename T>
5361 double fa; FromSample( fa, a );
5362 double fb; FromSample( fb, ToSample( b ) );
5366 static void ColorBurn( sample& a,
float b ) noexcept
5368 double fa; FromSample( fa, a );
5369 a = ToSample( 1 -
pcl::Min( (1 - fa)/
pcl::Max( EPSILON_D,
double( b ) ), 1.0 ) );
5372 static void ColorBurn( sample& a,
double b ) noexcept
5374 double fa; FromSample( fa, a );
5383 template <
typename T>
5386 double fa; FromSample( fa, a );
5387 double fb; FromSample( fb, ToSample( b ) );
5388 a = ToSample( fa + fb - 1 );
5391 static void LinearBurn( sample& a,
float b ) noexcept
5393 double fa; FromSample( fa, a );
5394 a = ToSample( fa +
double( b ) - 1 );
5397 static void LinearBurn( sample& a,
double b ) noexcept
5399 double fa; FromSample( fa, a );
5400 a = ToSample( fa + b - 1 );
5408 template <
typename T>
5411 double fa; FromSample( fa, a );
5412 double fb; FromSample( fb, ToSample( b ) );
5413 a = ToSample( 1 - (1 - fa)*(1 - fb) );
5416 static void Screen( sample& a,
float b ) noexcept
5418 double fa; FromSample( fa, a );
5419 a = ToSample( 1 - (1 - fa)*(1 -
double( b )) );
5422 static void Screen( sample& a,
double b ) noexcept
5424 double fa; FromSample( fa, a );
5425 a = ToSample( 1 - (1 - fa)*(1 - b) );
5433 template <
typename T>
5436 double fa; FromSample( fa, a );
5437 double fb; FromSample( fb, ToSample( b ) );
5441 static void ColorDodge( sample& a,
float b ) noexcept
5443 double fa; FromSample( fa, a );
5444 a = ToSample(
pcl::Min( fa/
pcl::Max( EPSILON_D, 1 -
double( b ) ), 1.0 ) );
5447 static void ColorDodge( sample& a,
double b ) noexcept
5449 double fa; FromSample( fa, a );
5458 template <
typename T>
5461 double fa; FromSample( fa, a );
5462 double fb; FromSample( fb, ToSample( b ) );
5463 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - fb)) : 2*a*fb );
5466 static void Overlay( sample& a,
float b ) noexcept
5468 double fa; FromSample( fa, a );
5469 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 -
double( b ))) : 2*a*
double( b ) );
5472 static void Overlay( sample& a,
double b ) noexcept
5474 double fa; FromSample( fa, a );
5475 a = ToSample( (fa > 0.5) ? 1 - ((1 - 2*(fa - 0.5)) * (1 - b)) : 2*a*b );
5483 template <
typename T>
5486 double fa; FromSample( fa, a );
5487 double fb; FromSample( fb, ToSample( b ) );
5488 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
5491 static void SoftLight( sample& a,
float b ) noexcept
5493 double fa; FromSample( fa, a );
5494 double fb = double( b );
5495 a = ToSample( (1 - 2*fb)*fa*fa + 2*fa*fb );
5498 static void SoftLight( sample& a,
double b ) noexcept
5500 double fa; FromSample( fa, a );
5501 a = ToSample( (1 - 2*b)*fa*fa + 2*fa*b );
5509 template <
typename T>
5512 double fa; FromSample( fa, a );
5513 double fb; FromSample( fb, ToSample( b ) );
5514 a = ToSample( (fb > 0.5) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5)) : 2*fa*fb );
5517 static void HardLight( sample& a,
float b ) noexcept
5519 double fa; FromSample( fa, a );
5520 double fb = double( b );
5521 a = ToSample( (fb > 0.5) ? 1 - (1 - fa)*(1 - 2*(fb - 0.5)) : 2*fa*fb );
5524 static void HardLight( sample& a,
double b ) noexcept
5526 double fa; FromSample( fa, a );
5527 a = ToSample( (b > 0.5) ? 1 - (1 - fa)*(1 - 2*(b - 0.5)) : 2*fa*b );
5535 template <
typename T>
5538 double fa; FromSample( fa, a );
5539 double fb; FromSample( fb, ToSample( b ) );
5543 static void VividLight( sample& a,
float b ) noexcept
5545 double fa; FromSample( fa, a );
5546 double fb = double( b );
5550 static void VividLight( sample& a,
double b ) noexcept
5552 double fa; FromSample( fa, a );
5561 template <
typename T>
5564 double fa; FromSample( fa, a );
5565 double fb; FromSample( fb, ToSample( b ) );
5566 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0, 1.0 ) );
5569 static void LinearLight( sample& a,
float b ) noexcept
5571 double fa; FromSample( fa, a );
5572 double fb = double( b );
5573 a = ToSample(
pcl::Range( fa + 2*fb - 1, 0.0, 1.0 ) );
5576 static void LinearLight( sample& a,
double b ) noexcept
5578 double fa; FromSample( fa, a );
5579 a = ToSample(
pcl::Range( fa + 2*b - 1, 0.0, 1.0 ) );
5587 template <
typename T>
5590 double fa; FromSample( fa, a );
5591 double fb; FromSample( fb, ToSample( b ) );
5592 a = ToSample( (fb > 0.5) ?
pcl::Max( fa, 2*(fb - 0.5) ) :
pcl::Min( fa, 2*fb ) );
5595 static void PinLight( sample& a,
float b ) noexcept
5597 double fa; FromSample( fa, a );
5598 double fb = double( b );
5599 a = ToSample( (fb > 0.5) ?
pcl::Max( fa, 2*(fb - 0.5) ) :
pcl::Min( fa, 2*fb ) );
5602 static void PinLight( sample& a,
double b ) noexcept
5604 double fa; FromSample( fa, a );
5605 a = ToSample( (b > 0.5) ?
pcl::Max( fa, 2*(b - 0.5) ) :
pcl::Min( fa, 2*b ) );
5613 template <
typename T>
5616 double fa; FromSample( fa, a );
5617 double fb; FromSample( fb, ToSample( b ) );
5618 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(fb - 0.5), 0.0, 1.0 ) );
5621 static void Exclusion( sample& a,
float b ) noexcept
5623 double fa; FromSample( fa, a );
5624 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(
double( b ) - 0.5), 0.0, 1.0 ) );
5627 static void Exclusion( sample& a,
double b ) noexcept
5629 double fa; FromSample( fa, a );
5630 a = ToSample(
pcl::Range( 0.5 - 2*(fa - 0.5)*(b - 0.5), 0.0, 1.0 ) );
5635 IMPLEMENT_TRANSFER_OPERATIONS
5735 template <
typename T>
5738 #ifdef __PCL_ENFORCE_PIXTRAITS_FLOAT_RANGE
5751 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5763 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5766 return p20LUT8[int( x ) - int(
int8_min )];
5775 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5787 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5790 return p20LUT16[int( x ) - int(
int16_min )];
5849 template <
typename T>
5860 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5872 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5884 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5896 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5908 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5920 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5932 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5944 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
5954 template <
typename T>
6060 template <
typename T>
6063 #ifdef __PCL_ENFORCE_PIXTRAITS_FLOAT_RANGE
6076 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
6088 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
6091 return p24LUT8[int( x ) - int(
int8_min )];
6100 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
6112 #ifdef __PCL_DONT_USE_PIXTRAITS_LUT
6115 return p24LUT16[int( x ) - int(
int16_min )];
6140 return FloatToSample(
double( x )*
uint24_max );
6174 template <
typename T>
6247 template <
typename T>
6258 #undef IMPLEMENT_TRANSFER_OPERATIONS
6263 #ifndef __PCL_DONT_USE_PIXTRAITS_LUT
32-bit IEEE 754 normalized floating point complex pixel traits.
static void Max(sample &a, T b) noexcept
static void Nand(sample &a, T b) noexcept
static void Mov(sample &a, T b) noexcept
static void PinLight(sample &a, T b) noexcept
static void Sub(sample &a, T b) noexcept
static sample ToSample(uint16 x) noexcept
static void Mul(sample &a, T b) noexcept
static sample ToSample(uint8 x) noexcept
static void Or(sample &a, T b) noexcept
static void Add(sample &a, T b) noexcept
static void LinearLight(sample &a, T b) noexcept
static constexpr const char * SampleFormat() noexcept
static void FromSample(int32 &a, sample b) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void Xor(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static void ColorDodge(sample &a, T b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static sample ToSample(double x) noexcept
static void FromSample(float &a, sample b) noexcept
sample::component component
static sample ToSample(const Complex< T > &x) noexcept
static sample ToSample(int8 x) noexcept
static void Overlay(sample &a, T b) noexcept
static void FromSample(double &a, sample b) noexcept
static sample ToSample(uint32 x) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static void And(sample &a, T b) noexcept
static void VividLight(sample &a, T b) noexcept
static void Exclusion(sample &a, T b) noexcept
static sample MaxSampleValue() noexcept
static void Xnor(sample &a, T b) noexcept
static void Min(sample &a, T b) noexcept
static void HardLight(sample &a, T b) noexcept
static void LinearBurn(sample &a, T b) noexcept
static sample ToSample(float x) noexcept
static constexpr bool IsComplexSample() noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void SoftLight(sample &a, T b) noexcept
static void Not(sample &a, T b) noexcept
static sample LowestSampleValue() noexcept
static void FromSampl(int8 &a, sample b) noexcept
static sample ToSample(int16 x) noexcept
static sample FloatToSample(T x) noexcept
static void Screen(sample &a, T b) noexcept
static sample HighestSampleValue() noexcept
static void ColorBurn(sample &a, T b) noexcept
static sample ToSample(int32 x) noexcept
static void Div(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static void Pow(sample &a, T b) noexcept
static void Not(sample &a) noexcept
static void Nor(sample &a, T b) noexcept
static void Dif(sample &a, T b) noexcept
64-bit IEEE 754 normalized floating point complex pixel traits.
static sample ToSample(int32 x) noexcept
static sample ToSample(int16 x) noexcept
static void Screen(sample &a, T b) noexcept
static sample ToSample(const Complex< T > &x) noexcept
static void PinLight(sample &a, T b) noexcept
static void Mov(sample &a, T b) noexcept
static void Mul(sample &a, T b) noexcept
static void Nor(sample &a, T b) noexcept
static void FromSample(int8 &a, sample b) noexcept
static constexpr const char * SampleFormat() noexcept
static void FromSample(int16 &a, sample b) noexcept
static sample ToSample(double x) noexcept
static sample ToSample(int8 x) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static void Not(sample &a) noexcept
static void LinearLight(sample &a, T b) noexcept
static void Exclusion(sample &a, T b) noexcept
static void LinearBurn(sample &a, T b) noexcept
static sample ToSample(uint8 x) noexcept
static void And(sample &a, T b) noexcept
static void Max(sample &a, T b) noexcept
static void ColorBurn(sample &a, T b) noexcept
static sample LowestSampleValue() noexcept
static void VividLight(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static sample FloatToSample(T x) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void SoftLight(sample &a, T b) noexcept
static sample ToSample(uint32 x) noexcept
static void Nand(sample &a, T b) noexcept
static void FromSample(double &a, sample b) noexcept
static void Dif(sample &a, T b) noexcept
static constexpr bool IsComplexSample() noexcept
static void Or(sample &a, T b) noexcept
static void Not(sample &a, T b) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static void Overlay(sample &a, T b) noexcept
static sample HighestSampleValue() noexcept
static void FromSample(int32 &a, sample b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static sample ToSample(float x) noexcept
sample::component component
static void Min(sample &a, T b) noexcept
static void Pow(sample &a, T b) noexcept
static void HardLight(sample &a, T b) noexcept
static void Div(sample &a, T b) noexcept
static void Sub(sample &a, T b) noexcept
static void Xor(sample &a, T b) noexcept
static sample ToSample(uint16 x) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static sample MaxSampleValue() noexcept
static void Add(sample &a, T b) noexcept
static void FromSample(float &a, sample b) noexcept
static void Xnor(sample &a, T b) noexcept
64-bit IEEE 754 normalized floating point real pixel traits.
static void LinearBurn(sample &a, T b) noexcept
static void FromSample(int8 &a, sample b) noexcept
static constexpr sample FloatToSample(T x) noexcept
static void LinearLight(sample &a, T b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static sample ToSample(uint16 x) noexcept
static void Not(sample &a) noexcept
static void Overlay(sample &a, T b) noexcept
static void Pow(sample &a, T b) noexcept
static void Max(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static constexpr sample MaxSampleValue() noexcept
static constexpr sample ToSample(int32 x) noexcept
static void ColorBurn(sample &a, T b) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static void Nor(sample &a, T b) noexcept
static void Sub(sample &a, T b) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void Xnor(sample &a, T b) noexcept
static void Mul(sample &a, T b) noexcept
static void Exclusion(sample &a, T b) noexcept
static constexpr bool IsComplexSample() noexcept
static void Mov(sample &a, T b) noexcept
static void PinLight(sample &a, T b) noexcept
static constexpr sample ToSample(float x) noexcept
static void SoftLight(sample &a, T b) noexcept
traits_type::sample sample
static constexpr sample ToSample(double x) noexcept
static void Min(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static constexpr sample LowestSampleValue() noexcept
static sample ToSample(int8 x) noexcept
static void Screen(sample &a, T b) noexcept
static sample ToSample(int16 x) noexcept
static void HardLight(sample &a, T b) noexcept
static void Not(sample &a, T b) noexcept
static void And(sample &a, T b) noexcept
static void Xor(sample &a, T b) noexcept
static void VividLight(sample &a, T b) noexcept
static void Dif(sample &a, T b) noexcept
static void Div(sample &a, T b) noexcept
static void FromSample(double &a, sample b) noexcept
static void FromSample(int32 &a, sample b) noexcept
static void Nand(sample &a, T b) noexcept
static constexpr sample HighestSampleValue() noexcept
static void FromSample(float &a, sample b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static constexpr const char * SampleFormat() noexcept
static sample ToSample(uint8 x) noexcept
static constexpr sample ToSample(uint32 x) noexcept
static constexpr sample ToSample(const Complex< T > &x) noexcept
static void Or(sample &a, T b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void Add(sample &a, T b) noexcept
32-bit IEEE 754 normalized floating point real pixel traits.
static void Min(sample &a, T b) noexcept
static void Or(sample &a, T b) noexcept
static sample ToSample(int8 x) noexcept
static constexpr sample ToSample(const Complex< T > &x) noexcept
static constexpr bool IsComplexSample() noexcept
static void HardLight(sample &a, T b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static constexpr sample ToSample(uint32 x) noexcept
static sample ToSample(int16 x) noexcept
traits_type::sample sample
static void Sub(sample &a, T b) noexcept
static void And(sample &a, T b) noexcept
static void FromSample(int8 &a, sample b) noexcept
static void Xnor(sample &a, T b) noexcept
static void Not(sample &a) noexcept
static sample ToSample(uint8 x) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void SoftLight(sample &a, T b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static constexpr sample FloatToSample(T x) noexcept
static void Xor(sample &a, T b) noexcept
static constexpr sample ToSample(int32 x) noexcept
static void Exclusion(sample &a, T b) noexcept
static void Overlay(sample &a, T b) noexcept
static constexpr sample MaxSampleValue() noexcept
static constexpr sample LowestSampleValue() noexcept
static void Div(sample &a, T b) noexcept
static void PinLight(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static constexpr sample ToSample(float x) noexcept
static constexpr const char * SampleFormat() noexcept
static constexpr sample HighestSampleValue() noexcept
static void Screen(sample &a, T b) noexcept
static void Dif(sample &a, T b) noexcept
static constexpr sample ToSample(double x) noexcept
static void Mul(sample &a, T b) noexcept
static void Nor(sample &a, T b) noexcept
static void Add(sample &a, T b) noexcept
static void LinearBurn(sample &a, T b) noexcept
static void VividLight(sample &a, T b) noexcept
static void FromSample(int32 &a, sample b) noexcept
static void Not(sample &a, T b) noexcept
static void Max(sample &a, T b) noexcept
static void FromSample(double &a, sample b) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static sample ToSample(uint16 x) noexcept
static void Pow(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static void LinearLight(sample &a, T b) noexcept
static void ColorBurn(sample &a, T b) noexcept
static void FromSample(float &a, sample b) noexcept
static void Nand(sample &a, T b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void Mov(sample &a, T b) noexcept
Base class of all pixel traits classes.
static constexpr int BytesPerSample() noexcept
static constexpr sample MinSampleValue() noexcept
static constexpr int BitsPerSample() noexcept
16-bit unsigned integer pixel traits.
static void FromSample(uint32 &a, sample b) noexcept
static void Div(sample &a, pcl::Complex< float > b) noexcept
static constexpr sample MaxSampleValue() noexcept
static void VividLight(sample &a, T b) noexcept
traits_type::sample sample
static void Pow(sample &a, T b) noexcept
static void SoftLight(sample &a, T b) noexcept
static void Not(sample &a) noexcept
static void Div(sample &a, float b) noexcept
static void Min(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static constexpr sample ToSample(uint16 x) noexcept
static void Div(sample &a, pcl::Complex< double > b) noexcept
static void Xor(sample &a, T b) noexcept
static void Nor(sample &a, T b) noexcept
static void FromSample(float &a, sample b) noexcept
static void Screen(sample &a, T b) noexcept
static void Pow(sample &a, float b) noexcept
static void PinLight(sample &a, T b) noexcept
static constexpr sample LowestSampleValue() noexcept
static sample ToSample(uint8 x) noexcept
static void Div(sample &a, T b) noexcept
static constexpr const char * SampleFormat() noexcept
static void Max(sample &a, T b) noexcept
static sample ToSample(double x) noexcept
static void Mul(sample &a, pcl::Complex< float > b) noexcept
static void Dif(sample &a, T b) noexcept
static void Pow(sample &a, double b) noexcept
static sample ToSample(float x) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static void Mul(sample &a, T b) noexcept
static constexpr bool IsComplexSample() noexcept
static void Pow(sample &a, pcl::Complex< float > b) noexcept
static void Div(sample &a, double b) noexcept
static sample ToSampleConstrained(float x) noexcept
static void Nand(sample &a, T b) noexcept
static void FromSample(int32 &a, sample b) noexcept
static constexpr sample HighestSampleValue() noexcept
static sample ToSample(uint32 x) noexcept
static void Overlay(sample &a, T b) noexcept
static void LinearLight(sample &a, T b) noexcept
static sample ToSample(int8 x) noexcept
static void Mov(sample &a, T b) noexcept
static void HardLight(sample &a, T b) noexcept
static constexpr sample ToSample(int16 x) noexcept
static void Mul(sample &a, double b) noexcept
static void And(sample &a, T b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void FromSample(double &a, sample b) noexcept
static void Add(sample &a, T b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static void ColorBurn(sample &a, T b) noexcept
static void FromSample(int8 &a, sample b) noexcept
static void Xnor(sample &a, T b) noexcept
static void Mul(sample &a, float b) noexcept
static constexpr bool IsFloatSample() noexcept
static void Or(sample &a, T b) noexcept
static constexpr sample ToSample(const Complex< T > &x) noexcept
static void Pow(sample &a, pcl::Complex< double > b) noexcept
static void Exclusion(sample &a, T b) noexcept
static void LinearBurn(sample &a, T b) noexcept
static sample ToSample(int32 x) noexcept
static void Sub(sample &a, T b) noexcept
static sample ToSampleConstrained(double x) noexcept
static void Mul(sample &a, pcl::Complex< double > b) noexcept
static sample FloatToSample(T x) noexcept
static void Not(sample &a, T b) noexcept
20-bit unsigned integer pixel traits.
static constexpr sample LowestSampleValue() noexcept
static sample ToSample(double x) noexcept
static sample ToSample(int32 x) noexcept
static sample ToSampleConstrained(float x) noexcept
static void FromSample(int8 &a, sample b) noexcept
static sample ToSample(int16 x) noexcept
static constexpr sample MaxSampleValue() noexcept
static void FromSample(uint16 &a, sample b) noexcept
static sample ToSampleConstrained(double x) noexcept
static sample ToSample(uint8 x) noexcept
static constexpr sample ToSample(const Complex< T > &x) noexcept
static sample ToSample(float x) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static constexpr sample HighestSampleValue() noexcept
static sample FloatToSample(T x) noexcept
static constexpr const char * SampleFormat() noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static constexpr bool IsComplexSample() noexcept
traits_type::sample sample
static void FromSample(int32 &a, sample b) noexcept
static sample ToSample(uint32 x) noexcept
static void FromSample(int16 &a, sample b) noexcept
static constexpr bool IsFloatSample() noexcept
static void FromSample(float &a, sample b) noexcept
static sample ToSample(uint16 x) noexcept
static sample ToSample(int8 x) noexcept
static void FromSample(double &a, sample b) noexcept
24-bit unsigned integer pixel traits.
static sample ToSampleConstrained(double x) noexcept
static sample FloatToSample(T x) noexcept
static constexpr sample MaxSampleValue() noexcept
static sample ToSample(uint32 x) noexcept
traits_type::sample sample
static void FromSample(float &a, sample b) noexcept
static constexpr const char * SampleFormat() noexcept
static sample ToSample(int16 x) noexcept
static sample ToSample(int8 x) noexcept
static void FromSample(int8 &a, sample b) noexcept
static sample ToSampleConstrained(float x) noexcept
static void FromSample(double &a, sample b) noexcept
static sample ToSample(uint8 x) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static constexpr bool IsFloatSample() noexcept
static void FromSample(uint16 &a, sample b) noexcept
static constexpr sample LowestSampleValue() noexcept
static sample ToSample(double x) noexcept
static sample ToSample(float x) noexcept
static sample ToSample(int32 x) noexcept
static void FromSample(int32 &a, sample b) noexcept
static sample ToSample(uint16 x) noexcept
static constexpr bool IsComplexSample() noexcept
static constexpr sample HighestSampleValue() noexcept
static sample ToSample(const Complex< T > &x) noexcept
static void FromSample(uint8 &a, sample b) noexcept
32-bit unsigned integer pixel traits.
static void And(sample &a, T b) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static void Pow(sample &a, T b) noexcept
static constexpr bool IsComplexSample() noexcept
static constexpr sample MaxSampleValue() noexcept
static void Screen(sample &a, T b) noexcept
static constexpr sample LowestSampleValue() noexcept
static constexpr sample HighestSampleValue() noexcept
static void FromSample(int32 &a, sample b) noexcept
static void Max(sample &a, T b) noexcept
static void ColorBurn(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static constexpr sample ToSample(uint32 x) noexcept
static void Mul(sample &a, pcl::Complex< float > b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static void Mov(sample &a, T b) noexcept
static sample ToSample(const Complex< T > &x) noexcept
static sample ToSampleConstrained(double x) noexcept
static void Min(sample &a, T b) noexcept
static sample ToSample(uint8 x) noexcept
static void Pow(sample &a, double b) noexcept
static constexpr sample ToSample(int32 x) noexcept
static sample ToSample(double x) noexcept
static void Mul(sample &a, pcl::Complex< double > b) noexcept
static void Div(sample &a, pcl::Complex< double > b) noexcept
static void Add(sample &a, T b) noexcept
static sample ToSample(int16 x) noexcept
static void Div(sample &a, float b) noexcept
static void FromSample(double &a, sample b) noexcept
static void Div(sample &a, T b) noexcept
static void Pow(sample &a, pcl::Complex< float > b) noexcept
static void Mul(sample &a, double b) noexcept
static void FromSample(uint32 &a, sample b) noexcept
traits_type::sample sample
static void Not(sample &a, T b) noexcept
static sample FloatToSample(T x) noexcept
static void Or(sample &a, T b) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static void Sub(sample &a, T b) noexcept
static void PinLight(sample &a, T b) noexcept
static void Nand(sample &a, T b) noexcept
static void Mul(sample &a, float b) noexcept
static sample ToSampleConstrained(float x) noexcept
static void Exclusion(sample &a, T b) noexcept
static void Xnor(sample &a, T b) noexcept
static void Mul(sample &a, T b) noexcept
static void HardLight(sample &a, T b) noexcept
static void Div(sample &a, double b) noexcept
static sample ToSample(int8 x) noexcept
static void Not(sample &a) noexcept
static void Nor(sample &a, T b) noexcept
static void LinearBurn(sample &a, T b) noexcept
static void Overlay(sample &a, T b) noexcept
static sample ToSample(uint16 x) noexcept
static void Pow(sample &a, pcl::Complex< double > b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void SoftLight(sample &a, T b) noexcept
static void Pow(sample &a, float b) noexcept
static void Div(sample &a, pcl::Complex< float > b) noexcept
static void LinearLight(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static void Dif(sample &a, T b) noexcept
static void FromSample(int8 &a, sample b) noexcept
static sample ToSample(float x) noexcept
static void FromSample(float &a, sample b) noexcept
static void Xor(sample &a, T b) noexcept
static constexpr const char * SampleFormat() noexcept
static void VividLight(sample &a, T b) noexcept
8-bit unsigned integer pixel traits.
static void FromSample(int8 &a, sample b) noexcept
static sample ToSample(int16 x) noexcept
static void FromSample(uint8 &a, sample b) noexcept
static void Pow(sample &a, pcl::Complex< float > b) noexcept
static void Add(sample &a, T b) noexcept
static void Div(sample &a, float b) noexcept
static sample ToSample(uint16 x) noexcept
static void Min(sample &a, T b) noexcept
static void Exclusion(sample &a, T b) noexcept
static void Mov(sample &a, T b) noexcept
static void Div(sample &a, pcl::Complex< double > b) noexcept
static void LinearLight(sample &a, T b) noexcept
static void FromSample(int16 &a, sample b) noexcept
static void Overlay(sample &a, T b) noexcept
static void And(sample &a, T b) noexcept
static sample ToSample(const Complex< T > &x) noexcept
static void Mul(sample &a, float b) noexcept
static constexpr sample ToSample(uint8 x) noexcept
static void Sub(sample &a, T b) noexcept
static void FromSample(double &a, sample b) noexcept
static sample ToSample(double x) noexcept
static void Xnor(sample &a, T b) noexcept
static constexpr bool IsComplexSample() noexcept
static void Nand(sample &a, T b) noexcept
static void FromSample(Complex< T > &a, sample b) noexcept
static void Div(sample &a, double b) noexcept
static void Mul(sample &a, pcl::Complex< double > b) noexcept
static void FromSample(float &a, sample b) noexcept
static void Mul(sample &a, pcl::Complex< float > b) noexcept
static void Div(sample &a, T b) noexcept
static void Pow(sample &a, pcl::Complex< double > b) noexcept
static constexpr const char * SampleFormat() noexcept
static void ColorBurn(sample &a, T b) noexcept
static void VividLight(sample &a, T b) noexcept
static void Not(sample &a, T b) noexcept
static void Div(sample &a, pcl::Complex< float > b) noexcept
static void Screen(sample &a, T b) noexcept
static void ColorDodge(sample &a, T b) noexcept
static void Xor(sample &a, T b) noexcept
static sample ToSampleConstrained(float x) noexcept
static void HardLight(sample &a, T b) noexcept
static void Mul(sample &a, double b) noexcept
static void Or(sample &a, T b) noexcept
static sample ToSample(int32 x) noexcept
static void FromSample(uint16 &a, sample b) noexcept
static sample ToSample(float x) noexcept
static constexpr sample HighestSampleValue() noexcept
traits_type::sample sample
static void LinearBurn(sample &a, T b) noexcept
static void Pow(sample &a, T b) noexcept
static void Nor(sample &a, T b) noexcept
static constexpr sample LowestSampleValue() noexcept
static void Dif(sample &a, T b) noexcept
static constexpr sample MaxSampleValue() noexcept
static void SoftLight(sample &a, T b) noexcept
static constexpr bool IsFloatSample() noexcept
static sample ToSample(uint32 x) noexcept
static void FromSample(int32 &a, sample b) noexcept
static sample FloatToSample(T x) noexcept
static void FromSample(uint32 &a, sample b) noexcept
static void Pow(sample &a, double b) noexcept
static void Not(sample &a) noexcept
static void Max(sample &a, T b) noexcept
static constexpr sample ToSample(int8 x) noexcept
static void PinLight(sample &a, T b) noexcept
static void Pow(sample &a, float b) noexcept
static void Mul(sample &a, T b) noexcept
static sample ToSampleConstrained(double x) noexcept
Complex< T1 > Pow(const Complex< T1 > &c, T2 x) noexcept
T Abs(const Complex< T > &c) noexcept
Complex< T > Round(const Complex< T > &c) noexcept
int RoundInt(T x) noexcept
int TruncInt(T x) noexcept
constexpr const T & Min(const T &a, const T &b) noexcept
constexpr const T & Range(const T &x, const T &a, const T &b) noexcept
constexpr const T & Max(const T &a, const T &b) noexcept
int64 RoundI64(double x) noexcept