|
template<class ArrayT>
void Impala::Visualization::ImagesWindow::AddImage |
( |
ArrayT * |
im, |
|
|
std::string |
displayMode, |
|
|
std::string |
caption, |
|
|
bool |
ownImage, |
|
|
bool |
intelliScroll = false , |
|
|
int |
userIdx = -1 | |
|
) |
| | [inline] |
Definition at line 90 of file ImagesWindow.h.
References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), Impala::Core::Array::GetRgbPixels(), ImageAdded(), mImages, Impala::Min(), mViewHeight, and mViewWidth.
Referenced by AddImage(), Impala::Application::IDash::DossierEntry::AddShot(), Impala::Visualization::RotorBrowser::RotorBrowserGUI::BookmarkEvent(), Impala::Application::WindowVdiff::DoProcessing(), Impala::Visualization::SegmentationDocumentGuiMain::HandleAddedBookmark(), Impala::Visualization::IxsDocumentGuiMain::HandleAddedBookmark(), Impala::Visualization::IxsDocumentGuiMain::HandleNewFile(), Impala::Visualization::FeatureTableSetRank::HandleNewFile(), Impala::Visualization::AnnotationTableGui::HandleNewFile(), Impala::Visualization::SegmentationDocumentGuiAnno::HandleNewShot(), Impala::Visualization::SimilarityTableSetRank::HandleUpdate(), Impala::Visualization::GUI::ShotResultPreviewBar::Init(), Impala::Visualization::GUI::KeyframeResultBar::Init(), Impala::Visualization::GUI::ConceptPreviewBar::Init(), main(), ReplaceImages(), Impala::Application::WindowTrecResult::SetActiveShot(), Impala::Visualization::SearchJudgeGui::SetJudgeShot(), Impala::Visualization::SimilarityTableSetRank::ShowFloatWnd(), Impala::Visualization::ThreadSetGui::ShowThread(), Impala::Visualization::SearchTopicGui::ShowTopic(), Impala::Visualization::ThreadSetGui::ThreadStep(), Impala::Visualization::SegmentationDocumentGuiAnno::ToShotWindow(), Impala::Visualization::SegmentationDocumentGuiStills::UpdateFromJpg(), Impala::Visualization::SegmentationDocumentGuiStills::UpdateFromMpg(), Impala::Visualization::SimilarityPlotNeedleImage::UpdateImage(), and Impala::Visualization::GUI::ShotDetailSidebar::UpdateStills(). 00092 {
00093 if (!im) {
00094 std::cout << "ERROR: invalid image to ImagesWindow::AddImage" << std::endl;
00095 return;
00096 }
00097
00098 int idx = mImages.size();
00099 if (userIdx < 0)
00100 userIdx = idx;
00101
00102
00103
00104
00105
00106
00107 double scale = 1.0;
00108 if (mViewWidth != -1)
00109 {
00110 double scaleX = ((double) mViewWidth) / im->CW();
00111 double scaleY = ((double) mViewHeight) / im->CH();
00112 scale = Min(scaleX, scaleY);
00113 }
00114 RgbImage* rgbIm = 0;
00115 if (displayMode == std::string("Direct"))
00116 {
00117
00118
00119 rgbIm = new RgbImage((Array2dVec3UInt8*) im, caption, scale,
00120 ownImage, userIdx);
00121 }
00122 else
00123 {
00124 Array2dVec3UInt8* dispIm =
00125 Core::Array::ArrayCreate<Array2dVec3UInt8>(im->CW(), im->CH(),
00126 0, 0);
00127 Core::Array::GetRgbPixels(im, dispIm->CPB(0, 0), displayMode);
00128 if (ownImage)
00129 delete im;
00130 rgbIm = new RgbImage(dispIm, caption, scale, true, userIdx);
00131 }
00132 mImages.push_back(rgbIm);
00133 ImageAdded(idx, intelliScroll);
00134 }
Here is the call graph for this function:
|