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

template<class ArrayT>
void Impala::Core::Array::GetRgbPixels ( ArrayT *  src,
UInt8 *  pixels,
std::string  displayMode,
int  resWidth = -1,
int  resHeight = -1,
Geometry::GeoIntType  gi = Geometry::NEAREST 
) [inline]

Definition at line 33 of file GetRgbPixels.h.

References Impala::Core::Array::Element::E1Max(), Impala::Core::Array::Element::E1Min(), Impala::Core::Array::Pattern::PatRgbOp(), PixMax(), PixMin(), PixMinMax(), and PixStat().

Referenced by Impala::Visualization::ImagesWindow::AddImage(), Impala::Application::Client::ExampleReadRaw(), Impala::Application::Client::ExampleRgbDataSrc(), Impala::Application::Src::WindowSrc::HandleNewFrame(), Impala::Application::Client::TestMpg(), and Impala::Visualization::View::UpdateImage().

00036 {
00037     typedef typename ArrayT::ArithType ArithT;
00038 
00039     if (displayMode == std::string("Stretch"))
00040     {
00041         ArithT minVal, maxVal;
00042 //      PixMinMax(src, &minVal, &maxVal);
00043         minVal = PixMin(src);
00044         maxVal = PixMax(src);
00045         Real64 lowVal = Element::E1Min(minVal);
00046         Real64 highVal = Element::E1Max(maxVal);
00047         //std::cout << "min = " << lowVal << " max = " << highVal << std::endl;
00048         Trait::RgbStretch<ArithT> rgbOpStretch(lowVal, highVal);
00049         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpStretch);
00050     }
00051     else if (displayMode == std::string("Sigma"))
00052     {
00053         ArithT minVal, maxVal, mean, stdev;
00054         PixStat(src, &minVal, &maxVal, &mean, &stdev);
00055         //Real64 lowVal = Element::E1Min(minVal);
00056         Real64 lowVal = Element::E1Max(mean) - Element::E1Max(stdev) * 5;
00057         Real64 highVal = Element::E1Max(mean) + Element::E1Max(stdev) * 5;
00058         std::cout << "min " << minVal << " max " << maxVal << " mean " << mean 
00059                   << " stdev " << stdev
00060                   << " stretch " << lowVal << " - " << highVal << std::endl;
00061         Trait::RgbStretchClip<ArithT> rgbOpStretch(lowVal, highVal);
00062         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpStretch);
00063     }
00064     else if (displayMode == std::string("StrMax"))
00065     {
00066         ArithT minVal, maxVal;
00067         PixMinMax(src, &minVal, &maxVal);
00068         Real64 lowVal = Element::E1Min(minVal);
00069         Real64 highVal = Element::E1Max(maxVal) / 4;
00070         Trait::RgbStretchClip<ArithT> rgbOpStretch(lowVal, highVal);
00071         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpStretch);
00072     }
00073     else if (displayMode == std::string("LogMagnitude"))
00074     {
00075         ArithT minVal, maxVal;
00076         PixMinMax(src, &minVal, &maxVal);
00077         Real64 lowVal = Element::E1Min(minVal);
00078         Real64 highVal = Element::E1Max(maxVal);
00079         Trait::RgbLogMag<ArithT> rgbOpLogMag(lowVal, highVal);
00080         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpLogMag);
00081     }
00082     else if (displayMode == std::string("Binary"))
00083     {
00084         Trait::RgbBinary<ArithT> rgbOpBinary;
00085         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpBinary);
00086     }
00087     else if (displayMode == std::string("Label"))
00088     {
00089         Trait::RgbLabel<ArithT> rgbOpLabel;
00090         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpLabel);
00091     }
00092     else if (displayMode == std::string("Label60"))
00093     {
00094         Trait::RgbLabel60<ArithT> rgbOpLabel60;
00095         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpLabel60);
00096     }
00097     else if (displayMode == std::string("LabelN"))
00098     {
00099         Trait::RgbLabelN<ArithT> rgbOpLabelN;
00100         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpLabelN);
00101     }
00102     else
00103     {
00104         // assume DirectNC
00105         Trait::RgbDirectNC<ArithT> rgbOpDirect;
00106         Pattern::PatRgbOp(src, pixels, resWidth, resHeight, gi, rgbOpDirect);
00107     }
00108 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:56:39 2010 for ImpalaSrc by  doxygen 1.5.1