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

OGLIMAGE* Impala::Visualization::DirImViewer3D::ReadImageIdx ( int  imIdx  )  [inline, private]

Definition at line 186 of file DirImViewer3D.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, mRgbDataSrc, Impala::Visualization::RgbOglImage::OglImage(), and Impala::Core::Array::ReadFile().

Referenced by LoadImageIdx().

00187     {
00188             Array2dVec3UInt8*   ar = 0;
00189         if (mRgbDataSrc)
00190         {
00191             mRgbDataSrc->GotoFrame(imIdx);
00192             int imW = mRgbDataSrc->FrameWidth();
00193             int imH = mRgbDataSrc->FrameHeight();
00194                 ar = new Array2dVec3UInt8(imW, imH, 0, 0, 0, false);
00195                 memcpy((void*)ar->CPB(0,0), mRgbDataSrc->DataPtr(), imW*imH*3);
00196         }
00197         else
00198         {
00199             String fName = mDirName + "/" + *mFileNames[imIdx];
00200             Core::Array::ReadFile(ar, fName, &Util::Database::GetInstance());
00201             if (ar == 0)
00202                 ILOG_WARN("Could not read file: " << fName)
00203         }
00204         return RgbOglImage::OglImage(ar);
00205     }

Here is the call graph for this function:


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