Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
wxProfileDump.cpp File Reference

File: wxProfileDump.cpp. More...

#include "IccProfile.h"
#include "IccTag.h"
#include "IccUtil.h"
#include "IccEval.h"
#include "IccPrmg.h"
#include "IccProfLibVer.h"
#include "wx/wxprec.h"
#include "wx/wx.h"
#include "wx/mdi.h"
#include "wx/toolbar.h"
#include "wx/config.h"
#include "wx/filename.h"
#include "wx/filedlg.h"
#include "bitmaps/new.xpm"
#include "bitmaps/open.xpm"
#include "bitmaps/save.xpm"
#include "bitmaps/copy.xpm"
#include "bitmaps/cut.xpm"
#include "bitmaps/paste.xpm"
#include "bitmaps/print.xpm"
#include "bitmaps/help.xpm"
#include "wxProfileDump.h"
+ Include dependency graph for wxProfileDump.cpp:

Go to the source code of this file.

Classes

class  CIccMinMaxEval
 

Macros

#define ID_ROUND_TRIP   1002
 
#define ID_TAG_LIST   1001
 
#define ID_VALIDATE_PROFILE   1000
 
#define wxT(x)   x
 

Functions

wxString AnalyzeRoundTrip (wxString &profilePath, icRenderingIntent nIntent, bool bUseMPE)
 
static bool IsRoundTripable (CIccProfile *pIcc)
 

Variables

static int gs_nFrames = 0
 
wxList my_children
 
MyFramemy_frame = (MyFrame *) NULL
 
static long xpos = -1
 
static long ypos = -1
 

Detailed Description

File: wxProfileDump.cpp.

Contains: Main application that displays profile contents using wxWidgets

Version: V1

Copyright: (c) see ICC Software License

Definition in file wxProfileDump.cpp.

Macro Definition Documentation

◆ ID_ROUND_TRIP

#define ID_ROUND_TRIP   1002

Definition at line 139 of file wxProfileDump.cpp.

Referenced by MyChild::MyChild().

◆ ID_TAG_LIST

#define ID_TAG_LIST   1001

Definition at line 138 of file wxProfileDump.cpp.

Referenced by MyChild::MyChild().

◆ ID_VALIDATE_PROFILE

#define ID_VALIDATE_PROFILE   1000

Definition at line 137 of file wxProfileDump.cpp.

Referenced by MyChild::MyChild().

◆ wxT

#define wxT ( x)    x

Definition at line 116 of file wxProfileDump.cpp.

Referenced by MyChild::MyChild(), and MyApp::OnInit().

Function Documentation

◆ AnalyzeRoundTrip()

wxString AnalyzeRoundTrip ( wxString & profilePath,
icRenderingIntent nIntent,
bool bUseMPE )

Definition at line 957 of file wxProfileDump.cpp.

