9 #ifndef IMPEM_DENSITY_HEADER_H
10 #define IMPEM_DENSITY_HEADER_H
12 #include <IMP/em/em_config.h>
43 " DensityHeader::get_top the top coordinates of the map "
44 <<
"have not been setup yet " << std::endl);
45 if (ind == 0)
return xtop_;
46 if (ind == 1)
return ytop_;
54 void compute_xyz_top(
bool force =
false);
63 void update_map_dimensions(
int nnx,
int nny,
int nnz);
67 void update_cell_dimensions();
69 void show(std::ostream& out = std::cout)
const;
71 static const unsigned short MAP_FIELD_SIZE = 4;
72 static const unsigned short USER_FIELD_SIZE = 25;
73 static const unsigned short COMMENT_FIELD_NUM_OF = 10;
74 static const unsigned short COMMENT_FIELD_SINGLE_SIZE = 80;
84 float xlen, ylen, zlen;
85 float alpha, beta, gamma;
89 float dmin, dmax, dmean;
92 int user[USER_FIELD_SIZE];
93 char map[MAP_FIELD_SIZE];
98 char comments[COMMENT_FIELD_NUM_OF][COMMENT_FIELD_SINGLE_SIZE];
106 float Postmagnification;
113 float AstigmatismAngle;
114 float FocusIncrement;
115 float CountsPerElectron;
117 float EnergySlitwidth;
135 is_resolution_set_ =
true;
136 resolution_ = resolution;
154 "The origin coordinate should be between 0 and 2");
157 return get_xorigin();
159 return get_yorigin();
161 return get_zorigin();
170 top_calculated_ =
false;
178 top_calculated_ =
false;
186 top_calculated_ =
false;
190 float Objectpixelsize_;
194 inline int get_nx()
const {
return nx_; }
196 inline int get_ny()
const {
return ny_; }
198 inline int get_nz()
const {
return nz_; }
199 inline int get_number_of_voxels()
const {
return nx_ * ny_ * nz_; }
202 inline void set_data_type(
int data_type) { data_type_ = data_type; }
205 float xtop_, ytop_, ztop_;
206 float xorigin_, yorigin_, zorigin_;
207 bool top_calculated_;
209 bool is_resolution_set_;
Exception definitions and assertions.
#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 in 3D.
A bounding box in D dimensions.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
A shared base class to help in debugging and things.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.