9 #ifndef IMPEM_DENSITY_HEADER_H
10 #define IMPEM_DENSITY_HEADER_H
12 #include <IMP/em/em_config.h>
45 " DensityHeader::get_top the top coordinates of the map "
46 <<
"have not been setup yet " << std::endl);
47 if (ind==0)
return xtop_;
48 if (ind==1)
return ytop_;
57 void compute_xyz_top(
bool force=
false);
67 void update_map_dimensions(
int nnx,
int nny,
int nnz);
71 void update_cell_dimensions();
73 void show(std::ostream& out=std::cout)
const;
75 static const unsigned short MAP_FIELD_SIZE = 4;
76 static const unsigned short USER_FIELD_SIZE = 25;
77 static const unsigned short COMMENT_FIELD_NUM_OF = 10;
78 static const unsigned short COMMENT_FIELD_SINGLE_SIZE = 80;
90 float alpha, beta, gamma;
94 float dmin,dmax,dmean;
97 int user[USER_FIELD_SIZE];
98 char map[MAP_FIELD_SIZE];
103 char comments[COMMENT_FIELD_NUM_OF][COMMENT_FIELD_SINGLE_SIZE];
111 float Postmagnification;
118 float AstigmatismAngle;
119 float FocusIncrement;
120 float CountsPerElectron;
122 float EnergySlitwidth;
133 "The resolution was not set"<<std::endl);
138 return is_resolution_set_;
142 is_resolution_set_=
true;
143 resolution_=resolution;}
160 "The origin coordinate should be between 0 and 2");
162 case 0:
return get_xorigin();
163 case 1:
return get_yorigin();
164 default:
return get_zorigin();
171 inline void set_xorigin(
float x) {xorigin_=x; top_calculated_=
false;}
176 inline void set_yorigin(
float y) {yorigin_=y; top_calculated_=
false;}
181 inline void set_zorigin(
float z) {zorigin_=z; top_calculated_=
false;}
184 float Objectpixelsize_;
193 inline int get_number_of_voxels()
const {
return nx_*ny_*nz_;}
196 inline void set_data_type(
int data_type) {data_type_=data_type;}
199 float xtop_, ytop_, ztop_;
200 float xorigin_, yorigin_, zorigin_;
201 bool top_calculated_;
203 bool is_resolution_set_;
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_INTERNAL_CHECK(expr, message)
An assertion to check for internal errors in IMP. An IMP::ErrorException will be thrown.
DensityHeader create_density_header(const algebra::BoundingBoxD< 3 > &bb, float spacing)
Create a header from a bounding box 3D.
A bounding box in D dimensions.
Exception definitions and assertions.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
A shared base class to help in debugging and things.