958{
959 CIccInfo info;
960 wxString report;
961 CIccMinMaxEval eval;
962
963 if (bUseMPE)
964 report += wxString::Format("MPE Rendering Intent: %s\n", info.GetRenderingIntentName(nIntent));
965 else
966 report += wxString::Format("Rendering Intent: %s\n", info.GetRenderingIntentName(nIntent));
967
968 char * pPath = strdup( profilePath.mb_str() );
969 clock_t start = clock();
970 icStatusCMM stat = eval.EvaluateProfile( (const icChar*) pPath, 0, nIntent, icInterpTetrahedral, bUseMPE);
971
972 if (stat!=icCmmStatOk) {
973 report += wxString::Format(" Unable to perform round trip on '%s'\n", profilePath.c_str());
974 report += "\n";
975 report += "CMM Status: ";
976 report += CIccCmm::GetStatusText(stat);
977 report += "\n\n";
978
979 return report;
980 }
981
982 CIccPRMG prmg;
983
984 stat = prmg.EvaluateProfile( (const icChar*) pPath, nIntent, icInterpTetrahedral, bUseMPE);
985 clock_t elapsed = clock() - start;
986
987 if (stat!=icCmmStatOk) {
988 report += wxString::Format(" Unable to perform PRMG analysis on '%s'\n", profilePath.c_str());
989 report += "\n";
990
991 return report;
992 }
993
994 if (nIntent!=icRelativeColorimetric)
995 report += wxString::Format("Specified Rendering Intent Gamut: %s\n", prmg.m_bPrmgImplied ? "Perceptual Reference Medium Gamut" : "Not Specified");
996
997 report += wxString::Format("\n Round Trip 1\n");
998 report += wxString::Format( " ------------\n");
999 report += wxString::Format(" Min DeltaE: %8.2" ICFLOATSFX "\n", eval.minDE1);
1000 report += wxString::Format(" Mean DeltaE: %8.2" ICFLOATSFX "\n", eval.GetMean1());
1001 report += wxString::Format(" Max DeltaE: %8.2" ICFLOATSFX "\n\n", eval.maxDE1);
1002
1003 report += wxString::Format(" Max L, a, b: " ICFLOATFMT ", " ICFLOATFMT ", " ICFLOATFMT "\n", eval.maxLab1[0], eval.maxLab1[1], eval.maxLab1[2]);
1004
1005 report += wxString::Format("\n Round Trip 2\n");
1006 report += wxString::Format( " ------------\n");
1007 report += wxString::Format(" Min DeltaE: %8.2" ICFLOATSFX "\n", eval.minDE2);
1008 report += wxString::Format(" Mean DeltaE: %8.2" ICFLOATSFX "\n", eval.GetMean2());
1009 report += wxString::Format(" Max DeltaE: %8.2" ICFLOATSFX "\n", eval.maxDE2);
1010 report += wxString::Format(" DE <= 1.0 (%8u): %5.1f%%\n\n", eval.num3, (float)eval.num3 / (float)eval.m_nTotal*100.0);
1011
1012 report += wxString::Format(" Max L, a, b: " ICFLOATFMT ", " ICFLOATFMT ", " ICFLOATFMT "\n", eval.maxLab2[0], eval.maxLab2[1], eval.maxLab2[2]);
1013
1014 if (prmg.m_nTotal) {
1015 report += wxString::Format("\n PRMG Interoperability - Round Trip Results\n");
1016 report += wxString::Format( " ------------------------------------------------------\n");
1017
1018 report += wxString::Format(" DE <= 1.0 (%8u): %5.1f%%\n", prmg.m_nDE1, (float)prmg.m_nDE1/(float)prmg.m_nTotal*100.0);
1019 report += wxString::Format(" DE <= 2.0 (%8u): %5.1f%%\n", prmg.m_nDE2, (float)prmg.m_nDE2/(float)prmg.m_nTotal*100.0);
1020 report += wxString::Format(" DE <= 3.0 (%8u): %5.1f%%\n", prmg.m_nDE3, (float)prmg.m_nDE3/(float)prmg.m_nTotal*100.0);
1021 report += wxString::Format(" DE <= 5.0 (%8u): %5.1f%%\n", prmg.m_nDE5, (float)prmg.m_nDE5/(float)prmg.m_nTotal*100.0);
1022 report += wxString::Format(" DE <=10.0 (%8u): %5.1f%%\n", prmg.m_nDE10, (float)prmg.m_nDE10/(float)prmg.m_nTotal*100.0);
1023 report += wxString::Format(" Total (%8u)\n", prmg.m_nTotal);
1024 }
1025
1026 report += "\n";
1027
1028 report += wxString::Format("Evaluation took %f seconds\n\n", (double)elapsed / (double)CLOCKS_PER_SEC);
1029
1030 return report;
1031}
@ icInterpTetrahedral
Definition IccCmm.h:115
icStatusCMM
CMM return status values.
Definition IccCmm.h:90
@ icCmmStatOk
Definition IccCmm.h:92
#define ICFLOATFMT
Definition IccDefs.h:106
char icChar
Definition IccDefs.h:109
#define ICFLOATSFX
String formating macros need to match precision of icFloatNumber If precision is double change the "f...
Definition IccDefs.h:105
icStatusCMM EvaluateProfile(CIccProfile *pProfile, icUInt8Number nGran=0, icRenderingIntent nIntent=((icRenderingIntent) 0x3f3f3f3f), icXformInterp nInterp=icInterpLinear, bool buseMpeTags=true)
Definition IccEval.cpp:82
Type: Class.
Definition IccUtil.h:303
const icChar * GetRenderingIntentName(icRenderingIntent val, bool bIsV5=false)
Definition IccUtil.cpp:2091
icFloatNumber maxLab2[3]
icFloatNumber minDE2
icFloatNumber maxLab1[3]
icUInt32Number num3
icFloatNumber minDE1
icUInt32Number m_nTotal
icFloatNumber maxDE2
icFloatNumber GetMean1()
icFloatNumber GetMean2()
icFloatNumber maxDE1
icUInt32Number m_nTotal
Definition IccPrmg.h:96
icUInt32Number m_nDE2
Definition IccPrmg.h:96
icUInt32Number m_nDE1
Definition IccPrmg.h:96
icUInt32Number m_nDE3
Definition IccPrmg.h:96
icUInt32Number m_nDE5
Definition IccPrmg.h:96
bool m_bPrmgImplied
Definition IccPrmg.h:98
icUInt32Number m_nDE10
Definition IccPrmg.h:96
icStatusCMM EvaluateProfile(CIccProfile *pProfile, icRenderingIntent nIntent=((icRenderingIntent) 0x3f3f3f3f), icXformInterp nInterp=icInterpLinear, bool buseMpeTags=true)
Definition IccPrmg.cpp:203
@ icRelativeColorimetric

