diff --git a/src/cfl2png.c b/src/cfl2png.c index 0725fd0..f37b996 100644 --- a/src/cfl2png.c +++ b/src/cfl2png.c @@ -78,6 +78,8 @@ int main(int argc, char* argv[argc]) OPT_SELECT('R', enum mode_t, &mode, REAL, "real"), OPT_SELECT('T', enum mode_t, &mode, MAGN_TURBO, "magnitude turbo"), OPT_SELECT('F', enum mode_t, &mode, FLOW, "flow"), + OPT_SELECT('1', enum mode_t, &mode, LIPARI_T1, "lipari (T1, R1)"), + OPT_SELECT('2', enum mode_t, &mode, NAVIA_T2, "navia (T2, R2)"), }; struct opt_s flipopt[] = { diff --git a/src/colormaps.inc b/src/colormaps.inc index 4e00204..90cf29b 100644 --- a/src/colormaps.inc +++ b/src/colormaps.inc @@ -562,3 +562,38 @@ static const double viridis[256][3] = { // The look-up tables contains 256 entries. Each entry is a an sRGB triplet. static const double turbo[256][3] = {{0.18995,0.07176,0.23217},{0.19483,0.08339,0.26149},{0.19956,0.09498,0.29024},{0.20415,0.10652,0.31844},{0.20860,0.11802,0.34607},{0.21291,0.12947,0.37314},{0.21708,0.14087,0.39964},{0.22111,0.15223,0.42558},{0.22500,0.16354,0.45096},{0.22875,0.17481,0.47578},{0.23236,0.18603,0.50004},{0.23582,0.19720,0.52373},{0.23915,0.20833,0.54686},{0.24234,0.21941,0.56942},{0.24539,0.23044,0.59142},{0.24830,0.24143,0.61286},{0.25107,0.25237,0.63374},{0.25369,0.26327,0.65406},{0.25618,0.27412,0.67381},{0.25853,0.28492,0.69300},{0.26074,0.29568,0.71162},{0.26280,0.30639,0.72968},{0.26473,0.31706,0.74718},{0.26652,0.32768,0.76412},{0.26816,0.33825,0.78050},{0.26967,0.34878,0.79631},{0.27103,0.35926,0.81156},{0.27226,0.36970,0.82624},{0.27334,0.38008,0.84037},{0.27429,0.39043,0.85393},{0.27509,0.40072,0.86692},{0.27576,0.41097,0.87936},{0.27628,0.42118,0.89123},{0.27667,0.43134,0.90254},{0.27691,0.44145,0.91328},{0.27701,0.45152,0.92347},{0.27698,0.46153,0.93309},{0.27680,0.47151,0.94214},{0.27648,0.48144,0.95064},{0.27603,0.49132,0.95857},{0.27543,0.50115,0.96594},{0.27469,0.51094,0.97275},{0.27381,0.52069,0.97899},{0.27273,0.53040,0.98461},{0.27106,0.54015,0.98930},{0.26878,0.54995,0.99303},{0.26592,0.55979,0.99583},{0.26252,0.56967,0.99773},{0.25862,0.57958,0.99876},{0.25425,0.58950,0.99896},{0.24946,0.59943,0.99835},{0.24427,0.60937,0.99697},{0.23874,0.61931,0.99485},{0.23288,0.62923,0.99202},{0.22676,0.63913,0.98851},{0.22039,0.64901,0.98436},{0.21382,0.65886,0.97959},{0.20708,0.66866,0.97423},{0.20021,0.67842,0.96833},{0.19326,0.68812,0.96190},{0.18625,0.69775,0.95498},{0.17923,0.70732,0.94761},{0.17223,0.71680,0.93981},{0.16529,0.72620,0.93161},{0.15844,0.73551,0.92305},{0.15173,0.74472,0.91416},{0.14519,0.75381,0.90496},{0.13886,0.76279,0.89550},{0.13278,0.77165,0.88580},{0.12698,0.78037,0.87590},{0.12151,0.78896,0.86581},{0.11639,0.79740,0.85559},{0.11167,0.80569,0.84525},{0.10738,0.81381,0.83484},{0.10357,0.82177,0.82437},{0.10026,0.82955,0.81389},{0.09750,0.83714,0.80342},{0.09532,0.84455,0.79299},{0.09377,0.85175,0.78264},{0.09287,0.85875,0.77240},{0.09267,0.86554,0.76230},{0.09320,0.87211,0.75237},{0.09451,0.87844,0.74265},{0.09662,0.88454,0.73316},{0.09958,0.89040,0.72393},{0.10342,0.89600,0.71500},{0.10815,0.90142,0.70599},{0.11374,0.90673,0.69651},{0.12014,0.91193,0.68660},{0.12733,0.91701,0.67627},{0.13526,0.92197,0.66556},{0.14391,0.92680,0.65448},{0.15323,0.93151,0.64308},{0.16319,0.93609,0.63137},{0.17377,0.94053,0.61938},{0.18491,0.94484,0.60713},{0.19659,0.94901,0.59466},{0.20877,0.95304,0.58199},{0.22142,0.95692,0.56914},{0.23449,0.96065,0.55614},{0.24797,0.96423,0.54303},{0.26180,0.96765,0.52981},{0.27597,0.97092,0.51653},{0.29042,0.97403,0.50321},{0.30513,0.97697,0.48987},{0.32006,0.97974,0.47654},{0.33517,0.98234,0.46325},{0.35043,0.98477,0.45002},{0.36581,0.98702,0.43688},{0.38127,0.98909,0.42386},{0.39678,0.99098,0.41098},{0.41229,0.99268,0.39826},{0.42778,0.99419,0.38575},{0.44321,0.99551,0.37345},{0.45854,0.99663,0.36140},{0.47375,0.99755,0.34963},{0.48879,0.99828,0.33816},{0.50362,0.99879,0.32701},{0.51822,0.99910,0.31622},{0.53255,0.99919,0.30581},{0.54658,0.99907,0.29581},{0.56026,0.99873,0.28623},{0.57357,0.99817,0.27712},{0.58646,0.99739,0.26849},{0.59891,0.99638,0.26038},{0.61088,0.99514,0.25280},{0.62233,0.99366,0.24579},{0.63323,0.99195,0.23937},{0.64362,0.98999,0.23356},{0.65394,0.98775,0.22835},{0.66428,0.98524,0.22370},{0.67462,0.98246,0.21960},{0.68494,0.97941,0.21602},{0.69525,0.97610,0.21294},{0.70553,0.97255,0.21032},{0.71577,0.96875,0.20815},{0.72596,0.96470,0.20640},{0.73610,0.96043,0.20504},{0.74617,0.95593,0.20406},{0.75617,0.95121,0.20343},{0.76608,0.94627,0.20311},{0.77591,0.94113,0.20310},{0.78563,0.93579,0.20336},{0.79524,0.93025,0.20386},{0.80473,0.92452,0.20459},{0.81410,0.91861,0.20552},{0.82333,0.91253,0.20663},{0.83241,0.90627,0.20788},{0.84133,0.89986,0.20926},{0.85010,0.89328,0.21074},{0.85868,0.88655,0.21230},{0.86709,0.87968,0.21391},{0.87530,0.87267,0.21555},{0.88331,0.86553,0.21719},{0.89112,0.85826,0.21880},{0.89870,0.85087,0.22038},{0.90605,0.84337,0.22188},{0.91317,0.83576,0.22328},{0.92004,0.82806,0.22456},{0.92666,0.82025,0.22570},{0.93301,0.81236,0.22667},{0.93909,0.80439,0.22744},{0.94489,0.79634,0.22800},{0.95039,0.78823,0.22831},{0.95560,0.78005,0.22836},{0.96049,0.77181,0.22811},{0.96507,0.76352,0.22754},{0.96931,0.75519,0.22663},{0.97323,0.74682,0.22536},{0.97679,0.73842,0.22369},{0.98000,0.73000,0.22161},{0.98289,0.72140,0.21918},{0.98549,0.71250,0.21650},{0.98781,0.70330,0.21358},{0.98986,0.69382,0.21043},{0.99163,0.68408,0.20706},{0.99314,0.67408,0.20348},{0.99438,0.66386,0.19971},{0.99535,0.65341,0.19577},{0.99607,0.64277,0.19165},{0.99654,0.63193,0.18738},{0.99675,0.62093,0.18297},{0.99672,0.60977,0.17842},{0.99644,0.59846,0.17376},{0.99593,0.58703,0.16899},{0.99517,0.57549,0.16412},{0.99419,0.56386,0.15918},{0.99297,0.55214,0.15417},{0.99153,0.54036,0.14910},{0.98987,0.52854,0.14398},{0.98799,0.51667,0.13883},{0.98590,0.50479,0.13367},{0.98360,0.49291,0.12849},{0.98108,0.48104,0.12332},{0.97837,0.46920,0.11817},{0.97545,0.45740,0.11305},{0.97234,0.44565,0.10797},{0.96904,0.43399,0.10294},{0.96555,0.42241,0.09798},{0.96187,0.41093,0.09310},{0.95801,0.39958,0.08831},{0.95398,0.38836,0.08362},{0.94977,0.37729,0.07905},{0.94538,0.36638,0.07461},{0.94084,0.35566,0.07031},{0.93612,0.34513,0.06616},{0.93125,0.33482,0.06218},{0.92623,0.32473,0.05837},{0.92105,0.31489,0.05475},{0.91572,0.30530,0.05134},{0.91024,0.29599,0.04814},{0.90463,0.28696,0.04516},{0.89888,0.27824,0.04243},{0.89298,0.26981,0.03993},{0.88691,0.26152,0.03753},{0.88066,0.25334,0.03521},{0.87422,0.24526,0.03297},{0.86760,0.23730,0.03082},{0.86079,0.22945,0.02875},{0.85380,0.22170,0.02677},{0.84662,0.21407,0.02487},{0.83926,0.20654,0.02305},{0.83172,0.19912,0.02131},{0.82399,0.19182,0.01966},{0.81608,0.18462,0.01809},{0.80799,0.17753,0.01660},{0.79971,0.17055,0.01520},{0.79125,0.16368,0.01387},{0.78260,0.15693,0.01264},{0.77377,0.15028,0.01148},{0.76476,0.14374,0.01041},{0.75556,0.13731,0.00942},{0.74617,0.13098,0.00851},{0.73661,0.12477,0.00769},{0.72686,0.11867,0.00695},{0.71692,0.11268,0.00629},{0.70680,0.10680,0.00571},{0.69650,0.10102,0.00522},{0.68602,0.09536,0.00481},{0.67535,0.08980,0.00449},{0.66449,0.08436,0.00424},{0.65345,0.07902,0.00408},{0.64223,0.07380,0.00401},{0.63082,0.06868,0.00401},{0.61923,0.06367,0.00410},{0.60746,0.05878,0.00427},{0.59550,0.05399,0.00453},{0.58336,0.04931,0.00486},{0.57103,0.04474,0.00529},{0.55852,0.04028,0.00579},{0.54583,0.03593,0.00638},{0.53295,0.03169,0.00705},{0.51989,0.02756,0.00780},{0.50664,0.02354,0.00863},{0.49321,0.01963,0.00955},{0.47960,0.01583,0.01055}}; + + + + +// Lipari and Navia are the colormaps recommended by the Quantitative-MR Study Group of the ISMRM. +// See +// https://cig-utrecht.org/blog/2023/11/27/colormap-relaxometry.html +// for more information. + +// These colormaps are licensed unser an MIT License by their creator: + +// The Scientific colour maps are licensed under a MIT License +// Copyright (c) 2023, Fabio Crameri +// Permission is hereby granted, free of charge, to any person ob­ +// taining a copy of this software and associated documentation +// files (the ”Software”), to deal in the Software without restric­ +// tion, including without limitation the rights to use, copy, modify, +// merge, publish, distribute, sublicense, and/or sell copies of the +// Software, and to permit persons to whom the Software is fur­ +// nished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED ”AS IS”, WITHOUT WARRANTY OF +// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN AC­ +// TION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +static const double lipari[256][3] = {{0.011370,0.073240,0.148284},{0.013965,0.079062,0.155370},{0.015899,0.084718,0.162521},{0.017234,0.090035,0.169728},{0.018046,0.095138,0.176970},{0.018987,0.100000,0.184274},{0.019970,0.104911,0.191606},{0.021000,0.109963,0.198961},{0.022084,0.114884,0.206390},{0.023227,0.119924,0.213776},{0.024440,0.124981,0.221213},{0.025732,0.130104,0.228657},{0.027114,0.135178,0.236104},{0.028602,0.140291,0.243540},{0.030209,0.145478,0.251025},{0.031951,0.150619,0.258480},{0.033828,0.155833,0.265955},{0.036137,0.161049,0.273414},{0.038425,0.166276,0.280837},{0.040951,0.171536,0.288282},{0.043537,0.176819,0.295697},{0.046467,0.182111,0.303085},{0.049594,0.187473,0.310472},{0.052785,0.192789,0.317790},{0.056373,0.198137,0.325072},{0.060123,0.203522,0.332335},{0.064059,0.208893,0.339525},{0.068323,0.214290,0.346641},{0.072795,0.219688,0.353691},{0.077499,0.225063,0.360661},{0.082595,0.230463,0.367551},{0.087912,0.235873,0.374351},{0.093441,0.241239,0.381025},{0.099307,0.246590,0.387560},{0.105413,0.251937,0.393974},{0.111813,0.257230,0.400242},{0.118433,0.262485,0.406341},{0.125243,0.267672,0.412263},{0.132308,0.272835,0.417985},{0.139522,0.277918,0.423506},{0.146980,0.282919,0.428820},{0.154569,0.287803,0.433888},{0.162316,0.292606,0.438725},{0.170138,0.297302,0.443314},{0.178074,0.301843,0.447622},{0.186034,0.306290,0.451681},{0.194038,0.310565,0.455448},{0.202008,0.314663,0.458938},{0.210000,0.318627,0.462138},{0.217939,0.322418,0.465058},{0.225808,0.326006,0.467698},{0.233544,0.329454,0.470063},{0.241213,0.332694,0.472151},{0.248744,0.335738,0.473965},{0.256094,0.338600,0.475542},{0.263329,0.341290,0.476858},{0.270378,0.343785,0.477950},{0.277238,0.346109,0.478825},{0.283919,0.348279,0.479499},{0.290422,0.350279,0.479979},{0.296766,0.352104,0.480280},{0.302897,0.353796,0.480422},{0.308898,0.355368,0.480419},{0.314684,0.356787,0.480285},{0.320355,0.358086,0.480032},{0.325830,0.359270,0.479670},{0.331185,0.360355,0.479208},{0.336416,0.361358,0.478660},{0.341527,0.362272,0.478039},{0.346516,0.363098,0.477353},{0.351412,0.363861,0.476608},{0.356223,0.364562,0.475814},{0.360933,0.365208,0.474974},{0.365601,0.365807,0.474080},{0.370195,0.366362,0.473154},{0.374753,0.366868,0.472216},{0.379261,0.367335,0.471236},{0.383746,0.367781,0.470232},{0.388198,0.368207,0.469210},{0.392637,0.368608,0.468151},{0.397066,0.368982,0.467095},{0.401502,0.369337,0.466002},{0.405945,0.369677,0.464911},{0.410391,0.370008,0.463798},{0.414838,0.370329,0.462661},{0.419318,0.370641,0.461530},{0.423806,0.370946,0.460367},{0.428335,0.371246,0.459212},{0.432886,0.371542,0.458027},{0.437471,0.371834,0.456836},{0.442084,0.372124,0.455637},{0.446721,0.372413,0.454430},{0.451402,0.372700,0.453200},{0.456112,0.372987,0.451972},{0.460861,0.373274,0.450722},{0.465644,0.373563,0.449468},{0.470480,0.373853,0.448196},{0.475346,0.374142,0.446922},{0.480239,0.374430,0.445630},{0.485169,0.374716,0.444348},{0.490149,0.375002,0.443038},{0.495165,0.375292,0.441725},{0.500209,0.375588,0.440391},{0.505298,0.375890,0.439053},{0.510431,0.376194,0.437723},{0.515595,0.376498,0.436363},{0.520808,0.376800,0.435003},{0.526060,0.377102,0.433614},{0.531345,0.377408,0.432248},{0.536679,0.377717,0.430847},{0.542039,0.378031,0.429441},{0.547450,0.378347,0.428030},{0.552900,0.378667,0.426602},{0.558389,0.378991,0.425175},{0.563937,0.379317,0.423722},{0.569504,0.379648,0.422267},{0.575126,0.379984,0.420807},{0.580790,0.380325,0.419345},{0.586496,0.380672,0.417860},{0.592251,0.381023,0.416371},{0.598033,0.381375,0.414871},{0.603878,0.381729,0.413368},{0.609753,0.382092,0.411849},{0.615676,0.382468,0.410336},{0.621644,0.382858,0.408797},{0.627665,0.383257,0.407260},{0.633729,0.383660,0.405726},{0.639835,0.384073,0.404170},{0.645983,0.384501,0.402616},{0.652186,0.384947,0.401076},{0.658430,0.385413,0.399501},{0.664720,0.385899,0.397959},{0.671065,0.386410,0.396398},{0.677455,0.386948,0.394848},{0.683877,0.387517,0.393300},{0.690355,0.388122,0.391767},{0.696877,0.388769,0.390232},{0.703442,0.389446,0.388729},{0.710045,0.390171,0.387222},{0.716690,0.390967,0.385745},{0.723361,0.391808,0.384300},{0.730077,0.392714,0.382885},{0.736813,0.393699,0.381501},{0.743578,0.394768,0.380152},{0.750358,0.395931,0.378850},{0.757152,0.397174,0.377604},{0.763951,0.398543,0.376424},{0.770753,0.400018,0.375287},{0.777544,0.401621,0.374250},{0.784314,0.403371,0.373272},{0.791048,0.405253,0.372388},{0.797746,0.407293,0.371603},{0.804395,0.409503,0.370926},{0.810973,0.411881,0.370362},{0.817473,0.414442,0.369920},{0.823879,0.417202,0.369609},{0.830181,0.420143,0.369436},{0.836353,0.423287,0.369406},{0.842390,0.426648,0.369526},{0.848263,0.430214,0.369804},{0.853968,0.433978,0.370247},{0.859490,0.437974,0.370858},{0.864803,0.442161,0.371642},{0.869899,0.446539,0.372604},{0.874767,0.451122,0.373748},{0.879389,0.455884,0.375054},{0.883761,0.460820,0.376553},{0.887860,0.465922,0.378203},{0.891692,0.471184,0.380033},{0.895246,0.476567,0.382020},{0.898512,0.482077,0.384174},{0.901498,0.487690,0.386470},{0.904197,0.493374,0.388928},{0.906618,0.499143,0.391507},{0.908756,0.504965,0.394202},{0.910625,0.510820,0.397017},{0.912225,0.516705,0.399943},{0.913575,0.522593,0.402968},{0.914675,0.528483,0.406078},{0.915540,0.534347,0.409251},{0.916190,0.540189,0.412504},{0.916636,0.546003,0.415797},{0.916889,0.551762,0.419152},{0.916963,0.557475,0.422534},{0.916874,0.563131,0.425965},{0.916636,0.568719,0.429427},{0.916264,0.574252,0.432909},{0.915775,0.579733,0.436411},{0.915186,0.585140,0.439927},{0.914509,0.590475,0.443461},{0.913754,0.595759,0.447003},{0.912931,0.600980,0.450565},{0.912059,0.606142,0.454139},{0.911148,0.611261,0.457722},{0.910211,0.616321,0.461331},{0.909249,0.621333,0.464954},{0.908289,0.626308,0.468602},{0.907326,0.631251,0.472281},{0.906374,0.636160,0.475986},{0.905445,0.641036,0.479732},{0.904539,0.645900,0.483509},{0.903673,0.650752,0.487354},{0.902853,0.655593,0.491251},{0.902079,0.660426,0.495194},{0.901366,0.665267,0.499209},{0.900717,0.670121,0.503303},{0.900141,0.674976,0.507492},{0.899641,0.679851,0.511757},{0.899223,0.684756,0.516121},{0.898892,0.689692,0.520598},{0.898654,0.694648,0.525185},{0.898515,0.699650,0.529889},{0.898480,0.704692,0.534713},{0.898551,0.709779,0.539663},{0.898735,0.714907,0.544759},{0.899033,0.720090,0.549990},{0.899448,0.725327,0.555359},{0.899981,0.730608,0.560882},{0.900635,0.735945,0.566560},{0.901414,0.741342,0.572384},{0.902319,0.746799,0.578354},{0.903350,0.752305,0.584490},{0.904502,0.757873,0.590772},{0.905785,0.763489,0.597217},{0.907189,0.769161,0.603808},{0.908714,0.774888,0.610543},{0.910365,0.780666,0.617427},{0.912129,0.786497,0.624458},{0.914016,0.792365,0.631624},{0.916005,0.798281,0.638924},{0.918116,0.804242,0.646354},{0.920324,0.810234,0.653908},{0.922640,0.816274,0.661585},{0.925046,0.822341,0.669369},{0.927548,0.828436,0.677263},{0.930142,0.834563,0.685252},{0.932811,0.840714,0.693336},{0.935565,0.846882,0.701504},{0.938387,0.853077,0.709763},{0.941274,0.859286,0.718088},{0.944228,0.865508,0.726484},{0.947235,0.871746,0.734943},{0.950290,0.877987,0.743453},{0.953394,0.884237,0.752011},{0.956533,0.890486,0.760613},{0.959709,0.896742,0.769246},{0.962913,0.902994,0.777919},{0.966140,0.909240,0.786616},{0.969388,0.915482,0.795324},{0.972654,0.921726,0.804056},{0.975921,0.927954,0.812794},{0.979202,0.934179,0.821550},{0.982484,0.940402,0.830308},{0.985762,0.946610,0.839070},{0.989038,0.952817,0.847836},{0.992307,0.959017,0.856609}}; + +static const double navia[256][3] = {{0.013420,0.075817,0.152989},{0.015121,0.080634,0.159960},{0.016255,0.085228,0.167073},{0.016803,0.089716,0.174205},{0.016961,0.093990,0.181411},{0.017336,0.098133,0.188743},{0.017703,0.102263,0.196117},{0.018058,0.106514,0.203551},{0.018404,0.110739,0.211044},{0.018742,0.114975,0.218604},{0.019071,0.119327,0.226230},{0.019395,0.123667,0.233875},{0.019714,0.128112,0.241609},{0.020031,0.132548,0.249362},{0.020346,0.137020,0.257176},{0.020663,0.141543,0.265003},{0.020984,0.146080,0.272884},{0.021310,0.150645,0.280769},{0.021644,0.155250,0.288708},{0.021990,0.159855,0.296649},{0.022349,0.164550,0.304590},{0.022726,0.169252,0.312535},{0.023123,0.173933,0.320514},{0.023543,0.178678,0.328453},{0.023992,0.183406,0.336383},{0.024471,0.188212,0.344302},{0.024987,0.192980,0.352204},{0.025542,0.197784,0.360075},{0.026143,0.202606,0.367909},{0.026794,0.207462,0.375703},{0.027501,0.212323,0.383455},{0.028270,0.217191,0.391145},{0.029108,0.222061,0.398763},{0.030020,0.226972,0.406327},{0.031016,0.231888,0.413802},{0.032099,0.236810,0.421189},{0.033282,0.241728,0.428497},{0.034665,0.246655,0.435701},{0.036177,0.251620,0.442789},{0.037711,0.256558,0.449756},{0.039376,0.261524,0.456594},{0.041190,0.266493,0.463294},{0.042961,0.271453,0.469870},{0.045066,0.276447,0.476271},{0.047153,0.281406,0.482514},{0.049396,0.286374,0.488587},{0.051602,0.291371,0.494481},{0.053996,0.296335,0.500174},{0.056570,0.301290,0.505677},{0.059155,0.306271,0.510984},{0.061738,0.311207,0.516069},{0.064526,0.316148,0.520947},{0.067354,0.321058,0.525594},{0.070218,0.325940,0.530009},{0.073219,0.330814,0.534182},{0.076127,0.335670,0.538131},{0.079162,0.340477,0.541813},{0.082310,0.345245,0.545267},{0.085333,0.349976,0.548472},{0.088490,0.354659,0.551417},{0.091644,0.359270,0.554118},{0.094766,0.363832,0.556572},{0.097864,0.368336,0.558778},{0.100919,0.372752,0.560753},{0.104007,0.377108,0.562497},{0.107081,0.381374,0.564002},{0.110099,0.385537,0.565273},{0.113065,0.389625,0.566351},{0.115972,0.393615,0.567218},{0.118845,0.397510,0.567882},{0.121615,0.401307,0.568363},{0.124403,0.404991,0.568671},{0.127118,0.408585,0.568816},{0.129840,0.412081,0.568808},{0.132441,0.415470,0.568659},{0.135022,0.418767,0.568380},{0.137551,0.421970,0.567982},{0.139985,0.425101,0.567475},{0.142452,0.428133,0.566866},{0.144870,0.431091,0.566160},{0.147220,0.433959,0.565369},{0.149576,0.436782,0.564516},{0.151851,0.439525,0.563597},{0.154137,0.442220,0.562611},{0.156434,0.444849,0.561566},{0.158673,0.447417,0.560478},{0.160888,0.449959,0.559346},{0.163114,0.452457,0.558172},{0.165274,0.454907,0.556983},{0.167499,0.457313,0.555739},{0.169695,0.459700,0.554492},{0.171844,0.462052,0.553207},{0.174021,0.464387,0.551920},{0.176160,0.466681,0.550603},{0.178369,0.468960,0.549279},{0.180492,0.471215,0.547940},{0.182644,0.473440,0.546595},{0.184823,0.475673,0.545236},{0.186971,0.477869,0.543872},{0.189125,0.480063,0.542508},{0.191270,0.482238,0.541130},{0.193440,0.484393,0.539754},{0.195587,0.486551,0.538389},{0.197750,0.488697,0.537010},{0.199899,0.490844,0.535616},{0.202078,0.492957,0.534235},{0.204288,0.495093,0.532857},{0.206475,0.497214,0.531468},{0.208638,0.499326,0.530082},{0.210837,0.501454,0.528697},{0.213030,0.503562,0.527302},{0.215251,0.505676,0.525907},{0.217492,0.507811,0.524508},{0.219733,0.509929,0.523111},{0.221968,0.512056,0.521697},{0.224223,0.514200,0.520288},{0.226532,0.516330,0.518887},{0.228826,0.518491,0.517467},{0.231132,0.520642,0.516028},{0.233434,0.522815,0.514608},{0.235808,0.524993,0.513165},{0.238158,0.527190,0.511714},{0.240527,0.529397,0.510260},{0.242938,0.531613,0.508803},{0.245362,0.533842,0.507323},{0.247837,0.536101,0.505829},{0.250281,0.538380,0.504350},{0.252797,0.540662,0.502829},{0.255325,0.542974,0.501320},{0.257852,0.545302,0.499775},{0.260437,0.547651,0.498247},{0.263045,0.550026,0.496671},{0.265674,0.552426,0.495106},{0.268327,0.554845,0.493511},{0.271026,0.557299,0.491915},{0.273750,0.559769,0.490291},{0.276504,0.562275,0.488653},{0.279291,0.564792,0.487000},{0.282108,0.567358,0.485321},{0.284940,0.569938,0.483632},{0.287830,0.572565,0.481933},{0.290758,0.575210,0.480205},{0.293713,0.577887,0.478456},{0.296725,0.580608,0.476693},{0.299755,0.583353,0.474918},{0.302814,0.586141,0.473100},{0.305952,0.588949,0.471290},{0.309104,0.591813,0.469452},{0.312267,0.594697,0.467584},{0.315523,0.597624,0.465694},{0.318795,0.600585,0.463804},{0.322118,0.603591,0.461886},{0.325473,0.606628,0.459945},{0.328904,0.609705,0.457993},{0.332367,0.612819,0.456024},{0.335866,0.615981,0.454041},{0.339437,0.619188,0.452047},{0.343048,0.622419,0.450027},{0.346709,0.625704,0.447996},{0.350441,0.629031,0.445960},{0.354216,0.632401,0.443930},{0.358071,0.635814,0.441885},{0.361985,0.639273,0.439829},{0.365969,0.642778,0.437786},{0.370017,0.646328,0.435739},{0.374165,0.649930,0.433689},{0.378375,0.653574,0.431684},{0.382682,0.657277,0.429670},{0.387076,0.661018,0.427695},{0.391586,0.664815,0.425736},{0.396188,0.668672,0.423819},{0.400915,0.672578,0.421948},{0.405747,0.676534,0.420141},{0.410710,0.680539,0.418384},{0.415800,0.684609,0.416716},{0.421036,0.688741,0.415117},{0.426430,0.692921,0.413622},{0.431996,0.697151,0.412238},{0.437712,0.701442,0.410969},{0.443601,0.705794,0.409842},{0.449678,0.710198,0.408859},{0.455945,0.714651,0.408050},{0.462409,0.719165,0.407425},{0.469094,0.723723,0.407003},{0.475974,0.728332,0.406801},{0.483066,0.732990,0.406834},{0.490390,0.737682,0.407121},{0.497935,0.742421,0.407680},{0.505675,0.747187,0.408529},{0.513668,0.751981,0.409686},{0.521853,0.756797,0.411156},{0.530269,0.761628,0.412971},{0.538886,0.766471,0.415116},{0.547692,0.771318,0.417631},{0.556690,0.776152,0.420499},{0.565854,0.780975,0.423745},{0.575184,0.785778,0.427379},{0.584655,0.790546,0.431376},{0.594246,0.795277,0.435745},{0.603948,0.799967,0.440475},{0.613718,0.804596,0.445574},{0.623571,0.809166,0.451034},{0.633452,0.813660,0.456821},{0.643349,0.818084,0.462930},{0.653247,0.822434,0.469371},{0.663131,0.826693,0.476077},{0.672961,0.830863,0.483052},{0.682722,0.834941,0.490287},{0.692413,0.838924,0.497751},{0.701988,0.842817,0.505395},{0.711468,0.846607,0.513248},{0.720806,0.850311,0.521252},{0.730018,0.853916,0.529404},{0.739078,0.857435,0.537670},{0.747979,0.860865,0.546036},{0.756716,0.864214,0.554480},{0.765293,0.867473,0.562995},{0.773690,0.870656,0.571548},{0.781928,0.873770,0.580146},{0.789985,0.876809,0.588748},{0.797871,0.879788,0.597375},{0.805587,0.882702,0.605980},{0.813135,0.885563,0.614576},{0.820517,0.888367,0.623153},{0.827735,0.891117,0.631684},{0.834795,0.893822,0.640175},{0.841696,0.896485,0.648607},{0.848439,0.899102,0.656986},{0.855036,0.901678,0.665289},{0.861480,0.904216,0.673526},{0.867785,0.906721,0.681675},{0.873943,0.909184,0.689751},{0.879964,0.911616,0.697724},{0.885854,0.914016,0.705609},{0.891606,0.916374,0.713389},{0.897231,0.918701,0.721062},{0.902724,0.920996,0.728629},{0.908093,0.923262,0.736080},{0.913337,0.925486,0.743425},{0.918458,0.927676,0.750645},{0.923468,0.929837,0.757743},{0.928353,0.931959,0.764721},{0.933130,0.934048,0.771578},{0.937802,0.936108,0.778308},{0.942365,0.938126,0.784921},{0.946819,0.940114,0.791406},{0.951178,0.942064,0.797775},{0.955439,0.943981,0.804030},{0.959606,0.945864,0.810165},{0.963686,0.947720,0.816201},{0.967690,0.949541,0.822128},{0.971611,0.951338,0.827953},{0.975464,0.953108,0.833700},{0.979259,0.954852,0.839361},{0.982996,0.956574,0.844951},{0.986688,0.958281,0.850479}}; diff --git a/src/draw.c b/src/draw.c index 215e75b..bf60078 100644 --- a/src/draw.c +++ b/src/draw.c @@ -72,6 +72,20 @@ static void trans_magnitude_turbo(double rgb[3], double a, double b, complex dou interpolate_cmap(rgb, magn, turbo); } +static void trans_magnitude_lipari(double rgb[3], double a, double b, complex double value) +{ + double magn = window(a, b, cabs(value)); + + interpolate_cmap(rgb, magn, lipari); +} + +static void trans_magnitude_navia(double rgb[3], double a, double b, complex double value) +{ + double magn = window(a, b, cabs(value)); + + interpolate_cmap(rgb, magn, navia); +} + static void trans_real(double rgb[3], double a, double b, complex double value) { rgb[0] *= window(a, b, +creal(value)); @@ -366,6 +380,8 @@ extern void draw(int X, int Y, int rgbstr, unsigned char (*rgbbuf)[Y][rgbstr / 4 case REAL: trans_real(rgb, winlow, winhigh, val); break; case MAGN_TURBO: trans_magnitude_turbo(rgb, winlow, winhigh, val); break; case FLOW: trans_flow(rgb, winlow, winhigh, val); break; + case LIPARI_T1: trans_magnitude_lipari(rgb, winlow, winhigh, val); break; + case NAVIA_T2: trans_magnitude_navia(rgb, winlow, winhigh, val); break; default: assert(0); } diff --git a/src/draw.h b/src/draw.h index 3eb4fca..ede7729 100644 --- a/src/draw.h +++ b/src/draw.h @@ -3,7 +3,7 @@ #include -enum mode_t { MAGN, MAGN_VIRIDS, CMPL, CMPL_MYGBM, PHSE, PHSE_MYGBM, REAL, MAGN_TURBO, FLOW }; +enum mode_t { MAGN, MAGN_VIRIDS, CMPL, CMPL_MYGBM, PHSE, PHSE_MYGBM, REAL, MAGN_TURBO, FLOW, LIPARI_T1, NAVIA_T2 }; enum flip_t { OO, XO, OY, XY }; enum interp_t { NLINEAR, NLINEARMAG, NEAREST, LIINCO }; diff --git a/src/viewer.ui b/src/viewer.ui index b13740d..a351421 100644 --- a/src/viewer.ui +++ b/src/viewer.ui @@ -41,6 +41,12 @@ FLOW + + Lipari (T1, R1) + + + Navia (T2, R2) +