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

void Impala::Visualization::DirImViewer::ViewCreateImage ( int  dstIdx,
int  imIdx 
) [inline]

Definition at line 313 of file DirImViewer.h.

References Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::CPB(), Impala::Core::Stream::RgbDataSrc::DataPtr(), Impala::Core::Stream::RgbDataSrc::FrameHeight(), Impala::Core::Stream::RgbDataSrc::FrameWidth(), Impala::Util::Database::GetInstance(), Impala::Core::Stream::RgbDataSrc::GotoFrame(), ILOG_WARN, mDirName, mFileNames, mRgbDataSrcRaw, mViews, Impala::Visualization::RgbOglImage::OglImage(), and Impala::Core::Array::ReadFile().

Referenced by HandleView().

00314     {
00315             Array2dVec3UInt8* ar = 0;
00316 #ifndef NO_RAW
00317         if (mRgbDataSrcRaw)
00318         {
00319             mRgbDataSrcRaw->GotoFrame(imIdx);
00320             int imW = mRgbDataSrcRaw->FrameWidth();
00321             int imH = mRgbDataSrcRaw->FrameHeight();
00322                 ar = new Array2dVec3UInt8(imW, imH, 0, 0, 0, false);
00323                 memcpy( (void *) ar->CPB(0, 0), mRgbDataSrcRaw->DataPtr(), imW*imH*3 );
00324         }
00325         else
00326 #endif
00327         {
00328             std::string fName = mDirName + "/" + *mFileNames[imIdx];
00329 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00330             Core::Array::ReadFile(ar, fName, &Util::Database::GetInstance());
00331 #else // REPOSITORY_USED
00332             // This is just a hack to get things to compile...
00333             Persistency::FileLocator loc(fName);
00334             typedef Persistency::RepositoryInFileSystem FS;
00335             Persistency::File f = FS::GetInstance().GetFile(loc, false, false);
00336             Core::Array::ReadFile(ar, f);
00337 #endif // REPOSITORY_USED
00338             if (ar == 0)
00339             {
00340                 ILOG_WARN("Could not read file: " << fName);
00341             }
00342         }
00343         if (ar != 0)
00344         {
00345             OGLIMAGE* oglIm = RgbOglImage::OglImage(ar);
00346             viewSys.SetImage(mViews[dstIdx],oglIm);
00347             ReleaseOglImage(oglIm);
00348         } else {
00349             ILOG_WARN("array = 0, image not loaded.");
00350             viewSys.SetImage(mViews[dstIdx], 0);
00351         }
00352         mViews[dstIdx]->UserData1 = (void *) imIdx;
00353     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:43:18 2010 for ImpalaSrc by  doxygen 1.5.1