| | 1249 | case 'D': |
| | 1250 | case 'd': |
| | 1251 | { |
| | 1252 | if (LocaleCompare(symbol,"depth") == 0) |
| | 1253 | { |
| | 1254 | unsigned long |
| | 1255 | depth; |
| | 1256 | |
| | 1257 | (void) FormatMagickString(key,MaxTextExtent,"%s.%p.%ld",symbol,image, |
| | 1258 | (long) channel); |
| | 1259 | value=(const char *) GetValueFromSplayTree(fx_info->symbols,key); |
| | 1260 | if (value != (const char *) NULL) |
| | 1261 | return(QuantumScale*atof(value)); |
| | 1262 | (void) DeleteNodeFromSplayTree(fx_info->symbols,key); |
| | 1263 | depth=GetImageChannelDepth(image,channel,exception); |
| | 1264 | (void) FormatMagickString(statistic,MaxTextExtent,"%lu",depth); |
| | 1265 | (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key), |
| | 1266 | ConstantString(statistic)); |
| | 1267 | return(QuantumScale*atof(statistic)); |
| | 1268 | } |
| | 1269 | break; |
| | 1270 | } |
| | 1415 | if (LocaleCompare(symbol,"maxima") == 0) |
| | 1416 | { |
| | 1417 | double |
| | 1418 | maxima, |
| | 1419 | minima; |
| | 1420 | |
| | 1421 | (void) FormatMagickString(key,MaxTextExtent,"%s.%p.%ld",symbol,image, |
| | 1422 | (long) channel); |
| | 1423 | value=(const char *) GetValueFromSplayTree(fx_info->symbols,key); |
| | 1424 | if (value != (const char *) NULL) |
| | 1425 | return(QuantumScale*atof(value)); |
| | 1426 | (void) DeleteNodeFromSplayTree(fx_info->symbols,key); |
| | 1427 | (void) GetImageChannelRange(image,channel,&minima,&maxima,exception); |
| | 1428 | (void) FormatMagickString(statistic,MaxTextExtent,"%g",maxima); |
| | 1429 | (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key), |
| | 1430 | ConstantString(statistic)); |
| | 1431 | return(QuantumScale*atof(statistic)); |
| | 1432 | } |
| | 1433 | if (LocaleCompare(symbol,"mean") == 0) |
| | 1434 | { |
| | 1435 | double |
| | 1436 | mean, |
| | 1437 | standard_deviation; |
| | 1438 | |
| | 1439 | (void) FormatMagickString(key,MaxTextExtent,"%s.%p.%ld",symbol,image, |
| | 1440 | (long) channel); |
| | 1441 | value=(const char *) GetValueFromSplayTree(fx_info->symbols,key); |
| | 1442 | if (value != (const char *) NULL) |
| | 1443 | return(QuantumScale*atof(value)); |
| | 1444 | (void) DeleteNodeFromSplayTree(fx_info->symbols,key); |
| | 1445 | (void) GetImageChannelMean(image,channel,&mean,&standard_deviation, |
| | 1446 | exception); |
| | 1447 | (void) FormatMagickString(statistic,MaxTextExtent,"%g",mean); |
| | 1448 | (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key), |
| | 1449 | ConstantString(statistic)); |
| | 1450 | return(QuantumScale*atof(statistic)); |
| | 1451 | } |
| | 1452 | if (LocaleCompare(symbol,"minima") == 0) |
| | 1453 | { |
| | 1454 | double |
| | 1455 | maxima, |
| | 1456 | minima; |
| | 1457 | |
| | 1458 | (void) FormatMagickString(key,MaxTextExtent,"%s.%p.%ld",symbol,image, |
| | 1459 | (long) channel); |
| | 1460 | value=(const char *) GetValueFromSplayTree(fx_info->symbols,key); |
| | 1461 | if (value != (const char *) NULL) |
| | 1462 | return(QuantumScale*atof(value)); |
| | 1463 | (void) DeleteNodeFromSplayTree(fx_info->symbols,key); |
| | 1464 | (void) GetImageChannelRange(image,channel,&minima,&maxima,exception); |
| | 1465 | (void) FormatMagickString(statistic,MaxTextExtent,"%g",minima); |
| | 1466 | (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key), |
| | 1467 | ConstantString(statistic)); |
| | 1468 | return(QuantumScale*atof(statistic)); |
| | 1469 | } |
| | 1525 | } |
| | 1526 | if (LocaleCompare(symbol,"standard_deviation") == 0) |
| | 1527 | { |
| | 1528 | double |
| | 1529 | mean, |
| | 1530 | standard_deviation; |
| | 1531 | |
| | 1532 | (void) FormatMagickString(key,MaxTextExtent,"%s.%p.%ld",symbol,image, |
| | 1533 | (long) channel); |
| | 1534 | value=(const char *) GetValueFromSplayTree(fx_info->symbols,key); |
| | 1535 | if (value != (const char *) NULL) |
| | 1536 | return(QuantumScale*atof(value)); |
| | 1537 | (void) DeleteNodeFromSplayTree(fx_info->symbols,key); |
| | 1538 | (void) GetImageChannelMean(image,channel,&mean,&standard_deviation, |
| | 1539 | exception); |
| | 1540 | (void) FormatMagickString(statistic,MaxTextExtent,"%g", |
| | 1541 | standard_deviation); |
| | 1542 | (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key), |
| | 1543 | ConstantString(statistic)); |
| | 1544 | return(QuantumScale*atof(statistic)); |