IMP logo

IMP::em::DensityHeader Class Reference


Detailed Description


Public Member Functions

void compute_xyz_top (bool force=false)
 Compute the farthest point of the grid.
int get_data_type () const
 Get the number of bits that used to store the density of a single voxel.
bool get_has_resolution () const
 Return if the resolution has been set.
int get_number_of_voxels () const
int get_nx () const
 Get the number of voxels in the x dimension.
int get_ny () const
 Get the number of voxels in the y dimension.
int get_nz () const
 Get the number of voxels in the z dimension.
float get_origin (int i) const
 Returns the origin on the map.
float get_resolution () const
 Returns the resolution of the map.
float get_spacing () const
emreal get_top (int ind) const
 gets the upper bound of the grid
float get_xorigin () const
 Returns the origin on the map (x-coordinate).
float get_yorigin () const
 Returns the origin on the map (y-coordinate).
float get_zorigin () const
 Returns the origin on the map (z-coordinate).
bool is_top_calculated () const
 True if the top coodinates (bounding-box) are calculated.
void set_data_type (int data_type)
void set_number_of_voxels (int nx, int ny, int nz)
void set_resolution (float resolution)
 Sets the resolution of the map.
void set_xorigin (float x)
 Sets the origin on the map (x-coordinate).
void set_yorigin (float y)
 Sets the origin on the map (y-coordinate).
void set_zorigin (float z)
 Sets the origin on the map (z-coordinate).
void show (std::ostream &out=std::cout) const
void update_cell_dimensions ()
void update_map_dimensions (int nnx, int nny, int nnz)

Data Fields

float alpha
float Aperture
float Astigmatism
float AstigmatismAngle
float beta
float CCDArea
char comments [COMMENT_FIELD_NUM_OF][COMMENT_FIELD_SINGLE_SIZE]
 text comments
float CountsPerElectron
float Cs
float Defocus
float dmax
float dmean
float dmin
float EnergyOffset
float EnergySlitwidth
float Exposuretime
float FocusIncrement
float gamma
float Intensity
int ispg
int lswap
int machinestamp
int magic
float Magnification
char map [MAP_FIELD_SIZE]
int mapc
int mapr
int maps
float MarkerX
float MarkerY
float Microscope
int mx
int my
int mz
int nlabl
int nsymbt
int nxstart
 number of first columns in map (x-dimension)
int nystart
 number of first columns in map (y-dimension)
int nzstart
 number of first columns in map (z-dimension)
float Objectpixelsize_
float Pixelsize
float Postmagnification
float rms
float Tiltangle
float Tiltaxis
int user [USER_FIELD_SIZE]
float voltage
float xlen
float ylen
float zlen

Static Public Attributes

 COMMENT_FIELD_NUM_OF = _IMP_em.DensityHeader_COMMENT_FIELD_NUM_OF
static const unsigned short COMMENT_FIELD_NUM_OF = 10
 COMMENT_FIELD_SINGLE_SIZE = _IMP_em.DensityHeader_COMMENT_FIELD_SINGLE_SIZE
static const unsigned short COMMENT_FIELD_SINGLE_SIZE = 80
 MAP_FIELD_SIZE = _IMP_em.DensityHeader_MAP_FIELD_SIZE
static const unsigned short MAP_FIELD_SIZE = 4
 USER_FIELD_SIZE = _IMP_em.DensityHeader_USER_FIELD_SIZE
static const unsigned short USER_FIELD_SIZE = 25

Protected Attributes

int data_type_
bool is_resolution_set_
int nx_
int ny_
int nz_
float resolution_
bool top_calculated_
float xorigin_
float xtop_
float yorigin_
float ytop_
float zorigin_
float ztop_

Friends

std::ostream & operator<< (std::ostream &s, const DensityHeader &v)

Member Function Documentation

void IMP::em::DensityHeader::compute_xyz_top ( bool  force = false  ) 

Compute the farthest point of the grid.

/param[in] force if true then the top point is calculated even if it has already been calcualted.

float IMP::em::DensityHeader::get_origin ( int  i  )  const

Returns the origin on the map.

Parameters:
[in] i the relevant coordinate (0:x, 1:y, 2:z)
Exceptions:
ValueException if the value of i is out of range.

float IMP::em::DensityHeader::get_spacing (  )  const

Note:
Use DensityMap::update_voxel_size() to set the spacing value.

emreal IMP::em::DensityHeader::get_top ( int  ind  )  const

gets the upper bound of the grid

Parameters:
[in] ind The dimension index x:=0,y:=1,z:=2
Returns:
the coordinate value in angstroms

void IMP::em::DensityHeader::set_number_of_voxels ( int  nx,
int  ny,
int  nz 
)

void IMP::em::DensityHeader::set_xorigin ( float  x  ) 

Sets the origin on the map (x-coordinate).

Note:
This is an absolute position in space.

void IMP::em::DensityHeader::set_yorigin ( float  y  ) 

Sets the origin on the map (y-coordinate).

Note:
This is an absolute position in space.

void IMP::em::DensityHeader::set_zorigin ( float  z  ) 

Sets the origin on the map (z-coordinate).

Note:
This is an absolute position in space.

void IMP::em::DensityHeader::update_cell_dimensions (  ) 

Update the cell dimensions of the map multiplying the number of voxels along each direction by the Objectpixelsize

void IMP::em::DensityHeader::update_map_dimensions ( int  nnx,
int  nny,
int  nnz 
)

Update the dimensions of the map to be (nnx,nny,nnz) The origin of the map does not change /param[in] nnx the new number of voxels on the X axis /param[in] nny the new number of voxels on the Y axis /param[in] nnz the new number of voxels on the Z axis


Field Documentation

char IMP::em::DensityHeader::comments[COMMENT_FIELD_NUM_OF][COMMENT_FIELD_SINGLE_SIZE]

text comments

How many bits are used to store the density of a single voxel (used in MRC format)

magic byte for machine platform (~endian), OS-9=0, VAX=1, Convex=2, SGI=3, Sun=4, Mac(Motorola)=5, PC,IntelMac=6

Axes corresponding to columns (mapc), rows (mapr) and sections (maps) (1,2,3 for x,y,z)


The documentation for this class was generated from the following files:

Generated on Mon Mar 8 23:09:01 2010 for IMP by doxygen 1.5.8