32#ifndef eman_geometry_h_
33#define eman_geometry_h_
57 explicit IntSize(
int xx=0,
int yy=0,
int zz=0)
73 else if (
data[1] > 1) {
152 else if (
data[1] > 1) {
155 else if (
data[0] > 1) {
181 inline operator vector<float>()
const {
433 inline operator vector<float>()
const {
460 Pixel(
int xx,
int yy,
int zz,
float vv) :
x(xx),
y(yy),
z(zz),
value(vv) { }
526 Region(
int x,
int y,
int z,
int xsize,
int ysize,
int zsize)
550 Region(
float x,
float y,
float z,
float xsize,
float ysize,
float zsize)
566 Region(
double x,
double y,
double xsize,
double ysize)
574 Region(
double x,
double y,
double z,
double xsize,
double ysize,
double zsize)
FloatPoint defines a float-coordinate point in a 1D/2D/3D space.
float operator[](int i) const
Get the ith direction's coordinate.
FloatPoint(float xx, float yy, float zz)
Construct a 3D point.
FloatPoint(double xx, double yy)
Construct a 2D point.
FloatPoint(float xx, float yy)
Construct a 2D point.
FloatPoint(float xx)
Construct a 1D point.
FloatPoint(const FloatPoint &fp)
FloatPoint(double xx)
Construct a 1D point.
int get_ndim() const
Get the dimension of the point, 1D/2D/3D.
FloatPoint(int xx, int yy, int zz)
Construct a 3D point.
FloatPoint()
Construct a point at the origin location.
FloatPoint(int xx)
Construct a 1D point.
FloatPoint & operator=(const vector< float > &v)
FloatPoint(double xx, double yy, double zz)
Construct a 3D point.
FloatPoint(int xx, int yy)
Construct a 2D point.
FloatSize is used to describe a 1D, 2D or 3D rectangular size in floating numbers.
float operator[](int i) const
Get the ith direction's size.
FloatSize(int xx, int yy=0, int zz=0)
Construct a FloatSize object.
FloatSize(double xx, double yy=0, double zz=0)
Construct a FloatSize object.
int get_ndim() const
Get its dimension, 1D, 2D, or 3D.
FloatSize(float xx=0, float yy=0, float zz=0)
Construct a FloatSize object.
IntPoint defines an integer-coordinate point in a 1D/2D/3D space.
IntPoint(int xx, int yy, int zz)
Construct a 3D point.
IntPoint(int xx)
Construct a 1D point.
IntPoint()
Construct a point at the origin location.
IntPoint(int xx, int yy)
Construct a 2D point.
int operator[](int i) const
Get the ith direction's coordinate.
int get_ndim() const
Get the dimension of the point, 1D/2D/3D.
IntSize is used to describe a 1D, 2D or 3D rectangular size in integers.
int operator[](int i) const
Get the ith direction's size.
IntSize(int xx=0, int yy=0, int zz=0)
Construct an IntSize object.
int get_ndim() const
Get its dimension, 1D, 2D, or 3D.
Pixel describes a 3D pixel's coordinates and its intensity value.
Pixel(int xx, int yy, int zz, float vv)
Construct a Pixel object given its 3D coordinates and its value.
IntPoint get_point() const
Get the pixel's coordinates as an integer point.
float get_value() const
Get the pixel's intensity value.
Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes...
float get_width() const
get the width
Region(double x, double y, double xsize, double ysize)
Construct a 2D floating-number region.
void set_width(const float &v)
set the width
Region()
Construct a null region with its origin at coordinate origins and its sizes to be 0.
vector< float > get_size() const
get the size of each dimension as a vector
float y_origin() const
get the y element of the origin
Region(double x, double y, double z, double xsize, double ysize, double zsize)
Construct a 3D floating-number region.
bool inside_region() const
to check whether a point is inside this region
void set_depth(const float &v)
set the depth
float x_origin() const
get the x element of the origin
int get_ndim() const
Get the region's dimension.
Region(float x, float xsize)
Construct a 1D floating-number region.
void set_origin(const vector< float > &v)
set the origin using a vector
Region(float x, float y, float z, float xsize, float ysize, float zsize)
Construct a 3D floating-number region.
Region(int x, int y, int z, int xsize, int ysize, int zsize)
Construct a 3D integer region.
string get_string() const
Get the description of this region in a string.
Region(const FloatPoint &o, const FloatSize &s)
Construct a region given's orginal point and edge sizes.
void set_height(const float &v)
set the height
vector< float > get_origin() const
get the origin as a vector
bool is_region_in_box(const FloatSize &box) const
To check whether 'this' region is inside a given box assuming the box's origins are (0,...
float get_depth() const
get the depth
Region(int x, int xsize)
Construct a 1D integer region.
Region(int x, int y, int xsize, int ysize)
Construct a 2D integer region.
Region(float x, float y, float xsize, float ysize)
Construct a 2D floating-number region.
float z_origin() const
get the z element of the origin
Region(double x, double xsize)
Construct a 1D floating-number region.
float get_height() const
get the height
EMData * copy() const
This file is a part of "emdata.h", to use functions in this file, you should "#include "emdata....
bool operator!=(const EMObject &e1, const EMObject &e2)
EMData * operator-(const EMData &em, float n)
bool operator==(const EMObject &e1, const EMObject &e2)
bool operator<(const Pixel &p1, const Pixel &p2)