References CIccEvalCompare::EvaluateProfile(), CIccPRMG::EvaluateProfile(), CIccMinMaxEval::GetMean1(), CIccMinMaxEval::GetMean2(), CIccInfo::GetRenderingIntentName(), icCmmStatOk, ICFLOATFMT, ICFLOATSFX, icInterpTetrahedral, icRelativeColorimetric, CIccPRMG::m_bPrmgImplied, CIccPRMG::m_nDE1, CIccPRMG::m_nDE10, CIccPRMG::m_nDE2, CIccPRMG::m_nDE3, CIccPRMG::m_nDE5, CIccMinMaxEval::m_nTotal, CIccPRMG::m_nTotal, CIccMinMaxEval::maxDE1, CIccMinMaxEval::maxDE2, CIccMinMaxEval::maxLab1, CIccMinMaxEval::maxLab2, CIccMinMaxEval::minDE1, CIccMinMaxEval::minDE2, and CIccMinMaxEval::num3.

Referenced by MyRoundTripDialog::MyRoundTripDialog().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsRoundTripable()

static bool IsRoundTripable ( CIccProfile * pIcc)
static

Definition at line 428 of file wxProfileDump.cpp.

429{
430 icHeader *pHdr = &pIcc->m_Header;
431
432 if (pHdr->deviceClass == icSigLinkClass) {
433 return false;
434 }
435
436 if ((pIcc->FindTag(icSigAToB0Tag) && pIcc->FindTag(icSigBToA0Tag)) ||
437 (pIcc->FindTag(icSigAToB1Tag) && pIcc->FindTag(icSigBToA1Tag)) ||
438 (pIcc->FindTag(icSigAToB2Tag) && pIcc->FindTag(icSigBToA2Tag)) ||
439 (pIcc->FindTag(icSigDToB0Tag) && pIcc->FindTag(icSigBToD0Tag)) ||
440 (pIcc->FindTag(icSigDToB1Tag) && pIcc->FindTag(icSigBToD1Tag)) ||
441 (pIcc->FindTag(icSigDToB2Tag) && pIcc->FindTag(icSigBToD2Tag)) ||
442 (pIcc->FindTag(icSigRedMatrixColumnTag) && pIcc->FindTag(icSigGreenMatrixColumnTag) && pIcc->FindTag(icSigBlueMatrixColumnTag) &&
443 pIcc->FindTag(icSigRedTRCTag) && pIcc->FindTag(icSigGreenTRCTag) && pIcc->FindTag(icSigBlueTRCTag)))
444 return true;
445
446 return false;
447}
@ icSigLinkClass
@ icSigBToD0Tag
@ icSigBToA2Tag
@ icSigBlueMatrixColumnTag
@ icSigGreenTRCTag
@ icSigBToD2Tag
@ icSigAToB0Tag
@ icSigBToA1Tag
@ icSigAToB2Tag
@ icSigDToB0Tag
@ icSigBToA0Tag
@ icSigRedTRCTag
@ icSigBToD1Tag
@ icSigBlueTRCTag
@ icSigGreenMatrixColumnTag
@ icSigAToB1Tag
@ icSigDToB2Tag
@ icSigRedMatrixColumnTag
@ icSigDToB1Tag
The Profile header.
icProfileClassSignature deviceClass

References icHeader::deviceClass, icSigAToB0Tag, icSigAToB1Tag, icSigAToB2Tag, icSigBlueMatrixColumnTag, icSigBlueTRCTag, icSigBToA0Tag, icSigBToA1Tag, icSigBToA2Tag, icSigBToD0Tag, icSigBToD1Tag, icSigBToD2Tag, icSigDToB0Tag, icSigDToB1Tag, icSigDToB2Tag, icSigGreenMatrixColumnTag, icSigGreenTRCTag, icSigLinkClass, icSigRedMatrixColumnTag, and icSigRedTRCTag.

Referenced by MyChild::MyChild().

+ Here is the caller graph for this function:

Variable Documentation

◆ gs_nFrames

int gs_nFrames = 0
static

Definition at line 131 of file wxProfileDump.cpp.

Referenced by MyChild::OnClose(), and MyFrame::OnClose().

◆ my_children

wxList my_children

Definition at line 125 of file wxProfileDump.cpp.

Referenced by MyChild::MyChild(), and MyChild::~MyChild().

◆ my_frame

MyFrame* my_frame = (MyFrame *) NULL

Definition at line 124 of file wxProfileDump.cpp.

Referenced by MyApp::OnInit(), and MyFrame::OpenFile().

◆ xpos

long xpos = -1
static

Definition at line 128 of file wxProfileDump.cpp.

◆ ypos

long ypos = -1
static

Definition at line 129 of file wxProfileDump.cpp.