From 08cc8443432d46bfb8aaedf2036020f3d989cee9 Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Tue, 19 Sep 2023 14:38:01 +0200 Subject: [PATCH] MODIFIED: simplified palette generation code + added several missing derived palettes + legacy names/renames --- doc/images/palettes/palette_AFMhot.png | Bin 177 -> 166 bytes doc/images/palettes/palette_BBlRdYe.png | Bin 361 -> 369 bytes doc/images/palettes/palette_BWprint.png | Bin 209 -> 197 bytes doc/images/palettes/palette_BlGnRd.png | Bin 0 -> 162 bytes doc/images/palettes/palette_BlGnYe.png | Bin 0 -> 348 bytes doc/images/palettes/palette_BlMaYe.png | Bin 209 -> 196 bytes doc/images/palettes/palette_BlYe.png | Bin 353 -> 346 bytes doc/images/palettes/palette_BrGr.png | Bin 0 -> 310 bytes doc/images/palettes/palette_GnRdVi.png | Bin 231 -> 230 bytes doc/images/palettes/palette_GrBr.png | Bin 0 -> 311 bytes doc/images/palettes/palette_HSV.png | Bin 194 -> 207 bytes doc/images/palettes/palette_Matlab.png | Bin 184 -> 180 bytes doc/images/palettes/palette_OrPu.png | Bin 0 -> 355 bytes doc/images/palettes/palette_RYGB.png | Bin 276 -> 277 bytes doc/images/palettes/palette_RdGnBu.png | Bin 0 -> 160 bytes doc/images/palettes/palette_ViRdGn.png | Bin 0 -> 227 bytes doc/images/palettes/palette_YeBl.png | Bin 351 -> 339 bytes doc/images/palettes/palette_YeMaBl.png | Bin 216 -> 196 bytes doc/images/palettes/palette_YeRdBlB.png | Bin 0 -> 369 bytes doc/images/palettes/palette_blue.png | Bin 163 -> 154 bytes doc/images/palettes/palette_bluered.png | Bin 158 -> 157 bytes doc/images/palettes/palette_bluewhitered.png | Bin 350 -> 335 bytes doc/images/palettes/palette_gray.png | Bin 166 -> 155 bytes doc/images/palettes/palette_green.png | Bin 162 -> 154 bytes doc/images/palettes/palette_invAFMhot.png | Bin 178 -> 168 bytes doc/images/palettes/palette_invBWprint.png | Bin 218 -> 199 bytes doc/images/palettes/palette_invHSV.png | Bin 193 -> 203 bytes doc/images/palettes/palette_invMatlab.png | Bin 186 -> 180 bytes doc/images/palettes/palette_invRYGB.png | Bin 276 -> 280 bytes doc/images/palettes/palette_invautumn.png | Bin 0 -> 155 bytes doc/images/palettes/palette_invblue.png | Bin 163 -> 157 bytes doc/images/palettes/palette_invbone.png | Bin 0 -> 281 bytes doc/images/palettes/palette_invcool.png | Bin 0 -> 154 bytes doc/images/palettes/palette_invcopper.png | Bin 0 -> 262 bytes doc/images/palettes/palette_invcyan.png | Bin 155 -> 158 bytes doc/images/palettes/palette_invgray.png | Bin 165 -> 159 bytes doc/images/palettes/palette_invgreen.png | Bin 163 -> 157 bytes doc/images/palettes/palette_invmagenta.png | Bin 153 -> 156 bytes doc/images/palettes/palette_invocean.png | Bin 184 -> 172 bytes doc/images/palettes/palette_invrainbow.png | Bin 315 -> 321 bytes doc/images/palettes/palette_invred.png | Bin 164 -> 157 bytes doc/images/palettes/palette_invseismic.png | Bin 0 -> 183 bytes doc/images/palettes/palette_invterrain.png | Bin 0 -> 258 bytes .../palettes/palette_invtrafficlight.png | Bin 219 -> 226 bytes doc/images/palettes/palette_invyellow.png | Bin 155 -> 158 bytes doc/images/palettes/palette_ocean.png | Bin 185 -> 177 bytes doc/images/palettes/palette_rainbow.png | Bin 313 -> 311 bytes doc/images/palettes/palette_red.png | Bin 163 -> 154 bytes doc/images/palettes/palette_redwhiteblue.png | Bin 347 -> 339 bytes doc/images/palettes/palette_stepsBlGnYe.png | Bin 0 -> 218 bytes doc/images/palettes/palette_stepsBrGr.png | Bin 0 -> 209 bytes doc/images/palettes/palette_stepsGrBr.png | Bin 0 -> 209 bytes doc/images/palettes/palette_stepsOrPu.png | Bin 0 -> 225 bytes .../palettes/palette_stepsinvseismic.png | Bin 0 -> 178 bytes .../palettes/palette_stepsinvterrain.png | Bin 0 -> 198 bytes doc/images/palettes/palette_stepsseismic.png | Bin 0 -> 180 bytes doc/images/palettes/palette_stepsterrain.png | Bin 0 -> 198 bytes doc/images/palettes/palette_trafficlight.png | Bin 216 -> 228 bytes doc/images/palettes/palette_whitecyan.png | Bin 155 -> 157 bytes doc/images/palettes/palette_whitemagenta.png | Bin 155 -> 157 bytes doc/images/palettes/palette_whiteyellow.png | Bin 155 -> 157 bytes doc/images/palettes/palette_yellowmagenta.png | Bin 158 -> 157 bytes lib/jkqtcommon/jkqtpbasicimagetools.cpp | 1508 ++++------------- lib/jkqtcommon/jkqtpbasicimagetools.h | 74 +- lib/jkqtcommon/jkqtpmathtools.h | 10 + 65 files changed, 392 insertions(+), 1200 deletions(-) create mode 100644 doc/images/palettes/palette_BlGnRd.png create mode 100644 doc/images/palettes/palette_BlGnYe.png create mode 100644 doc/images/palettes/palette_BrGr.png create mode 100644 doc/images/palettes/palette_GrBr.png create mode 100644 doc/images/palettes/palette_OrPu.png create mode 100644 doc/images/palettes/palette_RdGnBu.png create mode 100644 doc/images/palettes/palette_ViRdGn.png create mode 100644 doc/images/palettes/palette_YeRdBlB.png create mode 100644 doc/images/palettes/palette_invautumn.png create mode 100644 doc/images/palettes/palette_invbone.png create mode 100644 doc/images/palettes/palette_invcool.png create mode 100644 doc/images/palettes/palette_invcopper.png create mode 100644 doc/images/palettes/palette_invseismic.png create mode 100644 doc/images/palettes/palette_invterrain.png create mode 100644 doc/images/palettes/palette_stepsBlGnYe.png create mode 100644 doc/images/palettes/palette_stepsBrGr.png create mode 100644 doc/images/palettes/palette_stepsGrBr.png create mode 100644 doc/images/palettes/palette_stepsOrPu.png create mode 100644 doc/images/palettes/palette_stepsinvseismic.png create mode 100644 doc/images/palettes/palette_stepsinvterrain.png create mode 100644 doc/images/palettes/palette_stepsseismic.png create mode 100644 doc/images/palettes/palette_stepsterrain.png diff --git a/doc/images/palettes/palette_AFMhot.png b/doc/images/palettes/palette_AFMhot.png index efe1a336509dd9b254a2d6dc830beafb9cdaab5c..bdaa575fa020582d5a4769bf5cb5668a3b357c33 100644 GIT binary patch delta 116 zcmdnUxQuavWp0G0i(^Q|oVQmFayBq9FmGJ-`}`Vjj;84j|7-7Ve7kSk&E3EM9FYJ1 lv+@61nF*>40&2veZw%dQS!Dh+@~&n80#8>zmvv4FO#q7!Chq_M delta 127 zcmZ3+xRG&!Wks^5i(^Q|oVQmt@-`TVI6MAV*!ch01}CmAj{BbPV)uG}TB9<(cGpa1 zzc+8}9vnUw#%J+y|5}EvEDT+o3?jk|8fpvyJ`4+HFgO@8HY71I9L1E_DBih|MaKF3 RwoV2h@O1TaS?83{1OVBbEye%< diff --git a/doc/images/palettes/palette_BBlRdYe.png b/doc/images/palettes/palette_BBlRdYe.png index 0c16c21d9b9f4e03fbb30edf0e72aafc8788f3b2..502404a7774da014c7384373f9b7bb4a963a735b 100644 GIT binary patch delta 321 zcmaFK^pRk} z6Vo(#HaVLYk}no%@oOE9d+OGIHCQ6xF}Lla|BGaUG;9}f-&cHfaDDCFy(>JXIyp|6 zA==`^eQCFK-I2cJOwRplma;|&6rV|3a@POh^Q*?q%RUHSYLPfx-+$o78Mh_kNi4k` z*P|X@yq5o~<%0Km^+%iwZ}%Kq|NH)3?_B#vhrkcty5yDD{%_y?)83Y8D*x}ISyNZ< zzoWnWrswUy$0L8cS?;|!=jXQD=dYZ%epOq4^J;xY?z{QV%YRQ6>oLqMWRRFF!QNol hiOI0S6v7nw$!ufeAghq*e4GIYJYD@<);T3K0RX>&k!k<{ delta 313 zcmey!^pa_UWxcegi(^Q|oVQaP^9~ybFt<;7EA#vRayP$6a(efAYR;+u{7ZKKljluK0;zN4OSB zi9|gydm^^8G3rik$Lo3bzg=G*zIa8W!>#}Ot3Uq!BR{Wblm215PcQfVG0llE*)78&qol`;+02&~SvH$=8 diff --git a/doc/images/palettes/palette_BWprint.png b/doc/images/palettes/palette_BWprint.png index 250f9e7260289c8ec9ba9cc4ba7ed04d03d09b1b..8c8d7d3d8f1f3652a0ff601f88e5e8cea86b1166 100644 GIT binary patch delta 111 zcmV-#0FeLD0mT83IZSs+L_t(|obA*x4gw$)M8QRVsrSDv+SzES#$;!b4FvkPlH8L? z>(<)YJ1?7gefy99lf6%7&h!3mzy4qAB(d*qlH8J9KXzUM)Dn@DC>R0&#U6m4gB0EGX=0nq`FIa`BCL_t(|obA-X3c@fHMA6ZNuI&H+tQc4Bq!cP{<{WsWG%wqG zOR|!YWY*3YIh;9<@Bh2AGUqE}9M9REZF^pN|M^bLZ)bh^HocQgB*ViiHraM002ovPDHLkV1lUzH~Rnp diff --git a/doc/images/palettes/palette_BlGnRd.png b/doc/images/palettes/palette_BlGnRd.png new file mode 100644 index 0000000000000000000000000000000000000000..fb86e0461d53c67099f5fd5544125078cacc8af5 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z4Dobv45^s&_6nn5g8{>l4f6kV4+~s+vQDgOTXp%pw>4bf?r7e+`Hkm<5d()Yap*VW Yg8~NK>bY<30L^FcboFyt=akR{0NCs*RR910 literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_BlGnYe.png b/doc/images/palettes/palette_BlGnYe.png new file mode 100644 index 0000000000000000000000000000000000000000..620f65807e1ffc62ddd2afb1fd1f2dc1d998142a GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j|1 z#pmhb7*a9k?UdVvEd~NC>C@(WAF8zc@A8D-^SBq2`i8rqSKbykSQ-BN^T*6{l8*JS zr8^$0ZeKG&uG-kX^vjaXUsFA|iTHi|;aeE}O6qg^oxWd_|IL_N_+-~rrA)U=U2iRw zGN1n3^0};kruC)A&$U%%i91BhEq+93?gjI3>rLa3;_~63=0e-7#tD}7#a>GFfg`~nlz0FD literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_BlMaYe.png b/doc/images/palettes/palette_BlMaYe.png index 60822868fbe02abdbdcdfb0caf642f604643f9e7..2a69932d97868fb54a4b448935858bb7a6d91ca4 100644 GIT binary patch delta 113 zcmV-%0FM9B0mK22IZ<{=L_t(|obA**3IZ?`MA6Bo)cx-^+SsX`iZJKE5XkHANODVd zS~s$?lBew#e}8eGCu^SU$NO%-zK?kl`|ie0a!qpi*gFH%5&$SB08mVkkR=uFc))`k T8?DDB00000NkvXXu0mjfZ;v#g delta 126 zcmV-^0D=F+0nq`FIah;8L_t(|obA-H3c^4XMA1ohu`>Vvvtq35!~`NXa}GQ=v(0dz=%9F7g4y#N3J07*qoM6N<$f;sFt*8l(j diff --git a/doc/images/palettes/palette_BlYe.png b/doc/images/palettes/palette_BlYe.png index ede1d8874dcaa577bd8de158185fa15cd97676a5..0aef6515ec8fe8c84bbc1ce5b70582b420139ac8 100644 GIT binary patch delta 298 zcmaFJbc<<%Wj&9li(^Q|oVQa>mmW6YVPT&z_qlVI*MC<*%a$byvx>M5oOAu5GtFwP z2N14<;2BGJO2Z?GBsaTnsNWR)LflVo93Ckx4heq{qs^k^Y@>3 z>l=K1KHb&)_wCp@aXY^;NZ&KOZ&g}rUv{(p+Q(CRxw9*;Z@#zfWiPASy2BaZ=_X#Z0;bKtaTFfA@$beXeGOFtR4S&zbuJ5{anE?nqUHx3v IIVCg!0C${-k^lez delta 305 zcmcb`^pI(SWxcSci(^Q|oVQb~^NtwsxU}El-Q@ai%I|nDAH|zOsnQ7eouK{OjTt6K9}zjg*9q3z4H{yPr9A=G3x(gpVnV-MmtV`i{ok&B{a5|uE!V!yeY@)V-JIR)SKrN;J~!*7?9cs6XZ|}k?R(sp+zmvv4FO#qlQjs^e# diff --git a/doc/images/palettes/palette_BrGr.png b/doc/images/palettes/palette_BrGr.png new file mode 100644 index 0000000000000000000000000000000000000000..f9fd5fcaafdcb44dbd7e0294efb10cebbb27b985 GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zeBtTh7*a9k?UjQ;hYfgI9>x|vep{g*w^OWr*UGmEK@V2^pMBD0+R~D$$ojfH%XM#t z-6;CgH{MBTjWlDXfG%`@A5Jb#TX|KEQ#;r@F+ zyxtsKd(Zk^^1G#Lrd(aJc;Ec>uOH{UeINI$ZP~6=JNc(I`(8Y?FWbKN+Ar&?n{?lQ z{`>aPzvX{#SM0xea^L44>u-K9UU_}y6IaW&I3K7srr_Id88x@*OhZVR6{~_Hd=;)4oYtnDjEzmz>y`{B%cbzt!(G zzixk?v-d0izx}_DXXSq>OW*b?J%91st7}&8UR51xzjJ-s{W-Z8``@kJwJTrzbM2&H^%qrK<{{O3b?vs;oPp`f;zx`kzZ`t`; zuW$P*?%#g5ecu1&EDB<*3@nQo8WKbp1bUblngSUd47eCL+!z@S>T574NMM!y#wO<6 VG^c4&>~01i@O1TaS?83{1OT4MPeT9z diff --git a/doc/images/palettes/palette_GrBr.png b/doc/images/palettes/palette_GrBr.png new file mode 100644 index 0000000000000000000000000000000000000000..e2982de16faa9ede9b2ddab623c4a54d971971a9 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zeCg@p7*a9k?G?wq!v-9!583yoPcQz@EwbxFiPPJNz~$cm{8uTMsl?iDo?q=XY39i@ zPu?w_b@Gn;++USxGylJjn_D<}w*S```Cs3Z*Y7sIdtdL}_TOnmH!s!~rrqD?KS?w7 z)b=`?`0x4WSN^^G)VeQU+j*v8)|7o$E~dXsetG_!k#kpRzIF6J=VPzGTbw%`Irrkp zn>NeOzWZ@+@tyf+QnZxZ&juRD?fv&|+Rl~n<)1&_of5-vONpW37ze`wLneld9tH*} dWn#D+)hFH$7q#RN{15argQu&X%Q~loCID5bg*^ZO literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_HSV.png b/doc/images/palettes/palette_HSV.png index 4a0887364977edb7f37eeee740a859b688b14d07..a7f8ba5fdd3c7ca5ae1b6f93385a0ee7ba8eb727 100644 GIT binary patch delta 121 zcmV-<0EYj<0nY)DIaq;7L_t(|obA*x3WGoZMA1pa>KWJ}!4$^33}`&y@87gN=>)3{Xn|pqPHwyYBz%(Yl8j_00000NkvXXu0mjfO(r?E delta 108 zcmV-y0F(dE0m1>0IY@L#L_t(|obA-X5yCJ413@K$^j~iXm=^pqjCN<#fF8GvWaOFT z{QZ3%$(8@u$g%#gnO*1lvnIB^mp?VVJ@@*av~DE0*-EQB8LSw_nM O0000-IXY%ZL_t(|obA-P5x^h-13`f)+=b((3=xP0f3*PpFfP*8~^|S07*qoM6N<$f+V6U AQ~&?~ delta 98 zcmV-o0GIYMelL_t(|obA*x4unt)LqP+-*jsaL3J@G4D|tq89i@3&a=yvR z=#JU*(>ro!4egg}?Doo&-09sPyuSyiB>+%Nk#i^&eID4Lo-|KSXaE2J07*qoM6N<$ Ef*S8Bj{pDw diff --git a/doc/images/palettes/palette_OrPu.png b/doc/images/palettes/palette_OrPu.png new file mode 100644 index 0000000000000000000000000000000000000000..5439031f95c16380c883192afe3aaa2710c20b40 GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j|1 zCF<$o7*a9k?G*1xM+`WeSuK6yGx$uWo6Tx{%VPcVCI;K#n_AKGtS`Dv9LZhQRo%L$Ch*R^1b&v&u;tY zwmZp8A?^L_e{YsnTwGVXsZlV&WWwX#ecI38m&~co+m);Kw6c7{Ulk$82E%)*Y4-M+ z9y!1EsasUdUUqzS8;gun$EFhuEgC&M4jqTcWBg%!xkt&qeff=8P#Ai;`njxgN@xNA DXi}UT literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_RYGB.png b/doc/images/palettes/palette_RYGB.png index eba0445ac1fb487669833d9dc788affc42d0d1c4..12bfcc01d81fa6a754bc3a16c7239f6243118799 100644 GIT binary patch delta 228 zcmbQjG?i(BW&Lqa7srr_Id88x3Nb12xLjl_`Y+7AV@9B0bJ9z_|Dj8Tgs#n9axZk% zyVS#Pt}g$*eyVxd&6(x9jF-oR9@BE)UO9iYSJjzqH}0o-2b~Q1ST!kU#{5@zq9=8U z)tB5mZXdk;zmvv4FO#lhi BWFPF1?(*-ci~hYVw%NIN`dme_F*Dy#K0f`c3)! zZsGF#!u9I^beIyl85nv585#_k7!2GP7>;o;9FSmSkWgk|NM>P3=)o%ao1v@mq}+i& REkIQa44$rjF6*2UngCr5Xchnf diff --git a/doc/images/palettes/palette_RdGnBu.png b/doc/images/palettes/palette_RdGnBu.png new file mode 100644 index 0000000000000000000000000000000000000000..417da493d89a91ba123e537640b690ea6681e0fb GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z4Dxhw45^s&_6nn5g8{>l4e~#>pAoq9WSv;myR!G&-mkdzZgI-{d5n>442eV{`_HV5 Vx{B{vfL1Xuc)I$ztaD0e0ssMCD!~8% literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_ViRdGn.png b/doc/images/palettes/palette_ViRdGn.png new file mode 100644 index 0000000000000000000000000000000000000000..a4b0cd84f86a35a60f0b386d9f0c20727141a475 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zoa*V~7*a9k?Gi(^Q|oVQbUiyk)MVNQH+AJXPEar%*zE)TJ<8^s^QCQoEhG(GlA zZ+h8IGtb>2`_}&Z9<%#NbiDgs{cp8<>#KgR$$ftFdiMS2RiD0u`S04iZ$@QBe)+mt zMep8qyyvoe9BX&a`c?Dy-m+QMbJ+c*tIeyTtAAYR|5dpE>aO|a_48i6UNqZgO=h(J z^PEpcrMsTR+HTpAZK%EbtzPM_*Xs}cyTG5$EyZme_S`jlX}IZDJD$Tf*}ioLlOr=!w~@nhE7EW1|eq#29-7j1`i%g d1u_s7pP9WvgLEIzmvv4FO#r^kfR+FN delta 303 zcmcc2bf0O0Wxb%Mi(^Q|oVQbUmO2{>Fdw{MAN=lQ<6j+JnVPOBxiV(!$rGv>Qd-hZ zmrXA5%qp^f{_Ae>tdl$aeyiKZU#^|IHfs65FMZQz>h=ELJ-1Z9Uj6?X$={jVGWn{W zoByi)^w#cY{PDU=R(m(UTlZh$bLjo*!WXLk&*x^`epheTcR0_a{^YM}^=Ef?*S~*n zoGW$w*5wa7OK*BlzJ8(Q-uq*(cE3>1U9~(mclY<4myyoGw`00O+;zU!xz+2(ecfT+ zx-@nU=OmYWfBtfFPHszbo8LF4?SFP?>vPM?@4fBaT$j_K?>9G@vL?G*KD_(K&Eu+d eYvz%GE)_dZza}m*R`q5800000sJ%JQwfk$L90|Va?5N4dJ%_j|1 zrR?eA7*a9k?UbEGhYbXr=b!uYfBv$ou1hX>C8bzOUhjVXkl}$|=ne;E#oPmI`cZQ4 zPS39V>2Uh%zHi@e&dmOsy-fSR_2pdkqP^dX!e6e>e^D0x{_fwuz4!Li&#He^xpz9l zyK31>9KW2T1Rqa5?5!LU*Awve-DkzL!_IO7%q?Dj*YPZnyLkNEL+b_od*AK3UCaJT zAoq#b%MZRk%D!)LXujf-_o$w8ZNJFBUsDgi^jJD8r^9KXLhi)x!7Dy{CGPzxy75ii zLLHH5+oNVEpI@%O{QmiG3$D+Mm>D@Ua>mRVKhl;Rm6$9h-eA~S$S5&cf-J@i`KkW1 U^mxN##X%wJ>FVdQ&MBb@0I*h`CL) delta 113 zcmbQmxR`N*Wmc%Ci(^Q|oVQmt@*Xf?IBcN)|NotN7nzh8-_I-AW_x>^toOTr51MPY iS}S-nDEJVE-mpIGVv^IJ^xKjF2s~Z=T-G@yGywp0O(h5b diff --git a/doc/images/palettes/palette_bluered.png b/doc/images/palettes/palette_bluered.png index a65af8ae0778e662c9b7c2cd860cac0c34e09d44..6871e708270313bde41e3e6bd3b65fd5974bf146 100644 GIT binary patch delta 107 zcmbQoIG1sPWs1M2i(^Q|oVQmPc@H=U9NzHnNAW(!PTf|gdu7}2&RY_4Kkt5n4s(M6 bacF~l5j&%9;@bne7=Xaj)z4*}Q$iB})}bZ` delta 108 zcmbQsIFE6HWom$@i(^Q|oVQmPc@G#c9NzHmk6}K$P&8NToVR;7@7}DgdG#Cb2_ps$ cW8%CU7Mz?=?p;N>FVdQ&MBb@0C^}K`v3p{ diff --git a/doc/images/palettes/palette_bluewhitered.png b/doc/images/palettes/palette_bluewhitered.png index d3d36b4e1fdf43659b9cb328ff30849103515336..1b7216cf7d30d9440ae098852e61c198e0456c09 100644 GIT binary patch delta 287 zcmcb|be?H~Wj&*(i(^Q|oVQm3`(aLM|Li#hkDI-6 zHm&>nXPL^$Nx463ju&iuTJbLXmHhYq-|z2V*s^*4;jk9bZQCreq6NeAH;abNpPlx5 zZrjaD`<&d%YQ|I&NYCi{t&SA5Tf)X({PfqUtkw~6`h zkB0PDAKxxtc6HX2wfl=#6|cPhFYi(^Q|oVQaP^H>ylSWeHI{-n4vcAtb*JHz9dv2WdW?(%lJQIc#? zT2oWk+0dbIZQjy8g-<)rU1}CDUsYGN<8^AD+XTs!mHiw>>G5BZuV1!*{kW|D>hVwa z(qzTouU!9gf4trEH}%)*Uiok3m?U1lT<)pO<7?u!4K6Ir6FBPX!xwqW^KAO2W#{s$ z`ucRsS)04J)!w%DU=hkVAhDqF*|`gA_rGRdV*cyC&8*E?>lg0bT=jC1;g<(j|6P|} z|LW)CIiJs#{>%C3RK5LQy*Q&oQcq?#^MM)1EEsw+dx&AEV<iwwv56Q>w}z|+;wWt~$(697%u9*qD1 delta 116 zcmbQuxQuavWp0G0i(^Q|oVQmtaxxeSux#A=`~A=TJnYH`pRuzSZ>zmsc5dT?cYDw0 lZ)pE7KS7m2K#e%`jk$Fvi%gNv(KQS};OXk;vd$@?2>`TuBuW4P diff --git a/doc/images/palettes/palette_green.png b/doc/images/palettes/palette_green.png index 6f0694e704135055e6ae8b782e3687365c6e6646..dbb63cf5143d6b2f8023425e2b43ca897e799dd2 100644 GIT binary patch delta 104 zcmZ3)IE!(DWulL#i(^Q|oVQmPc^MQK4sU3#Kd+FIYs77R``$UVmDgn_q%sJk5r@7p YK51o=^PKckmjMVoUHx3vIVCg!0LGmjM*si- delta 112 zcmbQmxQKCrWoC${i(^Q|oVQmt@*Xf?IBcN)|NotN7nzh8-_I-AW_x>E^2xjMH5<;C gv8Qk{v=E8*KI&wWTewfmgaHUVUHx3vIVCg!0D-P16aWAK diff --git a/doc/images/palettes/palette_invAFMhot.png b/doc/images/palettes/palette_invAFMhot.png index da21532e213fcea5d329a249228ee3479c1fe76b..a8ababa4105978cd9945a241d0dc216992cf926f 100644 GIT binary patch delta 118 zcmdnQxPozlWqy>Wi(^Q|oVQmt@-{dKFduCG7wzUQ%%WfBR`f1o{oT7W)89OnEqIu3 m{ov61GX4pw3<7Gzp>IrcwlnB;ce@2L0D-5gpUXO@geCy3Mk8zh delta 128 zcmZ3%xQTIsWo3$|i(^Q|oVQmTxf&b3IZ_{M8S6Me_LH9d^dvVY*mD=f+oyl8{TDR zCb=cK=5yyta@ZF)b7b%5)_VPZ-*4}8+FIv-|8PIEAMdquM}S(9q9T#22^QELmTUYU T05|yV00000NkvXXu0mjfvj{X- delta 160 zcmX@kc#Cm@WqpsQi(^Q|oVQmFay11oxLh>+^?&}>&^_(CF)UL>c4QbnKd|6Mv3mK< zZMojpRJPab|5udeYcwe)Zd*-7TDsZueTMVCyIWfo?~nJd{a=@Ma*pL4iR1786{h_U zk2Wvn4De=HFoVItkg*|&iQy;vMbT`ShM2{Ey^cPMWOy2^W3$`tyZ7ob-gb1gIsEiXk8|0f1rx e0L26ViroQfH-jErJJTTm0000Xs5bKCM=f7Rsn&+@zG_D=QywUL<|k(>_}u^%HWgdQM diff --git a/doc/images/palettes/palette_invMatlab.png b/doc/images/palettes/palette_invMatlab.png index ba087242d227322b70f0b1a0093a0b36023af027..96317df26a87363019b6a1bab6603423f994b2bb 100644 GIT binary patch delta 94 zcmV-k0HOc70ki>-IXY%ZL_t(|obA-H5r8ld13}rQa0&-Z84k2Nqxe6%aVL8vxeo5= z@x$9|IRF3v07*qoM6N<$g0liB AQ2+n{ delta 110 zcmV-!0FnQ+0lEQ@IYDemL_t(|obA-R4S+xpLqYQi=$f_(KoC&G2A+`|-(K>TGkNzU zlgl=I!0_&DxwDV#$}#r#^MAf~PsWc}1Jn|cfF2@D0HBxvKrsP;VgdlgK3m$Lo-z-( QSpWb407*qoM6N<$g6fek(EtDd diff --git a/doc/images/palettes/palette_invRYGB.png b/doc/images/palettes/palette_invRYGB.png index 2768424c00704d7c1823170b0d1b719300120ad7..a6c75ceb004cf551787102641ab9aef2f2a0dc09 100644 GIT binary patch delta 231 zcmbQjG=ph^W&J5n7srr_Id88VLM z%X^7;8}BFYDBt^K_r@*vomb`lTmI#D**n!Gw>D)xahHE~>Dlkgd*u?oU)&V3`O3Fh zXSHkRq`zN%*M4Q&dE*?Q`Gs#v;x7q-yxY zWu?DA*FW{WS7Ckc+`i9l^Uqc$&KLWZxv>9p&h#%On>K%0^K0JuUAtya-u3#|{Ga9P z?B4u(cenTdyPO-L)7Qv;|GREm;`f)X&s?u{Wtq#b+W+!&-}WrmP2n;7XNCW=SYLBK zYtLHgeDixLj2ztz3{1)l4F@0sJ%JQwfk$L90|Va?5N4dJ%_j{M z^!0Rc45^s&_6j5K0SAG@8}j~G-e>OAZFSnW`)=OkE3f4zq%sJk5r@7p6zeeRI$oRM Q1vHq!)78&qol`;+0B;E=ivR!s literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_invblue.png b/doc/images/palettes/palette_invblue.png index 7c47fdc31dda2a8bf129a01732a80f4f3976fe9e..cc95f966f7286790b6ef295fe2eb791c52a3cf45 100644 GIT binary patch delta 107 zcmZ3?IG1sPWs1M2i(^Q|oVQmPc^eo6j%;B5KdZ83jc;1w`LgY`xBY@vy_KDi${>(N b9QwxG@!`KbPtKWC1|aZs^>bP0l+XkK-!vii delta 113 zcmbQsxR`N*Wmc%Ci(^Q|oVQmt@-{dyFmF8Y&-il>0sJ%JQwfk$L90|Va?5N4dJ%_j{M zJniY?7*a9k?UmDf%?3O!7c>9=pKTjEp=&}*`<2+|a-58XNoUgH?wy#FvpQ#I?A814 zUrk%H`q#DOC~F(29^!=8M>Yr>m@2tVOKr*hZ_UKK@J852}TAMWrl_X76ySHtdhSOywvvDZZzQ74D=R* Mr>mdKI;Vst0A5;gmH+?% literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_invcool.png b/doc/images/palettes/palette_invcool.png new file mode 100644 index 0000000000000000000000000000000000000000..1690ee22aa1b7046ec7dee80ac8ea483a3b65fa6 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z^zn3Y45^s&_6j2}g8|0@gB|tfV@}*k5!+^7zTJ3I)n3L;JPe13M0U;>nRH~f9=-%L Om%-E3&t;ucLK6UdEh?)3 literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_invcopper.png b/doc/images/palettes/palette_invcopper.png new file mode 100644 index 0000000000000000000000000000000000000000..1a08144ca33c984f35e3a3e3bdc0fd192caa5578 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z+~Mis7*a9k?G;D9W&;7|!0qDCEAD8$TNLS{te~;sbG>wm%LNVPpO0%d=Xg%aIr%qo zvufs~`!?mz?GKl4yYlAWulc#FBR6@;?Xy1n_fG1&=eK6)n)(*a{A{q_a{Jn__e-BV z-PvyG|GD}1+_SOYcNgv7yz_P4^k;Uro*%7yfA(*Vn)fd*2OTa34mU=IgBlD9608g? riy0acL>L5mm>8M@85|6-O1@!_78kXB_i(2y&<_lru6{1-oD!MD+WJ;@Lh8gq dk%lC bA+c`^2H*bc6wBS3j3^P63B`B!p5ZmC${Il-+Nn4^UB@3?;CWO d8w`j;8|;gDe%n?(DxAas1fH&bF6*2UngDOLC|dvk delta 115 zcmbQwxRh~%Wlp%Ki(^Q|oVQmN3LbFaVRlsid;JZ+hai7mxm(POd7q`T^UBxPZ?K*{ jvy%OU5CexWap*TgCBtvql$#b48Gyjk)z4*}Q$iB}N`4`bKzLlMj${>(N b9QwxG_W!@U(}R*33_#%N>gTe~DWM4f;X)#C delta 113 zcmbQsxR`N*Wmc%Ci(^Q|oVQmt@-{dyFmF8Y&-il>RL;I?|iQ00f?{elF{r5}E+jbRLrc diff --git a/doc/images/palettes/palette_invocean.png b/doc/images/palettes/palette_invocean.png index 576fed56077a40bfc61ff8d1395b021dce82fc1a..70261c715adbd9be2aa3706695d54fb4f49a48e0 100644 GIT binary patch delta 93 zcmV-j0HXi60jvR#IWt~KL_t(|obA-H0l**-1F?twR|aPZQdw%;xxAGmCz*3I_TA3S zjD5Q+GrMqq{N4l95|M!+AD93@F#&*L0szH6ydwXu#6JSS00000NkvXXu0mjfS8gU| delta 98 zcmV-o0GIX-GhL_t(|obA*x3V=Wm1i{h&fB9}re1L(VFjcTjx=|l9Giy)Q zOzeA`xo`h`*Z%&8C!0x*NlyFTCTD9smFU07*qoM6N<$ Eg077$YybcN diff --git a/doc/images/palettes/palette_invrainbow.png b/doc/images/palettes/palette_invrainbow.png index 6c19c617ffb9db22b1a84f7ecdf20128ba8ba701..8f184fcf24fef02e12830cd1790fbbd060f00c54 100644 GIT binary patch delta 273 zcmdnZbdYI+W&LMQ7srr_Id89c=N&fSalPnn^*g@MwOr}A$YP1NGrlu0?VokY@8y+; zml7{Myp(-xbzITpIR4GKe@^?|`g-<^eAa*WFJJDzo!dV9QJ4G5;=I}Ob{~3Uy#3Sh zOM9M~eg711+vh-tH$Geb?e7WeO!Im(>xDtf@9rtS z8u(9V^UVG`(?!(e)%Z^yev*9b!kgvygi8NQr<$EQci}GoT5I{AQS!HcZlCwWo`3Uq z8(YSVZe|9PV~h+^j~N(x3mF=YSui*x%P=f3!w?Ac*NYv-*%p? zn!EPLnm1cMYQ67XRx*9-(tEqFAK$!s=AO+NJM}l4MXfxM|M&W%D~s!YC|7QNuC?~w zs{S?J#y(ZTj`_6kipH!a6y8J zVSynFgF`Y0L&Grv28Lcm1_mi-1_qNh28IkCTnavOKau-9_urItbqqk@>FVdgvd$@? F2>{!!eg*&l diff --git a/doc/images/palettes/palette_invred.png b/doc/images/palettes/palette_invred.png index dd35e7b0d36d0a6d2312aab207c342747efc5920..ee9dde13c125408e1f1edf3dbaf4f3d486406fd5 100644 GIT binary patch delta 107 zcmZ3&IG1sPWs1M2i(^Q|oVQmPc^eo6j%;B5KdZ83jc;1w`P}ch)}AZ3y_KDi${>(N b9QwxG%J*M>uS3vv1|aZs^>bP0l+XkK&O#w{ delta 114 zcmbQsxP)cu jy_K7w${?Ud9Qwx8&h=k@ahy*R0}yz+`njxgN@xNAs&FJ@ diff --git a/doc/images/palettes/palette_invseismic.png b/doc/images/palettes/palette_invseismic.png new file mode 100644 index 0000000000000000000000000000000000000000..ae2afad4f272a702a86d7debd2424d902941b828 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z%=C0|45^s&_R2xt1_J?RN8#3enleImHZKkuPg;6ebi?tfZ&W0YS|9Uxw&u>f^mo=< zqq9{j_x*j}cb_A`n_s<-0X~=#)r_{w59M&#p6>!$ O%HZkh=d#Wzp$PzMayIP% literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_invterrain.png b/doc/images/palettes/palette_invterrain.png new file mode 100644 index 0000000000000000000000000000000000000000..ae1a2f6fb03c5e8ce12873ecb79fd8a95872d229 GIT binary patch literal 258 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M z+~Vot7*a9k?G;D9Lk2u97dL9}_}{qkaFbWAmPSs)(Ld_0g~>NxWhL3H*nKthm0s!B zs_WnOt-t@R?DOSyoA0gu>0d7Y?`_Wa#PAFa<0;-b--S+{`I-Al_PxzZ+u6S#zMH)B z#0B3=xjjE;>?zd`ir-(O*OliwbyL>5>+kEY+*~Wd5Y57n(8IvcBgoKT$i!ga#=vll ngW-S#BZGu814A-a$s4lX=4W*~Sf0fK-Ou3Z>gTe~DWM4fZ#iQ+ literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_invtrafficlight.png b/doc/images/palettes/palette_invtrafficlight.png index 5650227d435919e5b0ce59341885e2b04ef3247b..1e3068ff5f217d1de2b074aa9c122ba2cd027d7f 100644 GIT binary patch delta 177 zcmcc3_=s_WW&IRS7srr_Id88R@--OnI0rI+-*4y}p*@8`n&ZEEq-S6|-wAK8m7$x? zerq(}Gt*6Mv-g~DJ8nGhnO!SVU0OG5@2`26 z#L!UI4Huv63igr!{}gug`vV-9bxK#00000NkvXXu0mjfhU^}# delta 71 zcmbQoIGb^TrLwQ5i(^Q|oVQmPc@H=U9NuvINAWx6PTf|geQ&qj^?dbJenRTRLh*?O bLSo+-^hN&b6+OEt%K!wPu6{1-oD!Md;mXUiX84~~~_5iDXSsXoJ!s`G4002ovPDHLkV1fuJCK><$ delta 99 zcmV-p0G$7^0l5K?IYMhmL_t(|obA-H4FfR{13{itxI4GLg%1SS0A~`WjCS(L$w~5^ zV`|HQ%?L2e$O#lC7|8Gp+vG(i4?Nhef z%q}ascPZ!cpHDqc=e>RX?QMVfoY&Ly&t$F4UYQ+y{YLmH(a(K{Z0e`o`>1rT@X6dQ z(zAd3U4Aph`jOptokMF*=X5=u`d$9tyl?A2W!7EZ{il9LW!=sCbGGITsf7#;hb$Nz z5@i?`81OL!NU$?#^e{7s9AjkQdd$GkibMJv`%;S<-Ar*KZw4UnboFyt=akR{0EoJN A>Hq)$ delta 265 zcmdnaw3BIqW&LYU7srr_Id8873N;&WxLy>0vv2oDwqJ`)CuN8qur=o66tIu4);_d- zLjJD*apjwLmmBWiSWz)OZQ8G&YkN0esa_@aQm3_bR_hrR>sMmWZ?+Xje|5grR_(o8 z_wAM)=VpoR{gSyS``ycRzqW4w5qJFDdcOE0mfcsl?cXQsAB)>1Utb*mX4m=W$>)ph zzt-IU`&HbwJaYc`r;1zopr0FZtptN;K2 diff --git a/doc/images/palettes/palette_redwhiteblue.png b/doc/images/palettes/palette_redwhiteblue.png index 45bfcce524eb4fa108a5b1dcbcc5145920dadbc2..18ea71cf7d69a953fdacd1df8ed7bc2172e0fff7 100644 GIT binary patch delta 291 zcmcc3beU;_Wj(8>i(^Q|oVQoJ^NtwsFb4!JpJDyw+ur*fu_}Hk>YBeIyZAYhA}_IQ zRwTwU zl2+DVI6vonKIhEjv^!UCZvMaTra$NVRQpyV>;L}@cYojV-~MUYu^ryI-xupUMxHx< z=Fah@@%sz6*MC!FU|>qSHjVkf8bkJm$Yef-&BtUI(t0f!&PWwA%rJe%V32)=G2z+_ eOa(F!72jAb^sN&UKQDUE00f?{elF{r5}E)mxrbT+ delta 299 zcmcc2bem~{Wj(K_i(^Q|oVQaP^A0=kFl&Al{_9+S|9|A0gVNRJem#pE{AV%ttnpZv z^W?yfe}6VPb@kZW{Vy>Ony8q{m;3kXW0}q0)TG08jn2znUf2EYgqzpQ$ zoThvILi~@oKbDLCzH?r^`n`1gG!;!&hTMe=3{uXF3?^+%3>iGE3>PH07#0|cFgPS@ mFf<$sU|{G)QlNsWqK+Z#rB$M0sJ%JQwfk$L90|Va?5N4dJ%_j{M z?D2GQ45^s&_KG8yBcn*$MenYeld9P6@tnL8a%@_{|Jf71B#E1Uoxiy;|J&KH$DgCm z9(#E0)@;4o*X}*vmHjp}RJO1C+P&I}t>5H+muIhE^=iw!sOs5IcWw<2HO<#&sz1!2 zFoV&-fVm-ojo}~0sJ%JQwfk$L90|Va?5N4dJ%_j{M zZ1!|<45^s&_R2T}DHp8LVv^vr~kyTK9?>U9Mp71^IqaVEgclGVA zfBcTiAKT58-}c;l%YI9ri~rK^xc=_HZ+>gP{r!vovga-SYZ%48h=-v|l0n3nK_iVJ q;0(ip8H^5w%neCw3`a2~HnKju$o<5-u4gCEISihzelF{r5}E+1P)Vc! literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_stepsGrBr.png b/doc/images/palettes/palette_stepsGrBr.png new file mode 100644 index 0000000000000000000000000000000000000000..2b3012e0c31ffd54b5c18263cade8817e52b8c1f GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zZ1!|<45^s&_R2AV(^?9YK+JqIVF4>%UJ>h%aM?ZM~uh8cF zf5i-Y-;;j|tllj8`?yN@ZGQdxjQ_v)xc#1gTlLm{`?!n$w4&G-@i25rGKd&6XrwU& qoMBingVDi|xgm*-;V7oWM%ItZc-by$v?~Ce!{F)a=d#Wzp$PywWl3fL literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_stepsOrPu.png b/doc/images/palettes/palette_stepsOrPu.png new file mode 100644 index 0000000000000000000000000000000000000000..9ae3fca3d936f2bc3c840270973d4ff138a8cac2 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zob2i17*a9k?UjwZj*KF07rhs6Y;ZF9WFpjgO2ErG(k+o`Z?SFmk-amsa-`egj+8Q3ZHR@b+_2%(MTf2AFs_%bq-Kw_P4`OCk z3;vL1V>rme&?L#gV$8si#vpKpL16}?g8_3x0;a?bez)(u247074gsCV;OXk;vd$@? F2>?olP%Que literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_stepsinvseismic.png b/doc/images/palettes/palette_stepsinvseismic.png new file mode 100644 index 0000000000000000000000000000000000000000..66f8a8d7888a2f15fcf3a4ea90d9af6ccefc9ec2 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M zO!0Ja45^s&_DUn?0RtXp$K}jrOUpi|a5gLMn(d(Q<7@caT}RAq7hK-=Y+6)ymE-dA zDu>nSRSX913<@(C91Iv65||hcvM@ApGO!3UaHuf|_+Uy{|L$kWIr*>r0MI@LPgg&e IbxsLQ0Mt1%k^lez literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_stepsinvterrain.png b/doc/images/palettes/palette_stepsinvterrain.png new file mode 100644 index 0000000000000000000000000000000000000000..0740075af6c86d03b4d37afe00dea2790c0844f8 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K51UT4$0sJ%JQwfk$L90|Va?5N4dJ%_j{M ztnhSk45^s&_KKlki-UlxQ3(YM!n z;gdi0yM<3(Gu$Pdb!`3a1#gP)-{nk=E@!xKoIzm*qk{o+LjoJaK^}%CNd^{U297ia efisvA)eN?I+;Yr`?nXd2FnGH9xvX0sJ%JQwfk$L90|Va?5N4dJ%_j{M zO!IVc45^s&_DUn?0RtXp$K}6ESFF3jI$4#c?L{6_0sJ%JQwfk$L90|Va?5N4dJ%_j{M ztnhSk45^s&_KKlkGlPKZK>_dO?P4h@O3ky3gcdRS9ywHMK6C%-2ch{Zt==7E62K!nfj{r&}$2Ybncc#*l#{jX~fHgTf3(2LtAY1U80)JPb{e e3@pZ&5_R97amsYaO%w*Yfx*+&&t;ucLK6Vggg(Up literal 0 HcmV?d00001 diff --git a/doc/images/palettes/palette_trafficlight.png b/doc/images/palettes/palette_trafficlight.png index df574f6d1ac6ccba1366f5b1c09a83a58d1bcce9..ffbbd4543fb3b380f0e1fbdf8290ed93539de016 100644 GIT binary patch delta 179 zcmcb?_=ItSW&Jcy7srr_Id8A*<~wY_;~eO9uKoG($z@y<+TT=UGu~qsn8eFJPa^7T zpqKli8_7nIXWq;)UV6H5bo&mSL~XR(B=W> zZ#l;i;LWgL27`kkV?z=X!%-H7E=~p!VFnE~h5#R!gaSh5H$%p)COI3~&B+Wv;OXk; Jvd$@?2>>F5Mt=YR diff --git a/doc/images/palettes/palette_whitecyan.png b/doc/images/palettes/palette_whitecyan.png index 5d4f798d62991f83116b54e842d0107595e8d7d9..cb24976cfed0eabfba483ffbba777d16a7a1e3cc 100644 GIT binary patch delta 107 zcmbQuIG1sPWs1M2i(^Q|oVQmPc^eo6j%;B5KdZ83jc;1w`MYcxyY9ZRn!F#v(5tDnm{r-UW|`BEn~ delta 105 zcmbQsIGb^TWsgTe~DWM4frw=7p delta 105 zcmbQsIGb^TWsbP0l+XkKyCx-) delta 105 zcmbQsIGb^TWs`z(Ai@9u diff --git a/doc/images/palettes/palette_yellowmagenta.png b/doc/images/palettes/palette_yellowmagenta.png index a9e1d33ce2a432e3987f3b96f082539e9d5eff43..29938abfcfe3413899c04a6c02bfd545cc51055f 100644 GIT binary patch delta 107 zcmbQoIG1sPWs1M2i(^Q|oVQmPc@H=U9NzHnNAW(!PTf|gdw27;zn!-vG+>$g^f!CPVBz@w)(cG*VgU#8+4c( c42VM;>~&ljbr>mdKI;Vst02~b^+yDRo diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.cpp b/lib/jkqtcommon/jkqtpbasicimagetools.cpp index b3f99a4bc3..e48e77e307 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.cpp +++ b/lib/jkqtcommon/jkqtpbasicimagetools.cpp @@ -78,1182 +78,291 @@ QMap JKQTPImageTools::getDefaultLUTs() { + lutstore[JKQTPMathImageRED]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::red)}), "red", QObject::tr("red")); + lutstore[JKQTPMathImageINVERTEDRED]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::red),QColor(Qt::black)}), "invred", QObject::tr("inv. red")); + lutstore[JKQTPMathImageGREEN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::green)}), "green", QObject::tr("green")); + lutstore[JKQTPMathImageINVERTEDGREEN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::green),QColor(Qt::black)}), "invgreen", QObject::tr("inv. green")); + lutstore[JKQTPMathImageBLUE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::blue)}), "blue", QObject::tr("blue")); + lutstore[JKQTPMathImageINVERTEDBLUE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::blue),QColor(Qt::black)}), "invblue", QObject::tr("inv. blue")); + lutstore[JKQTPMathImageGRAY]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::white)}), "gray", QObject::tr("gray")); + lutstore[JKQTPMathImageINVERTEDGRAY]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::white),QColor(Qt::black)}), "invgray", QObject::tr("inv. gray")); + lutstore[JKQTPMathImageALPHA]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(255,255,255,0),QColor(255,255,255,255)}), "alpha", QObject::tr("alpha")); + lutstore[JKQTPMathImageINVERTED_ALPHA]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(255,255,255,255),QColor(255,255,255,0)}), "invalpha", QObject::tr("inv. alpha")); + + lutstore[JKQTPMathImageCYAN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::cyan)}), "cyan", QObject::tr("cyan")); + lutstore[JKQTPMathImageINVERTED_CYAN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::cyan),QColor(Qt::black)}), "invcyan", QObject::tr("inv. cyan")); + lutstore[JKQTPMathImageCYANWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::cyan),QColor(Qt::white)}), "cyanwhite", QObject::tr("cyan-white")); + lutstore[JKQTPMathImageINVERTED_CYANWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::white),QColor(Qt::cyan)}), "whitecyan", QObject::tr("white-cyan")); + + lutstore[JKQTPMathImageMAGENTA]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::magenta)}), "magenta", QObject::tr("magenta")); + lutstore[JKQTPMathImageINVERTED_MAGENTA]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::magenta),QColor(Qt::black)}), "invmagenta", QObject::tr("inv. magenta")); + lutstore[JKQTPMathImageMAGENTAWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::magenta),QColor(Qt::white)}), "magentawhite", QObject::tr("magenta-white")); + lutstore[JKQTPMathImageINVERTED_MAGENTAWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::white),QColor(Qt::magenta)}), "whitemagenta", QObject::tr("white-magenta")); + + lutstore[JKQTPMathImageYELLOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::black),QColor(Qt::yellow)}), "yellow", QObject::tr("yellow")); + lutstore[JKQTPMathImageINVERTED_YELLOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::yellow),QColor(Qt::black)}), "invyellow", QObject::tr("inv. yellow")); + lutstore[JKQTPMathImageYELLOWWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::yellow),QColor(Qt::white)}), "yellowwhite", QObject::tr("yellow-white")); + lutstore[JKQTPMathImageINVERTED_YELLOWWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolateSorted({QColor(Qt::white),QColor(Qt::yellow)}), "whiteyellow", QObject::tr("white-yellow")); + + + { - const auto palette=JKQTPMathImageRED; - const QString palN="red"; - const QString palNT=QObject::tr("red"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(static_cast(255.0*v), 0, 0); + const auto fR= [](float v) -> float { return (382.5 - 1020.0 * std::abs(v - 0.75))/255.0; }; + const auto fG= [](float v) -> float { return (382.5 - 1020.0 * std::abs(v - 0.5))/255.0; }; + const auto fB= [](float v) -> float { return (382.5 - 1020.0 * std::abs(v - 0.25))/255.0; }; + const auto& normLUT=lutstore[JKQTPMathImageMATLAB]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "Matlab", QObject::tr("Matlab")); + lutstore[JKQTPMathImageINVERTED_MATLAB]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invMatlab", QObject::tr("inv. Matlab")); + + } + + { + const auto fR= [](float v) -> float { return (796.875*v - 199.21875)/255.0; }; + const auto fG= [](float v) -> float { return std::sin(JKQTPSTATISTICS_PI*v); }; + const auto fB= [](float v) -> float { return (255.0 - 765.0 * v)/255.0; }; + const auto& normLUT=lutstore[JKQTPMathImageRYGB]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "RYGB", QObject::tr("RYGB")); + lutstore[JKQTPMathImageINVERTED_RYGB]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invRYGB", QObject::tr("inv. RYGB")); + + } + + { + const auto& normLUT=lutstore[JKQTPMathImageHSV]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT([](float v)->QRgb { + const int h = static_cast(floor(6.0*v)); + const double f = 6*v-double(h); + + switch (h) + { + case 0: return qRgb(255, static_cast(255.0*f), 0); + case 1: return qRgb(static_cast(255.0*(1-f)), 255, 0); + case 2: return qRgb(0, 255, static_cast(255.0*f)); + case 3: return qRgb(0, static_cast(255.0*(1-f)), 255); + case 4: return qRgb(static_cast(255.0*f), 0, 255); + case 5: return qRgb(255, 0, static_cast(255.0*(1-f))); + case 6: return qRgb(255, static_cast(255.0*f), 0); + default: return qRgb(0,0,0); } - } + }), "HSV", QObject::tr("HSV")); + lutstore[JKQTPMathImageINVERTED_HSV]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invHSV", QObject::tr("inv. HSV")); + + } + + { + const auto fR= [](float v) -> float { return std::abs(2.0*v-0.5); }; + const auto fG= [](float v) -> float { return sin(JKQTPSTATISTICS_PI*v); }; + const auto fB= [](float v) -> float { return cos(0.5*JKQTPSTATISTICS_PI*v); }; + const auto& normLUT=lutstore[JKQTPMathImageRAINBOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "rainbow", QObject::tr("rainbow")); + lutstore[JKQTPMathImageINVERTED_RAINBOW]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invrainbow", QObject::tr("inv. rainbow")); + + } + + { + const auto fR= [](float v) -> float { return 765.0*v/255.0; }; + const auto fG= [](float v) -> float { return (765.0*v-255.0)/255.0; }; + const auto fB= [](float v) -> float { return (765.0*v-510.0)/255.0; }; + const auto& normLUT=lutstore[JKQTPMathImageHOT]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "AFMhot", QObject::tr("AFM hot")); + lutstore[JKQTPMathImageINVERTED_HOT]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invAFMhot", QObject::tr("inv. AFM hot")); + + } + + { + const auto fR= [](float v) -> float { return (765.0*v-510.0)/255.0; }; + const auto fG= [](float v) -> float { return (std::abs(382.5*v-127.5))/255.0; }; + const auto fB= [](float v) -> float { return v; }; + const auto& normLUT=lutstore[JKQTPMathImageOCEAN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "ocean", QObject::tr("ocean")); + lutstore[JKQTPMathImageINVERTED_OCEAN]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invocean", QObject::tr("inv. ocean")); + + } + + { + const auto fR= [](float v) -> float { return v/0.32-0.78125; }; + const auto fG= [](float v) -> float { return 2.0*v-0.84; }; + const auto fB= [](float v) -> float { + double b = 4.0*v; + if (b>1 || b<0) b = -2.0*v+1.84; + if (b>1 || b<0) b = v/0.08-11.5; + if (b>1 || b<0) b=1; + return b; + }; + const auto& normLUT=lutstore[JKQTPMathImageBLUEMAGENTAYELLOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "BlMaYe", QObject::tr("blue-magenta-yellow")); + lutstore[JKQTPMathImageINVERTED_BLUEMAGENTAYELLOW]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "YeMaBl", QObject::tr("yellow-magenta-blue")); + + } + + { + const auto fR= [](float v) -> float { return sqrt(sqrt(v)); }; + const auto fG= [](float v) -> float { return sin(JKQTPSTATISTICS_PI/2.0*v); }; + const auto fB= [](float v) -> float { return cos(JKQTPSTATISTICS_PI/2.0*v); }; + const auto& normLUT=lutstore[JKQTPMathImageBLUEYELLOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "BlYe", QObject::tr("blue-yellow")); + lutstore[JKQTPMathImageINVERTED_BLUEYELLOW]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "YeBl", QObject::tr("yellow-blue")); + + } + + { + const auto fR= [](float v) -> float { return ((v < 0.5) ? 128.0*sin(JKQTPSTATISTICS_PI*(2.0*v-0.5))+128.0 : 255.0)/255.0; }; + const auto fG= [](float v) -> float { return ((v < 0.5) ? 512.0*v+128.0 : 512.0-512.0*v)/255.0; }; + const auto fB= [](float v) -> float { return 0.0; }; + const auto& normLUT=lutstore[JKQTPMathImageTRAFFICLIGHT]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "Trafficlight", QObject::tr("Trafficlight")); + lutstore[JKQTPMathImageINVERTED_TRAFFICLIGHT]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invtrafficlight", QObject::tr("inv. Trafficlight")); + + } + + { + const auto fR= [](float v) -> float { return sqrt(v); }; + const auto fG= [](float v) -> float { return v*v*v; }; + const auto fB= [](float v) -> float { return sin(2.0*JKQTPSTATISTICS_PI*v); }; + const auto& normLUT=lutstore[JKQTPMathImageBLACKBLUEREDYELLOW]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "BBlRdYe", QObject::tr("black-blue-red-yellow")); + lutstore[JKQTPMathImageYELLOWREDBLUEBLACK]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "YeRdBlB", QObject::tr("yellow-red-blue-black")); + } + + { + const auto fR= [](float v) -> float { return v; }; + const auto fG= [](float v) -> float { return fabs(v-0.5); }; + const auto fB= [](float v) -> float { return v*v*v*v; }; + const auto& normLUT=lutstore[JKQTPMathImageGREENREDVIOLET]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "GnRdVi", QObject::tr("green-red-violet")); + lutstore[JKQTPMathImageVIOLETREDGREEN]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "ViRdGn", QObject::tr("violet-red-green")); + } + + { + const auto fR= [](float v) -> float { return v/0.32-0.78125; }; + const auto fG= [](float v) -> float { return v/0.32-0.78125; }; + const auto fB= [](float v) -> float { return (v<0.25)?4*v:(v<0.42)?1.0:(v<0.92)?-2.0*v+1.84:v/0.08-11.5; }; + const auto& normLUT=lutstore[JKQTPMathImageBLACKBLUEWHITEYELLOWWHITE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUT(fR, fG, fB), "BWprint", QObject::tr("black-blue-white-yellow-white")); + lutstore[JKQTPMathImageWHITEYELLOWWHITEBLUEBLACK]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invBWprint", QObject::tr("white-yellow-white-blue-black")); + } + + { + const auto& normLUT=lutstore[JKQTPMathImageREDWHITEBLUE]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(JKQTPPaletteList( + {jkqtp_qRgbOpaque(0xB2182B), + jkqtp_qRgbOpaque(0xD6604D), + jkqtp_qRgbOpaque(0xF4A582), + jkqtp_qRgbOpaque(0xFDDBC7), + jkqtp_qRgbOpaque(0xD1E5F0), + jkqtp_qRgbOpaque(0x92C5DE), + jkqtp_qRgbOpaque(0x4393C3), + jkqtp_qRgbOpaque(0x2166AC)})), + "redwhiteblue", QObject::tr("red-white-blue")); + lutstore[JKQTPMathImageBLUEWHITERED]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "bluewhitered", QObject::tr("blue-white-red")); + } + + { + const JKQTPPaletteList lst= { + jkqtp_qRgbOpaque(0x8C510A), + jkqtp_qRgbOpaque(0xBF812D), + jkqtp_qRgbOpaque(0xDFC27D), + jkqtp_qRgbOpaque(0xF6E8C3), + jkqtp_qRgbOpaque(0xC7EAE5), + jkqtp_qRgbOpaque(0x80CDC1), + jkqtp_qRgbOpaque(0x35978F), + jkqtp_qRgbOpaque(0x01665E) + }; + const auto& normLUT=lutstore[JKQTPMathImageBR_GR]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "BrGr", QObject::tr("brown-white-green (diverging)")); + lutstore[JKQTPMathImageBR_GR].legacyNames<<"BrBG"; + const auto& normStepLUT=lutstore[JKQTPMathImageBR_GR_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsBrGr", QObject::tr("steps: brown-white-green (diverging)")); + lutstore[JKQTPMathImageBR_GR_STEP].legacyNames<<"stepsBrBG"; + lutstore[JKQTPMathImageGR_BR]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "GrBr", QObject::tr("green-white-brown (diverging)")); + lutstore[JKQTPMathImageGR_BR_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsGrBr", QObject::tr("steps: green-white-brown (diverging)")); + } + + { + const JKQTPPaletteList lst= { + jkqtp_qRgbOpaque(0xB35806), + jkqtp_qRgbOpaque(0xE08214), + jkqtp_qRgbOpaque(0xFDB863), + jkqtp_qRgbOpaque(0xFEE0B6), + jkqtp_qRgbOpaque(0xF7F7F7), + jkqtp_qRgbOpaque(0xD8DAEB), + jkqtp_qRgbOpaque(0xB2ABD2), + jkqtp_qRgbOpaque(0x8073AC), + jkqtp_qRgbOpaque(0x542788) + }; + const auto& normLUT=lutstore[JKQTPMathImagePU_OR]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "PuOr", QObject::tr("purple-white-orange (diverging)")); + const auto& normStepLUT=lutstore[JKQTPMathImagePU_OR_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsPuOr", QObject::tr("steps: purple-white-orange (diverging)")); + lutstore[JKQTPMathImageOR_PU]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "OrPu", QObject::tr("orange-white-purple (diverging)")); + lutstore[JKQTPMathImageOR_PU_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsOrPu", QObject::tr("steps: orange-white-purple (diverging)")); + } + + { + const JKQTPPaletteList lst= { + jkqtp_qRgbOpaque(0xFFFFD9), + jkqtp_qRgbOpaque(0xEDF8B1), + jkqtp_qRgbOpaque(0xC7E9B4), + jkqtp_qRgbOpaque(0x7FCDBB), + jkqtp_qRgbOpaque(0x41B6C4), + jkqtp_qRgbOpaque(0x1D91C0), + jkqtp_qRgbOpaque(0x225EA8), + jkqtp_qRgbOpaque(0x253494), + jkqtp_qRgbOpaque(0x081D58) + }; + const auto& normLUT=lutstore[JKQTPMathImageYL_GN_BU]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "YeGnBu", QObject::tr("yellow-green-blue")); + const auto& normStepLUT=lutstore[JKQTPMathImageYL_GN_BU_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsYeGnBu", QObject::tr("steps: yellow-green-blue")); + lutstore[JKQTPMathImageBU_GN_YL]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "BlGnYe", QObject::tr("blue-green-yellow")); + lutstore[JKQTPMathImageBU_GN_YL_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsBlGnYe", QObject::tr("steps: blue-green-yellow")); } { - const auto palette=JKQTPMathImageGREEN; - const QString palN="green"; - const QString palNT=QObject::tr("green"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(0, static_cast(255.0*v), 0); - } - } - } - - - { - const auto palette=JKQTPMathImageBLUE; - const QString palN="blue"; - const QString palNT=QObject::tr("blue"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(0, 0, static_cast(255.0*v)); - } - } - } - - - { - const auto palette=JKQTPMathImageGRAY; - const QString palN="gray"; - const QString palNT=QObject::tr("gray"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(static_cast(255.0*v), - static_cast(255.0*v), - static_cast(255.0*v)); - } - } - } - - - { - const auto palette=JKQTPMathImageALPHA; - const QString palN="alpha"; - const QString palNT=QObject::tr("alpha"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgba(255,255,255, - static_cast(255.0*v)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_ALPHA; - const QString palN="invAlpha"; - const QString palNT=QObject::tr("inv. alpha"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgba(255,255,255, - static_cast(255.0*v)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTEDRED; - const QString palN="invred"; - const QString palNT=QObject::tr("inv. red"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(static_cast(255.0*(1.0-v)), 0, 0); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTEDGREEN; - const QString palN="invgreen"; - const QString palNT=QObject::tr("inv. green"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(0, static_cast(255.0*(1.0-v)), 0); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTEDBLUE; - const QString palN="invblue"; - const QString palNT=QObject::tr("inv. blue"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=qRgb(0, 0, static_cast(255.0*(1.0-v))); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTEDGRAY; - const QString palN="invgray"; - const QString palNT=QObject::tr("inv. gray"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=1.0-(l/static_cast(JKQTPImageTools::LUTSIZE)); - plut[l]=qRgb(static_cast(255.0*v), - static_cast(255.0*v), - static_cast(255.0*v)); - } - } - } - - - { - const auto palette=JKQTPMathImageMATLAB; - const QString palN="Matlab"; - const QString palNT=QObject::tr("Matlab"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = 382.5 - 1020.0 * std::abs(v - 0.75); - if (r > 255.0) - r = 255.0; - else if (r < 0.0) - r = 0.0; - - double g = 382.5 - 1020.0 * std::abs(v - 0.5); - if (g > 255.0) - g = 255.0; - else if (g < 0.0) - g = 0.0; - - double b = 382.5 - 1020.0 * std::abs(v - 0.25); - if (b > 255.0) - b = 255.0; - else if (b < 0.0) - b = 0.0; - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_MATLAB; - const QString palN="invMatlab"; - const QString palNT=QObject::tr("inv. Matlab"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=JKQTPImageTools::LUTSIZE; l>=0; l--) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = 382.5 - 1020.0 * std::abs(v - 0.75); - if (r > 255.0) - r = 255.0; - else if (r < 0.0) - r = 0.0; - - double g = 382.5 - 1020.0 * std::abs(v - 0.5); - if (g > 255.0) - g = 255.0; - else if (g < 0.0) - g = 0.0; - - double b = 382.5 - 1020.0 * std::abs(v - 0.25); - if (b > 255.0) - b = 255.0; - else if (b < 0.0) - b = 0.0; - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageRYGB; - const QString palN="RYGB"; - const QString palNT=QObject::tr("RYGB"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = 796.875*v - 199.21875; - if (r > 255.0) - r = 255.0; - else if (r < 0.0) - r = 0.0; - - const double g = 255.0 * std::sin(JKQTPSTATISTICS_PI*v); - - double b = 255.0 - 765.0 * v; - if (b < 0.0) - b = 0.0; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_RYGB; - const QString palN="invRYGB"; - const QString palNT=QObject::tr("inv. RYGB"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); if (plut!=nullptr) { - for (int l=JKQTPImageTools::LUTSIZE; l>=0; l--) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = 796.875*v - 199.21875; - if (r > 255.0) - r = 255.0; - else if (r < 0.0) - r = 0.0; - - const double g = 255.0 * std::sin(JKQTPSTATISTICS_PI*v); - - double b = 255.0 - 765.0 * v; - if (b < 0.0) - b = 0.0; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageHSV; - const QString palN="HSV"; - const QString palNT=QObject::tr("HSV"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - const int h = static_cast(floor(6*v)); - const double f = 6*v-double(h); - - switch (h) - { - case 0: plut[l]=qRgb(255, static_cast(255.0*f), 0); break; - case 1: plut[l]=qRgb(static_cast(255.0*(1-f)), 255, 0); break; - case 2: plut[l]=qRgb(0, 255, static_cast(255.0*f)); break; - case 3: plut[l]=qRgb(0, static_cast(255.0*(1-f)), 255); break; - case 4: plut[l]=qRgb(static_cast(255.0*f), 0, 255); break; - case 5: plut[l]=qRgb(255, 0, static_cast(255.0*(1-f))); break; - case 6: plut[l]=qRgb(255, static_cast(255.0*f), 0); break; - } - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_HSV; - const QString palN="invHSV"; - const QString palNT=QObject::tr("inv. HSV"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - const int h = static_cast(floor(6.0-6.0*v)); - const double f = 6.0-6.0*v-double(h); - - switch (h) - { - case 0: plut[l]=qRgb(255, static_cast(255.0*f), 0); break; - case 1: plut[l]=qRgb(static_cast(255.0*(1-f)), 255, 0); break; - case 2: plut[l]=qRgb(0, 255, static_cast(255.0*f)); break; - case 3: plut[l]=qRgb(0, static_cast(255.0*(1-f)), 255); break; - case 4: plut[l]=qRgb(static_cast(255.0*f), 0, 255); break; - case 5: plut[l]=qRgb(255, 0, static_cast(255.0*(1-f))); break; - case 6: plut[l]=qRgb(255, static_cast(255.0*f), 0); break; - } - } - } - } - - - { - const auto palette=JKQTPMathImageRAINBOW; - const QString palN="rainbow"; - const QString palNT=QObject::tr("rainbow"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = 255.0*std::abs(2.0*v-0.5); - if (r > 255.0) - r = 255.0; - - const double g = 255.0*sin(JKQTPSTATISTICS_PI*v); - - const double b = 255.0*cos(0.5*JKQTPSTATISTICS_PI*v); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_RAINBOW; - const QString palN="invrainbow"; - const QString palNT=QObject::tr("inv. rainbow"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=JKQTPImageTools::LUTSIZE; l>=0; l--) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = 255.0*std::abs(2.0*v-0.5); - if (r > 255.0) - r = 255.0; - - const double g = 255.0*sin(JKQTPSTATISTICS_PI*v); - - const double b = 255.0*cos(0.5*JKQTPSTATISTICS_PI*v); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageHOT; - const QString palN="AFMhot"; - const QString palNT=QObject::tr("AFM hot"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = 765.0*v; - if (r > 255.0) - r = 255.0; - - double g = 765.0*v-255.0; - if (g > 255.0) - g = 255.0; - else if (g < 0.0) - g = 0.0; - - double b = 765.0*v-510.0; - if (b < 0.0) - b = 0.0; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_HOT; - const QString palN="invAFMhot"; - const QString palNT=QObject::tr("inv. AFM hot"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=JKQTPImageTools::LUTSIZE; l>=0; l--) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = 765.0*v; - if (r > 255.0) - r = 255.0; - - double g = 765.0*v-255.0; - if (g > 255.0) - g = 255.0; - else if (g < 0.0) - g = 0.0; - - double b = 765.0*v-510.0; - if (b < 0.0) - b = 0.0; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageOCEAN; - const QString palN="ocean"; - const QString palNT=QObject::tr("ocean"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = 765.0*v-510.0; - if (r < 0.0) - r = 0.0; - - const double g = std::abs(382.5*v-127.5); - - const double b = 255.0*v; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_OCEAN; - const QString palN="invocean"; - const QString palNT=QObject::tr("inv. ocean"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=JKQTPImageTools::LUTSIZE; l>=0; l--) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = 765.0*v-510.0; - if (r < 0.0) - r = 0.0; - - const double g = std::abs(382.5*v-127.5); - - const double b = 255.0*v; - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageBLUEMAGENTAYELLOW; - const QString palN="BlMaYe"; - const QString palNT=QObject::tr("blue-magenta-yellow"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = (v/0.32-0.78125); - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = 2.0*v-0.84; - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = 4.0*v; - if (b>1 || b<0) b = -2.0*v+1.84; - if (b>1 || b<0) b = v/0.08-11.5; - if (b>1 || b<0) b=1; - - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_BLUEMAGENTAYELLOW; - const QString palN="YeMaBl"; - const QString palNT=QObject::tr("yellow-magenta-blue"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = (v/0.32-0.78125); - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = 2.0*v-0.84; - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = 4.0*v; - if (b>1 || b<0) b = -2.0*v+1.84; - if (b>1 || b<0) b = v/0.08-11.5; - if (b>1 || b<0) b=1; - - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageBLUEYELLOW; - const QString palN="BlYe"; - const QString palNT=QObject::tr("blue-yellow"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = sqrt(sqrt(v)); - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = sin(JKQTPSTATISTICS_PI/2.0*v); - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = cos(JKQTPSTATISTICS_PI/2.0*v); - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_BLUEYELLOW; - const QString palN="YeBl"; - const QString palNT=QObject::tr("yellow-blue"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = sqrt(sqrt(v)); - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = sin(JKQTPSTATISTICS_PI/2.0*v); - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = cos(JKQTPSTATISTICS_PI/2.0*v); - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageCYAN; - const QString palN="cyan"; - const QString palNT=QObject::tr("cyan"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = v*0.5; - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = v; - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = v; - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_CYAN; - const QString palN="invcyan"; - const QString palNT=QObject::tr("inv. cyan"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = v*0.5; - if (r < 0.0) r = 0.0; - if (r > 1.0) r = 1.0; - - double g = v; - if (g < 0.0) g = 0.0; - if (g > 1.0) g = 1.0; - - double b = v; - if (b < 0.0) b = 0.0; - if (b > 1.0) b = 1.0; - plut[l]=qRgb(static_cast(255.0*r), static_cast(255.0*g), static_cast(255.0*b)); - } - } - } - - - { - const auto palette=JKQTPMathImageTRAFFICLIGHT; - const QString palN="trafficlight"; - const QString palNT=QObject::tr("trafficlight"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=l/static_cast(JKQTPImageTools::LUTSIZE); - double r = (v < 0.5) ? 128.0*sin(JKQTPSTATISTICS_PI*(2.0*v-0.5))+128.0 : 255.0; - if (r > 255.0) - r = 255.0; - - double g = (v < 0.5) ? 512.0*v+128.0 : 512.0-512.0*v; - if (g > 255.0) - g = 255.0; - plut[l]=qRgb(static_cast(r), static_cast(g), 0); - } - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_TRAFFICLIGHT; - const QString palN="invtrafficlight"; - const QString palNT=QObject::tr("inv. trafficlight"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - double r = (v < 0.5) ? 128.0*sin(JKQTPSTATISTICS_PI*(2.0*v-0.5))+128.0 : 255.0; - if (r > 255.0) - r = 255.0; - - double g = (v < 0.5) ? 512.0*v+128.0 : 512.0-512.0*v; - if (g > 255.0) - g = 255.0; - plut[l]=qRgb(static_cast(r), static_cast(g), 0); - } - } - } - - - { - const auto palette=JKQTPMathImageBLUEWHITERED; - const QString palN="bluewhitered"; - const QString palNT=QObject::tr("blue-white-red"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - JKQTPPaletteList lst; - lst<(8.0, 0xFFB2182B); - lst<(7.0, 0xFFD6604D); - lst<(6.0, 0xFFF4A582); - lst<(5.0, 0xFFFDDBC7); - lst<(4.0, 0xFFD1E5F0); - lst<(3.0, 0xFF92C5DE); - lst<(2.0, 0xFF4393C3); - lst<(1.0, 0xFF2166AC); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst, JKQTPImageTools::LUTSIZE+1); - } - - - { - const auto palette=JKQTPMathImageREDWHITEBLUE; - const QString palN="redwhiteblue"; - const QString palNT=QObject::tr("red-white-blue"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - - JKQTPPaletteList lst; - lst<(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - const double r = 255.0*qBound(0.0,sqrt(v),1.0); - const double g = 255.0*qBound(0.0,v*v*v,1.0); - const double b = 255.0*qBound(0.0,sin(2.0*JKQTPSTATISTICS_PI*v),1.0); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageGREENREDVIOLET; - const QString palN="GnRdVi"; - const QString palNT=QObject::tr("green-red-violet"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - const double r = 255.0*qBound(0.0,v,1.0); - const double g = 255.0*qBound(0.0,fabs(v-0.5),1.0); - const double b = 255.0*qBound(0.0,v*v*v*v,1.0); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageBLACKBLUEWHITEYELLOWWHITE; - const QString palN="BWprint"; - const QString palNT=QObject::tr("black-blue-white-yellow-white"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - const double r = 255.0*qBound(0.0,v/0.32-0.78125,1.0); - const double g = 255.0*qBound(0.0,v/0.32-0.78125,1.0); - const double b = 255.0*qBound(0.0,(v<0.25)?4*v:(v<0.42)?1.0:(v<0.92)?-2.0*v+1.84:v/0.08-11.5,1.0); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageWHITEYELLOWWHITEBLUEBLACK; - const QString palN="invBWprint"; - const QString palNT=QObject::tr("white-yellow-white-blue-black"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - const double r = 255.0*qBound(0.0,v/0.32-0.78125,1.0); - const double g = 255.0*qBound(0.0,v/0.32-0.78125,1.0); - const double b = 255.0*qBound(0.0,(v<0.25)?4*v:(v<0.42)?1.0:(v<0.92)?-2.0*v+1.84:v/0.08-11.5,1.0); - - plut[l]=qRgb(static_cast(r), static_cast(g), static_cast(b)); - } - } - } - - - { - const auto palette=JKQTPMathImageBR_GR; - const QString palN="BrBG"; - const QString palNT=QObject::tr("BrBG"); - lutstore[palette]=JKQTPImageTools::LUTData(palN, palNT); - JKQTPPaletteList lst; - lst<(0.0, qRgb(0x8C, 0x51, 0x0A)); - lst<(1.0, qRgb(0xBF, 0x81, 0x2D)); - lst<(2.0, qRgb(0xDF, 0xC2, 0x7D)); - lst<(JKQTPImageTools::LUTSIZE+1, 0), "magenta", QObject::tr("magenta")); - lutstore[palettei]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), "invmagenta", QObject::tr("inv. magenta")); - QRgb* plut=lutstore[palette].lut.data(); - QRgb* pluti=lutstore[palettei].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,1,0,v).rgba(); - pluti[l]=QColor::fromCmykF(0,1,0,1.0-v).rgba(); - } - - } - } - - { - const auto palette=JKQTPMathImageYELLOW; - const auto palettei=JKQTPMathImageINVERTED_YELLOW; - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), "yellow", QObject::tr("yellow")); - lutstore[palettei]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), "invyellow", QObject::tr("inv. yellow")); - QRgb* plut=lutstore[palette].lut.data(); - QRgb* pluti=lutstore[palettei].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,0,1,v).rgba(); - pluti[l]=QColor::fromCmykF(0,0,1,1.0-v).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageCYAN; - const auto palettei=JKQTPMathImageINVERTED_CYAN; - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), "cyan", QObject::tr("cyan")); - lutstore[palettei]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), "invcyan", QObject::tr("inv. cyan")); - QRgb* plut=lutstore[palette].lut.data(); - QRgb* pluti=lutstore[palettei].lut.data(); - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(1,0,0,v).rgba(); - pluti[l]=QColor::fromCmykF(1,0,0,1.0-v).rgba(); - } - - } - } - - - - { - const auto palette=JKQTPMathImageINVERTED_MAGENTAWHITE; - const QString palN="whitemagenta"; - const QString palNT=QObject::tr("white-magenta"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,v,0,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageMAGENTAWHITE; - const QString palN="magentawhite"; - const QString palNT=QObject::tr("magenta-white"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,v,0,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_YELLOWWHITE; - const QString palN="whiteyellow"; - const QString palNT=QObject::tr("white-yellow"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,0,v,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageYELLOWWHITE; - const QString palN="yellowwhite"; - const QString palNT=QObject::tr("yellow-white"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(0,0,v,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageINVERTED_CYANWHITE; - const QString palN="whitecyan"; - const QString palNT=QObject::tr("white-cyan"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(v,0,0,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageCYANWHITE; - const QString palN="cyanwhite"; - const QString palNT=QObject::tr("cyan-white"); - lutstore[palette]=JKQTPImageTools::LUTData(QVector(JKQTPImageTools::LUTSIZE+1, 0), palN, palNT); - QRgb* plut=lutstore[palette].lut.data(); //std::cout<<"!!! creating rainbow lut\n"; - if (plut!=nullptr) { - for (int l=0; l<=JKQTPImageTools::LUTSIZE; l++) { - const double v=(JKQTPImageTools::LUTSIZE-l)/static_cast(JKQTPImageTools::LUTSIZE); - plut[l]=QColor::fromCmykF(v,0,0,0).rgba(); - } - - } - } - - - { - const auto palette=JKQTPMathImageBlueGreenRed; - const QString palN="bluegreenred"; - const QString palNT=QObject::tr("blue-green-red"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("blue").rgb()); - lst<(2.0, QColor("green").rgb()); - lst<(3.0, QColor("red").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - } - - - { - const auto palette=JKQTPMathImageRedGreenBlue; - const QString palN="redgreenblue"; - const QString palNT=QObject::tr("red-green-blue"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("red").rgb()); - lst<(2.0, QColor("green").rgb()); - lst<(3.0, QColor("blue").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - } - - - { - const auto palette=JKQTPMathImageMagentaYellow; - const QString palN="magentayellow"; - const QString palNT=QObject::tr("magenta-yellow"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("magenta").rgb()); - lst<(2.0, QColor("yellow").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - } - - - { - const auto palette=JKQTPMathImageYellowMagenta; - const QString palN="yellowmagenta"; - const QString palNT=QObject::tr("yellow-magenta"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("yellow").rgb()); - lst<(2.0, QColor("magenta").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - } - - - { - const auto palette=JKQTPMathImageRedBlue; - const QString palN="redblue"; - const QString palNT=QObject::tr("red-blue"); - lutstore[palette]=JKQTPImageTools::LUTData(palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("red").rgb()); - lst<(2.0, QColor("blue").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - } - - - { - const auto palette=JKQTPMathImageBlueRed; - const QString palN="bluered"; - const QString palNT=QObject::tr("blue-red"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(1.0, QColor("blue").rgb()); - lst<(2.0, QColor("red").rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); + const JKQTPPaletteList lst= { + jkqtp_qRgbOpaque(0xF7FCF0), + jkqtp_qRgbOpaque(0xE0F3DB), + jkqtp_qRgbOpaque(0xCCEBC5), + jkqtp_qRgbOpaque(0xA8DDB5), + jkqtp_qRgbOpaque(0x7BCCC4), + jkqtp_qRgbOpaque(0x4EB3D3), + jkqtp_qRgbOpaque(0x2B8CBE), + jkqtp_qRgbOpaque(0x0868AC), + jkqtp_qRgbOpaque(0x084081) + }; + const auto& normLUT=lutstore[JKQTPMathImageBU_GN]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "bluegreen", QObject::tr("blue-green-white")); + const auto& normStepLUT=lutstore[JKQTPMathImageBU_GN_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsBlGn", QObject::tr("steps: blue-green-white")); + lutstore[JKQTPMathImageGN_BU]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "BlGnYe", QObject::tr("white-green-blue")); + lutstore[JKQTPMathImageGN_BU_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsBlGnYe", QObject::tr("steps: white-green-blue")); } { - const auto palette=JKQTPMathImageSeismic; - const QString palN="seismic"; - const QString palNT=QObject::tr("seismic"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); - JKQTPPaletteList lst; - lst<(0, QColor::fromRgbF(0.0f, 0.0f, 0.3f).rgb()); - lst<(1, QColor::fromRgbF(0.0f, 0.0f, 1.0f).rgb()); - lst<(2, QColor::fromRgbF(1.0f, 1.0f, 1.0f).rgb()); - lst<(3, QColor::fromRgbF(1.0f, 0.0f, 0.0f).rgb()); - lst<(4, QColor::fromRgbF(0.5f, 0.0f, 0.0f).rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - { - const auto palettei=JKQTPMathImageSeismic_STEP; - lutstore[palettei]=JKQTPImageTools::LUTData("seismic_step", QObject::tr("steps: seismic")); - lutstore[palettei].lut=JKQTPBuildColorPaletteLUTColorsOnlySteps(lst); - } + const JKQTPPaletteList lst= { + QColor("blue"), + QColor("green"), + QColor("red") + }; + const auto& normLUT=lutstore[JKQTPMathImageBlueGreenRed]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "BlGnRd", QObject::tr("blue-green-red")); + lutstore[JKQTPMathImageBlueGreenRed].legacyNames<<"bluegreenred"; + lutstore[JKQTPMathImageRedGreenBlue]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "RdGnBu", QObject::tr("red-green-blue")); + lutstore[JKQTPMathImageRedGreenBlue].legacyNames<<"redgreenblue"; + } + + { + const JKQTPPaletteList lst= { + QColor("magenta"), + QColor("yellow") + }; + const auto& normLUT=lutstore[JKQTPMathImageMagentaYellow]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "magentayellow", QObject::tr("magenta-yellow")); + lutstore[JKQTPMathImageYellowMagenta]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "yellowmagenta", QObject::tr("yellow-magenta")); + } + + { + const JKQTPPaletteList lst= { + QColor("red"), + QColor("blue") + }; + const auto& normLUT=lutstore[JKQTPMathImageRedBlue]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "redblue", QObject::tr("red-blue")); + lutstore[JKQTPMathImageBlueRed]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "bluered", QObject::tr("blue-red")); + } + + { + const JKQTPPaletteList lst= { + QColor::fromRgbF(0.0f, 0.0f, 0.3f), + QColor::fromRgbF(0.0f, 0.0f, 1.0f), + QColor::fromRgbF(1.0f, 1.0f, 1.0f), + QColor::fromRgbF(1.0f, 0.0f, 0.0f), + QColor::fromRgbF(0.5f, 0.0f, 0.0f) + }; + const auto& normLUT=lutstore[JKQTPMathImageSeismic]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "seismic", QObject::tr("seismic")); + const auto& normStepLUT=lutstore[JKQTPMathImageSeismic_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsseismic", QObject::tr("steps: seismic")); + lutstore[JKQTPMathImageSeismic_STEP].legacyNames<<"seismic_step"; + lutstore[JKQTPMathImageINVERTED_Seismic]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invseismic", QObject::tr("inv. seismic")); + lutstore[JKQTPMathImageINVERTED_Seismic_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsinvseismic", QObject::tr("steps: inv. seismic")); } { - const auto palette=JKQTPMathImageTerrain; - const QString palN="terrain"; - const QString palNT=QObject::tr("terrain"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); JKQTPPaletteList lst; lst<(0.00, QColor::fromRgbF(0.2f, 0.2f, 0.6f).rgb()); lst<(0.15, QColor::fromRgbF(0.0f, 0.6f, 1.0f).rgb()); @@ -1261,22 +370,15 @@ QMap JKQTPImageTools::getDefaultLUTs() { lst<(0.50, QColor::fromRgbF(1.0f, 1.0f, 0.6f).rgb()); lst<(0.75, QColor::fromRgbF(0.5f, 0.36f, 0.33f).rgb()); lst<(1.00, QColor::fromRgbF(1.0f, 1.0f, 1.0f).rgb()); - - lutstore[palette].lut=JKQTPBuildColorPaletteLUTLinInterpolate(lst); - - - { - const auto palettei=JKQTPMathImageTerrain_STEP; - lutstore[palettei]=JKQTPImageTools::LUTData("terrain_step", QObject::tr("steps: terrain")); - lutstore[palettei].lut=JKQTPBuildColorPaletteLUTColorsOnlySteps(lst); - } + const auto& normLUT=lutstore[JKQTPMathImageTerrain]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTLinInterpolate(lst), "terrain", QObject::tr("terrain")); + const auto& normStepLUT=lutstore[JKQTPMathImageTerrain_STEP]=JKQTPImageTools::LUTData(JKQTPBuildColorPaletteLUTColorsOnlySteps(lst), "stepsterrain", QObject::tr("steps: terrain")); + lutstore[JKQTPMathImageTerrain_STEP].legacyNames<<"terrain_step"; + lutstore[JKQTPMathImageINVERTED_Terrain]=JKQTPImageTools::LUTData(jkqtp_reversed(normLUT.lut), "invterrain", QObject::tr("inv. terrain")); + lutstore[JKQTPMathImageINVERTED_Terrain_STEP]=JKQTPImageTools::LUTData(jkqtp_reversed(normStepLUT.lut), "stepsinvterrain", QObject::tr("steps: inv. terrain")); } + { - const auto palette=JKQTPMathImageBone; - const QString palN="bone"; - const QString palNT=QObject::tr("bone"); - lutstore[palette]=JKQTPImageTools::LUTData( palN, palNT); QList lstR,lstG,lstB; lstR< JKQTPImageTools::getDefaultLUTs() { lstB< lstR,lstG,lstB; lstR< JKQTPImageTools::getDefaultLUTs() { lstB< lstR,lstG,lstB; lstR< JKQTPImageTools::getDefaultLUTs() { lstB< lstR,lstG,lstB; lstR< JKQTPImageTools::getDefaultLUTs() { lstB<(it.key()); } + for (const auto& ln: it.value().legacyNames) { + if (QString::compare(p, ln, Qt::CaseInsensitive)==0) { + return static_cast(it.key()); + } + } } for (auto it=JKQTPImageTools::global_jkqtpimagetools_lutstore.begin(); it!=JKQTPImageTools::global_jkqtpimagetools_lutstore.end(); ++it) { @@ -3350,3 +2449,24 @@ JKQTPImageTools::LUTType JKQTPCreateGreensCubeHelixLUT(float start, float rotati } return res; } + +JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUT(const std::function &palFunc, int lut_size, float vMin, float vMax) +{ + JKQTPImageTools::LUTType res; + const float delta=(vMax-vMin)/static_cast(lut_size-1); + for (int i=0; i(i)*delta; + res< &rFunc, const std::function &gFunc, const std::function &bFunc, int lut_size, float vMin, float vMax) +{ + return JKQTPBuildColorPaletteLUT([&rFunc, &gFunc, &bFunc](float v) { return QColor::fromRgbF(jkqtp_bounded(0.0, rFunc(v), 1.0), jkqtp_bounded(0.0, gFunc(v), 1.0), jkqtp_bounded(0.0, bFunc(v), 1.0)).rgba(); }, lut_size, vMin, vMax); +} + +JKQTPImageTools::LUTType JKQTPBuildColorPaletteLUT(const std::function &rFunc, const std::function &gFunc, const std::function &aFunc, const std::function &bFunc, int lut_size, float vMin, float vMax) +{ + return JKQTPBuildColorPaletteLUT([&rFunc, &gFunc, &bFunc, &aFunc](float v) { return QColor::fromRgbF(jkqtp_bounded(0.0, rFunc(v), 1.0), jkqtp_bounded(0.0, gFunc(v), 1.0), jkqtp_bounded(0.0, bFunc(v), 1.0), jkqtp_bounded(0.0, aFunc(v), 1.0)).rgba(); }, lut_size, vMin, vMax); +} diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.h b/lib/jkqtcommon/jkqtpbasicimagetools.h index 60ebf81af1..7af05f28df 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.h +++ b/lib/jkqtcommon/jkqtpbasicimagetools.h @@ -112,13 +112,21 @@ enum JKQTPMathImageColorPalette { JKQTPMathImageINVERTED_TRAFFICLIGHT, /*!< \image html palettes/palette_invtrafficlight.png */ JKQTPMathImageBone, /*!< \image html palettes/palette_bone.png */ + JKQTPMathImageINVERTED_Bone, /*!< \image html palettes/palette_invbone.png */ JKQTPMathImageCool, /*!< \image html palettes/palette_cool.png */ + JKQTPMathImageINVERTED_Cool, /*!< \image html palettes/palette_invcool.png */ JKQTPMathImageCopper, /*!< \image html palettes/palette_copper.png */ + JKQTPMathImageINVERTED_Copper, /*!< \image html palettes/palette_invcopper.png */ JKQTPMathImageAutumn, /*!< \image html palettes/palette_autumn.png */ + JKQTPMathImageINVERTED_Autumn, /*!< \image html palettes/palette_invautumn.png */ JKQTPMathImageSeismic, /*!< \image html palettes/palette_seismic.png */ - JKQTPMathImageSeismic_STEP, /*!< \image html palettes/palette_seismic_step.png */ + JKQTPMathImageSeismic_STEP, /*!< \image html palettes/palette_stepsseismic.png */ + JKQTPMathImageINVERTED_Seismic, /*!< \image html palettes/palette_invseismic.png */ + JKQTPMathImageINVERTED_Seismic_STEP, /*!< \image html palettes/palette_stepsinvseismic.png */ JKQTPMathImageTerrain, /*!< \image html palettes/palette_terrain.png */ - JKQTPMathImageTerrain_STEP, /*!< \image html palettes/palette_terrain_step.png */ + JKQTPMathImageTerrain_STEP, /*!< \image html palettes/palette_stepsterrain.png */ + JKQTPMathImageINVERTED_Terrain, /*!< \image html palettes/palette_invterrain.png */ + JKQTPMathImageINVERTED_Terrain_STEP, /*!< \image html palettes/palette_stepsterrain.png */ JKQTPMathImageViridis, /*!< \image html palettes/palette_viridis.png \see from https://github.com/BIDS/colormap/blob/master/colormaps.py */ @@ -233,25 +241,37 @@ enum JKQTPMathImageColorPalette { JKQTPMathImageREDWHITEBLUE, /*!< \image html palettes/palette_redwhiteblue.png */ JKQTPMathImageBLACKBLUEREDYELLOW, /*!< \image html palettes/palette_BBlRdYe.png */ + JKQTPMathImageYELLOWREDBLUEBLACK, /*!< \image html palettes/palette_YeRdBlB.png */ JKQTPMathImageGREENREDVIOLET, /*!< \image html palettes/palette_GnRdVi.png */ + JKQTPMathImageVIOLETREDGREEN, /*!< \image html palettes/palette_ViRdGn.png */ JKQTPMathImageBLACKBLUEWHITEYELLOWWHITE, /*!< \image html palettes/palette_BWprint.png */ JKQTPMathImageWHITEYELLOWWHITEBLUEBLACK, /*!< \image html palettes/palette_invBWprint.png */ - JKQTPMathImageBR_GR, /*!< \image html palettes/palette_BrBG.png */ - JKQTPMathImageBrownGreen=JKQTPMathImageBR_GR, /*!< \image html palettes/palette_BrBG.png */ + JKQTPMathImageBR_GR, /*!< \image html palettes/palette_BrGr.png */ + JKQTPMathImageBrownGreen=JKQTPMathImageBR_GR, /*!< \image html palettes/palette_BrGr.png */ + JKQTPMathImageGR_BR, /*!< \image html palettes/palette_GrBr.png */ + JKQTPMathImageGreenBrown=JKQTPMathImageGR_BR, /*!< \image html palettes/palette_GrBr.png */ JKQTPMathImagePU_OR, /*!< \image html palettes/palette_PuOr.png */ - JKQTPMathImageOrangeWhitePurple=JKQTPMathImagePU_OR, /*!< \image html palettes/palette_PuOr.png */ + JKQTPMathImagePurpleWhiteOrange=JKQTPMathImagePU_OR, /*!< \image html palettes/palette_PuOr.png */ + JKQTPMathImageOR_PU, /*!< \image html palettes/palette_OrPu.png */ + JKQTPMathImageOrangeWhitePurple=JKQTPMathImageOR_PU, /*!< \image html palettes/palette_OrPu.png */ JKQTPMathImageGN_BU, /*!< \image html palettes/palette_greenblue.png */ JKQTPMathImageGreenBlue=JKQTPMathImageGN_BU, /*!< \image html palettes/palette_greenblue.png */ JKQTPMathImageBU_GN, /*!< \image html palettes/palette_bluegreen.png */ JKQTPMathImageBlueGreen=JKQTPMathImageBU_GN, /*!< \image html palettes/palette_bluegreen.png */ JKQTPMathImageYL_GN_BU, /*!< \image html palettes/palette_YeGnBu.png */ JKQTPMathImageYellowGreenBlue=JKQTPMathImageYL_GN_BU, /*!< \image html palettes/palette_YeGnBu.png */ + JKQTPMathImageBU_GN_YL, /*!< \image html palettes/palette_BuGnYe.png */ + JKQTPMathImageBU_GN_YE=JKQTPMathImageBU_GN_YL, /*!< \image html palettes/palette_BuGnYe.png */ + JKQTPMathImageBlueGreenYellow=JKQTPMathImageBU_GN_YE, /*!< \image html palettes/palette_BuGnYe.png */ - JKQTPMathImageBR_GR_STEP, /*!< \image html palettes/palette_stepsBrBG.png */ + JKQTPMathImageBR_GR_STEP, /*!< \image html palettes/palette_stepsBrGr.png */ + JKQTPMathImageGR_BR_STEP, /*!< \image html palettes/palette_stepsGrBr.png */ JKQTPMathImagePU_OR_STEP, /*!< \image html palettes/palette_stepsPuOr.png */ + JKQTPMathImageOR_PU_STEP, /*!< \image html palettes/palette_stepsOrPu.png */ JKQTPMathImageGN_BU_STEP, /*!< \image html palettes/palette_stepsGnBl.png */ JKQTPMathImageBU_GN_STEP, /*!< \image html palettes/palette_stepsBlGn.png */ JKQTPMathImageYL_GN_BU_STEP, /*!< \image html palettes/palette_stepsYeGnBu.png */ + JKQTPMathImageBU_GN_YL_STEP, /*!< \image html palettes/palette_stepsBuGnYe.png */ JKQTPMathImageCYANWHITE, /*!< \image html palettes/palette_cyanwhite.png */ @@ -577,6 +597,8 @@ struct JKQTPImageTools { QString name; /** \brief name for the LUT (localized, human-readable) */ QString nameT; + /** \brief legacy (formerly used, but deprecated) name(s) for the LUT (machine-readable) */ + QList legacyNames; }; /*! \brief internal global storage object for lookup-tables @@ -1102,6 +1124,27 @@ public: #endif template inline JKQTPPaletteList(std::initializer_list> args): ListType(args) {}; + inline JKQTPPaletteList(std::initializer_list args): + ListType() + { + for(const auto& v: args) { + push_back(v); + } + }; + inline JKQTPPaletteList(std::initializer_list args): + ListType() + { + for(const auto& v: args) { + push_back(v); + } + }; + inline JKQTPPaletteList(std::initializer_list> args): + ListType() + { + for(const auto& v: args) { + push_back(v.first, v.second); + } + }; template = true> inline JKQTPPaletteList(InputIterator first, InputIterator last): ListType(first, last) {}; inline JKQTPPaletteList(ListType &&other):ListType(std::forward(other)) {}; @@ -1281,6 +1324,25 @@ JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUTLinInter */ JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT(const QMap& items, int lut_size=JKQTPImageTools::LUTSIZE); +/*! \brief Builds a LUT by evaluating \a palFunc(v) for \c v in the range \a vMin ... \a vMax at \a lut_size equally distributed locations + \ingroup jkqtplotter_imagelots_tools_LUTS +*/ +JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT(const std::function& palFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0); + +/*! \brief Builds a LUT by evaluating the triple RGB = ( \a rFunc(v) , \a gFunc(v) , \a bFunc(v) ) for \c v in the range \a vMin ... \a vMax at \a lut_size equally distributed locations + \ingroup jkqtplotter_imagelots_tools_LUTS + + \note Each function should return a value between 0 and 1. If the values are larger, the are clipped to this range! +*/ +JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT(const std::function& rFunc, const std::function& gFunc, const std::function& bFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0); + +/*! \brief Builds a LUT by evaluating the quadruple RGBA = ( \a rFunc(v) , \a gFunc(v) , \a bFunc(v) ) for \c v in the range \a vMin ... \a vMax at \a lut_size equally distributed locations. + \ingroup jkqtplotter_imagelots_tools_LUTS + + \note Each function should return a value between 0 and 1. If the values are larger, the are clipped to this range! +*/ +JKQTPImageTools::LUTType JKQTCOMMON_LIB_EXPORT JKQTPBuildColorPaletteLUT(const std::function& rFunc, const std::function& gFunc, const std::function& bFunc, const std::function& aFunc, int lut_size=JKQTPImageTools::LUTSIZE, float vMin=0.0, float vMax=1.0); + /*! \brief takes an existing JKQTPImageTools::LUTType and subsamples \a lut_size elements from it \ingroup jkqtplotter_imagelots_tools_LUTS diff --git a/lib/jkqtcommon/jkqtpmathtools.h b/lib/jkqtcommon/jkqtpmathtools.h index cb0aab3388..e8309d56b9 100644 --- a/lib/jkqtcommon/jkqtpmathtools.h +++ b/lib/jkqtcommon/jkqtpmathtools.h @@ -539,4 +539,14 @@ JKQTCOMMON_LIB_EXPORT uint64_t jkqtp_gcd(uint64_t a, uint64_t b); */ JKQTCOMMON_LIB_EXPORT void jkqtp_estimateFraction(double input, int &sign, uint64_t &intpart, uint64_t& num, uint64_t& denom, unsigned int precision=9); + +/*! \brief returns the reversed containter \a l + \ingroup jkqtptools_math_basic + + */ +template +inline T jkqtp_reversed(const T& l) { + return T(l.rbegin(), l.rend()); +} + #endif // jkqtpmathtools_H_INCLUDED