Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Visualization::SimilarityTableSetRank::HandleCorrection ( int  code  )  [inline, private]

Definition at line 642 of file SimilarityTableSetRank.h.

References Impala::Core::Table::AnnotationTable::AddNegative(), Impala::Core::Table::AnnotationTable::AddPositive(), Impala::Core::Table::AnnotationTable::AddSkip(), Impala::Visualization::Plot::Points::Clear(), ClearImages(), DELETE_CORR, Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Get1(), Impala::Core::Table::AnnotationTable::GetIndex(), Impala::Core::Table::AnnotationTable::GetQualification(), HandlePlotIdxSelected(), HandleUpdate(), ILOG_ERROR, mAnno, mCorrections, mImageSelected, mPlotPoints, mPoints, mQualifiedRanking, mSelectedRanking, Impala::Core::Table::RemoveRow(), SAVE_CORR, SaveCorrections(), Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Set2(), SET_NEGATIVE, SET_POSITIVE, Impala::Core::Table::AnnotationTable::SetNegative(), Impala::Core::Table::AnnotationTable::SetPositive(), Impala::Core::Table::AnnotationTable::SetSkip(), and Impala::Core::Table::Table::Size().

Referenced by ButtonSelectionEvent(), and HandleNewKey().

00643     {
00644         if (mCorrections == 0)
00645         {
00646             ILOG_ERROR("No corrections");
00647             return;
00648         }
00649         if (code == SAVE_CORR)
00650         {
00651             SaveCorrections();
00652             return;
00653         }
00654         if (mImageSelected == -1)
00655         {
00656             ILOG_ERROR("No image selected");
00657             return;
00658         }
00659         Quid quid = mSelectedRanking->Get1(mImageSelected);
00660         int cIndex = mCorrections->GetIndex(quid);
00661         int rIndex = mQualifiedRanking->GetIndex(quid);
00662         if (rIndex == mQualifiedRanking->Size())
00663         {
00664             ILOG_ERROR("HandleCorrection: Logic error");
00665         }
00666         if (code == DELETE_CORR)
00667         {
00668             if (cIndex == mCorrections->Size())
00669             {
00670                 ILOG_ERROR("HandleCorrection: cannot find correction");
00671             }
00672             else
00673             {
00674                 Core::Table::RemoveRow(mCorrections, cIndex);
00675                 mQualifiedRanking->Set2(rIndex, mAnno->GetQualification(quid));
00676             }
00677         }
00678         else if (cIndex == mCorrections->Size())
00679         {
00680             if (code == SET_POSITIVE)
00681             {
00682                 mCorrections->AddPositive(quid);
00683                 mQualifiedRanking->SetPositive(rIndex);
00684             }
00685             else if (code == SET_NEGATIVE)
00686             {
00687                 mCorrections->AddNegative(quid);
00688                 mQualifiedRanking->SetNegative(rIndex);
00689             }
00690             else
00691             {
00692                 mCorrections->AddSkip(quid);
00693                 mQualifiedRanking->SetSkip(rIndex);
00694             }
00695         }
00696         else
00697         {
00698             if (code == SET_POSITIVE)
00699             {
00700                 mCorrections->SetPositive(cIndex);
00701                 mQualifiedRanking->SetPositive(rIndex);
00702             }
00703             else if (code == SET_NEGATIVE)
00704             {
00705                 mCorrections->SetNegative(cIndex);
00706                 mQualifiedRanking->SetNegative(rIndex);
00707             }
00708             else
00709             {
00710                 mCorrections->SetSkip(cIndex);
00711                 mQualifiedRanking->SetSkip(rIndex);
00712             }
00713         }
00714         // "Minimal" HandleNewFile
00715         int curImage = mImageSelected;
00716         ClearImages();
00717         if (mPlotPoints)
00718             mPoints->Clear();
00719         HandleUpdate(false);
00720         HandlePlotIdxSelected(curImage);
00721     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:25:14 2011 for ImpalaSrc by  doxygen 1.5.1