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

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

Definition at line 217 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().

00218     {
00219             Array2dVec3UInt8*   ar = 0;
00220         if (mRgbDataSrc)
00221         {
00222             mRgbDataSrc->GotoFrame(imIdx);
00223             int imW = mRgbDataSrc->FrameWidth();
00224             int imH = mRgbDataSrc->FrameHeight();
00225                 ar = new Array2dVec3UInt8(imW, imH, 0, 0, 0, false);
00226                 memcpy((void*)ar->CPB(0,0), mRgbDataSrc->DataPtr(), imW*imH*3);
00227         }
00228         else
00229         {
00230             String fName = mDirName + "/" + *mFileNames[imIdx];
00231 #ifndef REPOSITORY_USED // Here comes the deprecated stuff
00232             Core::Array::ReadFile(ar, fName, &Util::Database::GetInstance());
00233 #else // REPOSITORY_USED
00234             // This is just a hack to get things to compile...
00235             Persistency::FileLocator loc(fName);
00236             typedef Persistency::RepositoryInFileSystem FS;
00237             Persistency::File f = FS::GetInstance().GetFile(loc, false, false);
00238             Core::Array::ReadFile(ar, f);
00239 #endif // REPOSITORY_USED
00240             if (ar == 0)
00241                 ILOG_WARN("Could not read file: " << fName)
00242         }
00243         return RgbOglImage::OglImage(ar);
00244     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:24:39 2011 for ImpalaSrc by  doxygen 1.5.1