QTrk
|
#include "std_incl.h"
#include <cstdarg>
#include <functional>
#include "utils.h"
#include <Windows.h>
#include <string>
#include <complex>
#include "random_distr.h"
#include "LsqQuadraticFit.h"
#include "QueuedTracker.h"
#include "threads.h"
#include "CubicBSpline.h"
#include "time.h"
#include <tchar.h>
Go to the source code of this file.
Functions | |
std::string | GetCurrentOutputPath (bool ext) |
void | GetFormattedTimeString (char *output) |
void | dbgsetlogfile (const char *path) |
std::string | GetLocalModuleFilename () |
void | WriteToLog (const char *str) |
std::string | GetDirectoryFromPath (std::string fullpath) |
std::string | GetLocalModulePath () |
std::string | file_ext (const char *f) |
std::string | SPrintf (const char *fmt,...) |
void | dbgout (const std::string &s) |
void | dbgprintf (const char *fmt,...) |
void | GenerateTestImage (ImageData &img, float xp, float yp, float size, float SNratio) |
void | ComputeCRP (float *dst, int radialSteps, int angularSteps, float minradius, float maxradius, vector2f center, ImageData *img, float paddingValue, float *crpmap) |
float | ComputeBgCorrectedCOM1D (float *data, int len, float cf) |
void | NormalizeRadialProfile (scalar_t *prof, int rsteps) |
void | NormalizeZLUT (float *zlut, int numBeads, int planes, int radialsteps) |
void | ComputeRadialProfile (float *dst, int radialSteps, int angularSteps, float minradius, float maxradius, vector2f center, ImageData *img, float mean, bool normalize) |
float | sq (float x) |
void | GenerateImageFromLUT (ImageData *image, ImageData *zlut, float minradius, float maxradius, vector3f pos, bool splineInterp, int oversampleSubdiv) |
void | GenerateGaussianSpotImage (ImageData *img, vector2f pos, float sigma, float I0, float Ibg) |
void | ApplyPoissonNoise (ImageData &img, float poissonMax, float maxval) |
void | ApplyGaussianNoise (ImageData &img, float sigma) |
std::vector< std::vector< float > > | ReadCSV (const char *filename, char sep) |
std::vector< vector3f > | ReadVector3CSV (const char *file, char sep) |
void | WriteTrace (std::string filename, vector3f *results, int nResults) |
void | WriteVectorAsCSVRow (const char *file, std::vector< float > d, bool append) |
void | WriteArrayAsCSVRow (const char *file, float *d, int len, bool append) |
void | WriteImageAsCSV (const char *file, float *d, int w, int h, const char *labels[]) |
void | WriteComplexImageAsCSV (const char *file, std::complex< float > *d, int w, int h, const char *labels[]) |
std::vector< uchar > | ReadToByteBuffer (const char *filename) |
ImageData | ReadJPEGFile (const char *fn) |
void | CopyImageToFloat (uchar *data, int width, int height, int pitch, QTRK_PixelDataType pdt, float *dst) |
Copies image data from a generic QTRK_PixelDataType array to a float array. More... | |
double | GetPreciseTime () |
int | NearestPowerOf2 (int v) |
int | NearestPowerOf3 (int v) |
std::vector< float > | ComputeRadialBinWindow (int rsteps) |
Calculate the radial weights for ZLUT profile comparisons. More... | |
ImageData | ReadLUTFile (const char *lutfile) |
Variables | |
static std::string | logFilename |
void ApplyPoissonNoise | ( | ImageData & | img, |
float | poissonMax, | ||
float | maxval | ||
) |
float ComputeBgCorrectedCOM1D | ( | float * | data, |
int | len, | ||
float | cf | ||
) |
void ComputeCRP | ( | float * | dst, |
int | radialSteps, | ||
int | angularSteps, | ||
float | minradius, | ||
float | maxradius, | ||
vector2f | center, | ||
ImageData * | img, | ||
float | paddingValue, | ||
float * | crpmap | ||
) |
Definition at line 181 of file utils.cpp.
std::vector<float> ComputeRadialBinWindow | ( | int | rsteps | ) |
void ComputeRadialProfile | ( | float * | dst, |
int | radialSteps, | ||
int | angularSteps, | ||
float | minradius, | ||
float | maxradius, | ||
vector2f | center, | ||
ImageData * | img, | ||
float | mean, | ||
bool | normalize | ||
) |
Definition at line 298 of file utils.cpp.
void CopyImageToFloat | ( | uchar * | data, |
int | width, | ||
int | height, | ||
int | pitch, | ||
QTRK_PixelDataType | pdt, | ||
float * | dst | ||
) |
Copies image data from a generic QTRK_PixelDataType array to a float array.
[in] | data | Array with the data in the pdt type. |
[in] | width | Width of the image. |
[in] | height | Height of the image. |
[in] | pitch | Width of the array in memory. |
[in] | pdt | QTRK_PixelDataType specifier for data . |
[in] | dst | Pre-allocated float array in which to save the data. |
Definition at line 641 of file utils.cpp.
void dbgsetlogfile | ( | const char * | path | ) |
std::string file_ext | ( | const char * | f | ) |
void GenerateImageFromLUT | ( | ImageData * | image, |
ImageData * | zlut, | ||
float | minradius, | ||
float | maxradius, | ||
vector3f | pos, | ||
bool | splineInterp, | ||
int | oversampleSubdiv | ||
) |
Definition at line 354 of file utils.cpp.
void GenerateTestImage | ( | ImageData & | img, |
float | xp, | ||
float | yp, | ||
float | size, | ||
float | SNratio | ||
) |
std::string GetDirectoryFromPath | ( | std::string | fullpath | ) |
void GetFormattedTimeString | ( | char * | output | ) |
std::string GetLocalModuleFilename | ( | ) |
double GetPreciseTime | ( | ) |
int NearestPowerOf2 | ( | int | v | ) |
int NearestPowerOf3 | ( | int | v | ) |
void NormalizeRadialProfile | ( | scalar_t * | prof, |
int | rsteps | ||
) |
void NormalizeZLUT | ( | float * | zlut, |
int | numBeads, | ||
int | planes, | ||
int | radialsteps | ||
) |
Definition at line 291 of file utils.cpp.
std::vector< std::vector<float> > ReadCSV | ( | const char * | filename, |
char | sep | ||
) |
ImageData ReadJPEGFile | ( | const char * | fn | ) |
Definition at line 626 of file utils.cpp.
ImageData ReadLUTFile | ( | const char * | lutfile | ) |
Definition at line 720 of file utils.cpp.
std::vector<uchar> ReadToByteBuffer | ( | const char * | filename | ) |
std::vector<vector3f> ReadVector3CSV | ( | const char * | file, |
char | sep | ||
) |
Definition at line 494 of file utils.cpp.
void WriteArrayAsCSVRow | ( | const char * | file, |
float * | d, | ||
int | len, | ||
bool | append | ||
) |
void WriteComplexImageAsCSV | ( | const char * | file, |
std::complex< float > * | d, | ||
int | w, | ||
int | h, | ||
const char * | labels[] | ||
) |
void WriteImageAsCSV | ( | const char * | file, |
float * | d, | ||
int | w, | ||
int | h, | ||
const char * | labels[] | ||
) |
void WriteToLog | ( | const char * | str | ) |
Definition at line 88 of file utils.cpp.
void WriteTrace | ( | std::string | filename, |
vector3f * | results, | ||
int | nResults | ||
) |
void WriteVectorAsCSVRow | ( | const char * | file, |
std::vector< float > | d, | ||
bool | append | ||
) |