32#ifndef eman__testutil_h__
33#define eman__testutil_h__
92 static map<string, int>
test_map_int(
const map<string, int>& d);
93 static map<string, long>
test_map_long(
const map<string, long>& d);
94 static map<string, float>
test_map_float(
const map<string, float>& d);
95 static map<string, string>
test_map_string(
const map<string, string>& d);
110 int nx = 16,
int ny = 16,
int nz = 1)
118 int nx = 16,
int ny = 16,
int nz = 1)
126 int nx = 16,
int ny = 16,
int nz = 1)
134 int nx = 16,
int ny = 16,
int nz = 1)
137 datatype, nx, ny, nz);
151 int nx = 16,
int ny = 16,
int nz = 1);
156 int nx = 16,
int ny = 16,
int nz = 1);
173 return (
float)(x2*x2 + y2*y2);
176 int areax = (int)((
float)nx * z2 / nz);
177 int areay = (int)((
float)ny * z2 / nz);
178 if ((abs(
x-nx/2) <= areax) && (abs(
y-ny/2) <= areay)) {
179 return (
float)(x2*x2 + y2*y2);
206 return (
float)(x2*x2 + y2*y2);
209 int areax = (int)((
float)nx * z2 / nz);
210 int areay = (int)((
float)ny * z2 / nz);
211 if ((abs(
x-nx/2) <= areax) && (abs(
y-ny/2) <= areay)) {
212 return (
float)(x2*x2 + y2*y2);
Ctf is the base class for all CTF model.
Dict is a dictionary to store <string, EMObject> pair.
EMData stores an image's data and defines core image processing routines.
EMObject is a wrapper class for types including int, float, double, etc as defined in ObjectType.
EMDataType
Image pixel data type used in EMAN.
ImageType
Image format types.
FloatPoint defines a float-coordinate point in a 1D/2D/3D space.
FloatSize is used to describe a 1D, 2D or 3D rectangular size in floating numbers.
IntPoint defines an integer-coordinate point in a 1D/2D/3D space.
IntSize is used to describe a 1D, 2D or 3D rectangular size in integers.
static void make_image_file2(const string &filename, EMUtil::ImageType image_type, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static map< string, string > test_map_string(const map< string, string > &d)
static string get_golden_image(const string &imagename)
static vector< int > test_vector_int(const vector< int > &v)
static string get_debug_image(const string &imagename)
static const char * EMDATA_HEADER_EXT
static int verify_image_file2(const string &filename, EMUtil::ImageType image_type, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static vector< long > test_vector_long(const vector< long > &v)
static void set_progname(const string &cur_progname)
static string get_debug_string(int i)
static float get_pixel_value_by_dist2(int nx, int ny, int nz, int x, int y, int z)
static vector< EMData * > test_vector_emdata(const vector< EMData * > &v)
static void make_image_file(const string &filename, EMUtil::ImageType image_type, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static int verify_image_file(const string &filename, EMUtil::ImageType image_type, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static float get_pixel_value_by_dist1(int nx, int ny, int nz, int x, int y, int z)
static int verify_image_file_by_mode(const string &filename, EMUtil::ImageType image_type, int mode, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static EMObject emobject_transformarray_to_py()
static int check_image(const string &imagefile, EMData *image=0)
static EMObject emobject_farray_to_py()
static float get_debug_float(int i)
static map< string, long > test_map_long(const map< string, long > &d)
static IntSize test_IntSize(const IntSize &p)
static void dump_image_from_file(const string &filename)
static Dict test_dict(const Dict &d)
static Vec3i test_Vec3i(const Vec3i &p)
static const char * EMDATA_DATA_EXT
static map< string, vector< string > > test_map_vecstring(const map< string, vector< string > > &d)
static vector< Pixel > test_vector_pixel(const vector< Pixel > &v)
static void make_image_file_by_mode(const string &filename, EMUtil::ImageType image_type, int mode, EMUtil::EMDataType datatype=EMUtil::EM_FLOAT, int nx=16, int ny=16, int nz=1)
static void to_emobject(const Dict &d)
static FloatSize test_FloatSize(const FloatSize &p)
static EMObject emobject_strarray_to_py()
static IntPoint test_IntPoint(const IntPoint &p)
static Transform get_debug_transform(int i)
static map< string, int > test_map_int(const map< string, int > &d)
static EMObject emobject_to_py(bool b)
static FloatPoint test_FloatPoint(const FloatPoint &p)
static vector< string > test_vector_string(const vector< string > &v)
static Vec3f test_Vec3f(const Vec3f &p)
static map< string, EMObject > test_map_emobject(const map< string, EMObject > &d)
static vector< float > test_vector_float(const vector< float > &v)
static int get_debug_int(int i)
static void dump_emdata(EMData *image, const string &filename)
static map< string, float > test_map_float(const map< string, float > &d)
XYData defines a 1D (x,y) data set.