It computes a one pixel of the image or matrix, including, possibly, averaging over neignboring pixels, and the standard deviation of the neighborhood.
int MakePixelProfile( int row, int col, OImageMakePixelProfileParams * pstParams, vector & vectOut, vector & vectOutAux = NULL )
0 if success, otherwise FALSE.
EX1
void test_pixel_profile(int row , int col, double radius = 2.) { ImageLayer imglayer = Project.ActiveLayer(); if (!imglayer.IsValid()) { out_str("Inavlid Active Window!"); } WorksheetPage wkpg; wkpg.Create("Origin.otwu"); wkpg.SetName("PixelProfile"); Worksheet wks = wkpg.Layers(0); wks.SetSize(wks.GetNumRows(), 2); // two columns Column colMain(wks, 0); Column colAux(wks, 1); colMain.SetLongName("Main"); colAux.SetLongName("Auxiliary"); Dataset dsMain(colMain); Dataset dsAux(colAux); OImageMakePixelProfileParams params; params.radius = radius; int nRet = imglayer.MakePixelProfile(row, col, ¶ms, dsMain, dsAux); out_int("nRet = ", nRet); return; }
origin.h