780
792
fprintf(stderr," %d: %s\n",i+1,desc);
783
fprintf(stderr," -G Generate good optimzed points rather than Fast\n");
784
fprintf(stderr," -e patches White test patches (default 4)\n");
785
fprintf(stderr," -s steps Single channel steps (default grey 50, color 0)\n");
786
fprintf(stderr," -g steps Grey axis RGB or CMY steps (default 0)\n");
787
fprintf(stderr," -m steps Multidimensional device space cube steps (default 0)\n");
788
fprintf(stderr," -f patches Add iterative & adaptive full spread patches to total (default grey 0, color 836)\n");
789
fprintf(stderr," Default is Optimised Farthest Point Sampling (OFPS)\n");
790
fprintf(stderr," -t Use incremental far point for full spread\n");
791
fprintf(stderr," -r Use device space random for full spread\n");
792
fprintf(stderr," -R Use perceptual space random for full spread\n");
793
fprintf(stderr," -q Use device space-filling quasi-random for full spread\n");
794
fprintf(stderr," -Q Use perceptual space-filling quasi-random for full spread\n");
795
fprintf(stderr," -i Use device space body centered cubic grid for full spread\n");
796
fprintf(stderr," -I Use perceptual space body centered cubic grid for full spread\n");
797
fprintf(stderr," -a angle Simplex grid angle 0.0 - 0.5 for B.C.C. grid, default %f\n",DEFANGLE);
798
fprintf(stderr," -A adaptation Degree of adaptation of OFPS 0.0 - 1.0 (default 0.1, 1.0 if -c profile provided)\n");
795
fprintf(stderr," -G Generate good optimzed points rather than Fast\n");
796
fprintf(stderr," -e patches White test patches (default 4)\n");
797
fprintf(stderr," -s steps Single channel steps (default grey 50, color 0)\n");
798
fprintf(stderr," -g steps Grey axis RGB or CMY steps (default 0)\n");
799
fprintf(stderr," -m steps Multidimensional device space cube steps (default 0)\n");
800
fprintf(stderr," -f patches Add iterative & adaptive full spread patches to total (default grey 0, color 836)\n");
801
fprintf(stderr," Default is Optimised Farthest Point Sampling (OFPS)\n");
802
fprintf(stderr," -t Use incremental far point for full spread\n");
803
fprintf(stderr," -r Use device space random for full spread\n");
804
fprintf(stderr," -R Use perceptual space random for full spread\n");
805
fprintf(stderr," -q Use device space-filling quasi-random for full spread\n");
806
fprintf(stderr," -Q Use perceptual space-filling quasi-random for full spread\n");
807
fprintf(stderr," -i Use device space body centered cubic grid for full spread\n");
808
fprintf(stderr," -I Use perceptual space body centered cubic grid for full spread\n");
809
fprintf(stderr," -a angle Simplex grid angle 0.0 - 0.5 for B.C.C. grid, default %f\n",DEFANGLE);
810
fprintf(stderr," -A adaptation Degree of adaptation of OFPS 0.0 - 1.0 (default 0.1, 1.0 if -c profile provided)\n");
799
811
/* Research options: */
800
/* fprintf(stderr," -A pPERCWGHT Device (0.0) ... Perceptual (1.0) weighting\n"); */
801
/* fprintf(stderr," -A cCURVEWGHT Curvature weighting 0.0 = none ... "); */
802
fprintf(stderr," -l ilimit Total ink limit in %%(default = none) \n");
803
fprintf(stderr," -c profile Optional device ICC or MPP pre-conditioning profile filename\n");
804
fprintf(stderr," (Use \"none\" to turn off any conditioning)\n");
805
fprintf(stderr," -F L,a,b,rad Filter out samples outside Lab sphere.\n");
812
/* fprintf(stderr," -A pPERCWGHT Device (0.0) ... Perceptual (1.0) weighting\n"); */
813
/* fprintf(stderr," -A cCURVEWGHT Curvature weighting 0.0 = none ... "); */
814
fprintf(stderr," -l ilimit Total ink limit in %%(default = none) \n");
815
fprintf(stderr," -p power Optional power applied to all device values.\n");
816
fprintf(stderr," -c profile Optional device ICC or MPP pre-conditioning profile filename\n");
817
fprintf(stderr," (Use \"none\" to turn off any conditioning)\n");
818
fprintf(stderr," -F L,a,b,rad Filter out samples outside Lab sphere.\n");
807
fprintf(stderr," -w Dump diagnostic outfilel.wrl file (Lab locations)\n");
808
fprintf(stderr," -W Dump diagnostic outfiled.wrl file (Device locations)\n");
820
fprintf(stderr," -w Dump diagnostic outfilel.wrl file (Lab locations)\n");
821
fprintf(stderr," -W Dump diagnostic outfiled.wrl file (Device locations)\n");
809
822
#endif /* VRML_DIAG */
810
fprintf(stderr," outfile Base name for output(.ti1)\n");
823
fprintf(stderr," outfile Base name for output(.ti1)\n");
1076
1090
if (na == NULL) usage(0,"Expect argument after -e");
1077
1091
if ((tt = atof(na)) > 0.0)
1078
1092
uilimit = ilimit = 0.01 * tt;
1095
/* Extra device power to use */
1096
else if (argv[fa][1] == 'p' || argv[fa][1] == 'P') {
1099
if (na == NULL) usage(0,"Expect argument after -p");
1100
if ((tt = atof(na)) > 0.0)
1081
1104
/* ICC profile for perceptual linearisation */
1082
1105
else if (argv[fa][1] == 'c' || argv[fa][1] == 'C') {
1084
1107
if (na == NULL) usage(0,"Expect argument after -e");
1085
1108
strncpy(pname,na,MAXNAMEL-1); pname[MAXNAMEL-1] = '\000';
1088
1111
/* Filter out samples outside given sphere */
1089
1112
else if (argv[fa][1] == 'F') {
1448
1479
for (i = 0; i < gsteps; i++) {
1450
double sum, val[MXTD];
1481
double sum, val[MXTD], XYZ[3];
1451
1482
cgats_set_elem ary[1 + MXTD + 3];
1453
1484
addp = 1; /* Default add the point */
1456
1486
for (e = 0; e < di; e++) {
1457
1487
if (e == cix[0] || e == cix[1] || e == cix[2])
1458
sum += val[e] = (double)i/(gsteps-1);
1488
val[e] = (double)i/(gsteps-1);
1493
/* Apply general filter */
1494
if (filter && dofilt(pdata, filt, val))
1497
pdata->dev_to_XYZ(pdata, XYZ, val); /* Add expected XYZ */
1499
/* Apply xpow and compute sum */
1500
for (sum = 0.0, e = 0; e < di; e++)
1501
sum += val[e] = pow(val[e], xpow);
1463
1506
/* See if it is already in the fixed list */
1464
1507
if (fxlist != NULL) {
1528
1562
gc[j] = 0; /* init coords */
1530
1564
for (;;) { /* For all grid points */
1565
double sum, val[MXTD], XYZ[3];
1535
1568
addp = 1; /* Default add the point */
1537
for (sum = 0.0, e = 0; e < di; e++) {
1538
sum += val[e] = (double)gc[e]/(msteps-1);
1570
for (e = 0; e < di; e++)
1571
val[e] = (double)gc[e]/(msteps-1);
1573
/* Apply general filter */
1574
if (filter && dofilt(pdata, filt, val))
1577
pdata->dev_to_XYZ(pdata, XYZ, val); /* Add expected XYZ */
1579
for (sum = 0.0, e = 0; e < di; e++)
1580
sum += val[e] = pow(val[e], xpow);
1540
1582
if (sum > uilimit)
1541
1583
addp = 0; /* Don't add patches over ink limit */
1726
1761
if (sl != NULL) {
1727
1762
if (sl->next(sl, val))
1728
1763
error("Run out of sobol random numbers!");
1730
for (sum = 0.0, e = 0; e < di; e++)
1732
1764
} else { /* else uniform random distribution */
1733
for (sum = 0.0, e = 0; e < di; e++)
1734
sum += val[e] = d_rand(0.0, 1.0);
1765
for (e = 0; e < di; e++)
1766
val[e] = d_rand(0.0, 1.0);
1769
/* Apply general filter */
1770
if (filter && dofilt(pdata, filt, val))
1773
pdata->dev_to_XYZ(pdata, XYZ, val); /* Add expected XYZ */
1775
for (sum = 0.0, e = 0; e < di; e++)
1776
sum += val[e] = pow(val[e], xpow);
1737
1778
if (sum > uilimit)
1740
/* Apply general filter */
1741
if (filter && dofilt(pdata, filt, val))
1744
1781
sprintf(buf,"%d",id++);
1745
1782
ary[0].c = buf;
1746
1783
if (xmask == nmask) {