Reimplemented from Impala::Core::Database::DataDocumentListener. Definition at line 59 of file Background.h. References Impala::Core::Array::Abs(), Impala::Core::Array::Add(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CH(), Impala::Core::Array::ArraySystem::CheckMemoryUsageSinceMark(), Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CW(), Impala::Core::Array::GreaterThan(), Impala::Core::Array::ArraySystem::Instance(), Impala::Core::Array::ArraySystem::MarkMemoryUsage(), Impala::Core::Array::MaximumVal(), mBorderSize, mDataDoc, mMinimumThres, mSigma, mStat, Impala::Core::Array::Mul(), Impala::Core::Array::MulVal(), mViewScale, mWnd, Impala::Core::Array::ProjectRange(), Impala::Core::Array::RecGauss(), Impala::Core::Array::Rgb2Ooo(), Impala::Core::Array::Sub(), and Impala::Core::Database::DataDocument::VisualAtCursor(). Referenced by HandleNewFile(). 00060 { 00061 int view = 0; 00062 00063 Core::Array::ArraySystem& aSys = Core::Array::ArraySystem::Instance(); 00064 aSys.MarkMemoryUsage(false); 00065 00066 Core::Array::Array2dVec3UInt8* srcWrap = mDataDoc->VisualAtCursor(false); 00067 if (!srcWrap) 00068 return; 00069 Array2dVec3Real64* srcV3R64 = Core::Array::ArrayCreate<Array2dVec3Real64> 00070 (srcWrap->CW(), srcWrap->CH(), mBorderSize, mBorderSize); 00071 00072 Array2dScalarReal64* lum = 0; 00073 Array2dScalarReal64* col = 0; 00074 Array2dScalarReal64* tmp = 0; 00075 00076 Core::Array::Rgb2Ooo(srcV3R64, srcWrap); 00077 //Core::Array::ProjectRange(lum, srcV3R64, 1); 00078 Core::Array::ProjectRange(col, srcV3R64, 2); 00079 Core::Array::ProjectRange(tmp, srcV3R64, 3); 00080 Core::Array::Add(col, col, tmp); 00081 00082 //Core::Array::RecGauss(lum, lum, mSigma, mSigma, 0, 0, 3); 00083 Core::Array::RecGauss(col, col, mSigma, mSigma, 0, 0, 3); 00084 00085 Array2dScalarReal64* crit = col; 00086 //UpdateView(view++, crit, "Direct", mViewScale); 00087 00088 mStat->DoArray(crit); 00089 00090 Array2dScalarReal64* diff = 0; 00091 Core::Array::Sub(diff, mStat->GetMean(), crit); 00092 Core::Array::Abs(diff, diff); 00093 mWnd->UpdateView(view++, diff, "Stretch", mViewScale); 00094 00095 Array2dScalarUInt8* binIm = 0; 00096 Array2dScalarReal64* thr = 0; 00097 Core::Array::MulVal(thr, mStat->GetStDev(), 1.0); 00098 Core::Array::MaximumVal(thr, thr, mMinimumThres); 00099 Core::Array::GreaterThan(binIm, diff, thr); 00100 mWnd->UpdateView(view++, binIm, "Binary", mViewScale); 00101 00102 /* 00103 Array2dScalarReal64* ker = 00104 Core::Array::ArrayCreate<Array2dScalarReal64>(9, 9); 00105 Core::Matrix::MatSet(ker, 0); 00106 Array2dScalarUInt8* binImClosed = 0; 00107 Core::Array::Dilation(binImClosed, binIm, ker); 00108 delete ker; 00109 UpdateView(view++, binImClosed, "Binary", mViewScale); 00110 */ 00111 00112 //UpdateView(view++, mStat->GetMinimum(), "Stretch", mViewScale); 00113 //UpdateView(view++, mStat->GetMaximum(), "Stretch", mViewScale); 00114 //UpdateView(view++, mStat->GetMean(), "Direct", mViewScale); 00115 //UpdateView(view++, mStat->GetStDev(), "Stretch", mViewScale); 00116 00117 Array2dVec3UInt8* theBack = 0; 00118 Core::Array::Mul(theBack, srcWrap, binIm); 00119 mWnd->UpdateView(view++, theBack, "Direct", mViewScale); 00120 delete theBack; 00121 00122 delete diff; 00123 delete thr; 00124 delete binIm; 00125 //delete binImClosed; 00126 delete lum; 00127 delete col; 00128 delete tmp; 00129 delete srcV3R64; 00130 aSys.CheckMemoryUsageSinceMark(false); 00131 }
Here is the call graph for this function:
|