CWO++library  0.32
 All Classes Functions Variables Groups
Functions
File

Functions

int CWO::CheckExt (const char *fname, const char *ext)
int CWO::Load (const std::string &fname, int c=CWO_GREY)
 Load image file or cwo file.
int CWO::Load (const std::string &fname_amp, const std::string &fname_pha, int c=CWO_GREY)
 Load image file or cwo file.
int CWO::Save (const std::string &fname, int bmp_8_24=24)
 Save image file or cwo file.
int CWO::Save (const std::string &fname, CWO *r, CWO *g=nullptr, CWO *b=nullptr)
int CWO::SaveMonosToColor (const std::string &fname, const std::string &r_name, const std::string &g_name, const std::string &b_name)
int CWO::SaveAsImage (const std::string &fname, float i1, float i2, float o1, float o2, int flag=CWO_SAVE_AS_RE, int bmp_8_24=24)
int CWO::SaveAsImage (const std::string &fname, int flag=CWO_SAVE_AS_RE, int bmp_8_24=24)
virtual int CWO::SaveAsImage (cwoComplex *p, int Nx, int Ny, const std::string &fname, int flag=CWO_SAVE_AS_RE, int bmp_8_24=24)
int CWO::SaveLineAsText (const std::string &fname, int flag)
int CWO::SaveLineAsText (const std::string &fname, int flag, int x1, int y1, int x2, int y2)

Detailed Description


Function Documentation

int CWO::Load ( const std::string &  fname,
int  c = CWO_GREY 
)

Load image file or cwo file.

Parameters:
fnameFilename
cselect color to be read the color image file. The default value is CWO_GREY.
Returns:
When the function success to load file, the return value is CWO_SUCCESS, otherwise CWO_ERROR.
Note:
This function can load bitmap format file. If you use jpeg, tiff, png image formats, you need to install ImageMagik.

Reimplemented in GWO.

Examples:
Amplitude CGH, Kinoform, Phase shifting digital holography, Shifted-Fresnel diffraction, simple_diffraction.cpp, simple_diffraction_with_gpu.cpp, and Using CPU threads.
int CWO::Load ( const std::string &  fname_amp,
const std::string &  fname_pha,
int  c = CWO_GREY 
)

Load image file or cwo file.

Parameters:
fname_ampfilename as amplitude
fname_phafilename as argument
cselect color to be read the color image file. The default value is CWO_GREY.
Returns:
When the function success to load file, the return value is CWO_SUCCESS, otherwise CWO_ERROR.
Note:
This function can load bitmap format file. If you use jpeg, tiff, png image formats, you need to install ImageMagik.

Reimplemented in GWO.

int CWO::Save ( const std::string &  fname,
int  bmp_8_24 = 24 
)

Save image file or cwo file.

Parameters:
fnamefilename
r
g
b
Returns:
When the function success to load file, the return value is CWO_SUCCESS, otherwise CWO_ERROR.
Note:
This function can load bitmap format file. If you use jpeg, tiff, png image formats, you need to install ImageMagik.

Reimplemented in GWO.

Examples:
Amplitude CGH, Kinoform, Shifted-Fresnel diffraction, simple_diffraction.cpp, simple_diffraction_with_gpu.cpp, and Using CPU threads.