IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform

#include <IMP/em/DensityHeader.h>

Detailed Description

Definition at line 25 of file DensityHeader.h.

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
double 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 coordinates (bounding-box) are calculated.
void set_data_type (int data_type)
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)

Public Attributes

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

static const unsigned short COMMENT_FIELD_NUM_OF = 10
static const unsigned short COMMENT_FIELD_SINGLE_SIZE = 80
static const unsigned short MAP_FIELD_SIZE = 4
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_

Member Function Documentation

◆ compute_xyz_top()

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

Compute the farthest point of the grid.

Parameters
[in]forceif true then the top point is calculated even if it has already been calculated.

◆ get_data_type()

int IMP::em::DensityHeader::get_data_type ( ) const

Get the number of bits that used to store the density of a single voxel.

Definition at line 201 of file DensityHeader.h.

◆ get_has_resolution()

bool IMP::em::DensityHeader::get_has_resolution ( ) const

Return if the resolution has been set.

Definition at line 132 of file DensityHeader.h.

◆ get_number_of_voxels()

int IMP::em::DensityHeader::get_number_of_voxels ( ) const

Definition at line 199 of file DensityHeader.h.

◆ get_nx()

int IMP::em::DensityHeader::get_nx ( ) const

Get the number of voxels in the x dimension.

Definition at line 194 of file DensityHeader.h.

◆ get_ny()

int IMP::em::DensityHeader::get_ny ( ) const

Get the number of voxels in the y dimension.

Definition at line 196 of file DensityHeader.h.

◆ get_nz()

int IMP::em::DensityHeader::get_nz ( ) const

Get the number of voxels in the z dimension.

Definition at line 198 of file DensityHeader.h.

◆ get_origin()

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

Returns the origin on the map.

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

Definition at line 152 of file DensityHeader.h.

Here is the call graph for this function:

◆ get_resolution()

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

Returns the resolution of the map.

Definition at line 126 of file DensityHeader.h.

◆ get_spacing()

float IMP::em::DensityHeader::get_spacing ( ) const
Note
Use DensityMap::update_voxel_size() to set the spacing value.

Definition at line 140 of file DensityHeader.h.

◆ get_top()

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

gets the upper bound of the grid

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

Definition at line 41 of file DensityHeader.h.

◆ get_xorigin()

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

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

Definition at line 142 of file DensityHeader.h.

◆ get_yorigin()

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

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

Definition at line 144 of file DensityHeader.h.

◆ get_zorigin()

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

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

Definition at line 146 of file DensityHeader.h.

◆ is_top_calculated()

bool IMP::em::DensityHeader::is_top_calculated ( ) const

True if the top coordinates (bounding-box) are calculated.

Definition at line 189 of file DensityHeader.h.

◆ set_data_type()

void IMP::em::DensityHeader::set_data_type ( int data_type)

Definition at line 202 of file DensityHeader.h.

◆ set_resolution()

void IMP::em::DensityHeader::set_resolution ( float resolution)

Sets the resolution of the map.

Definition at line 134 of file DensityHeader.h.

◆ set_xorigin()

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

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

Note
This is an absolute position in space.

Definition at line 168 of file DensityHeader.h.

◆ set_yorigin()

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

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

Note
This is an absolute position in space.

Definition at line 176 of file DensityHeader.h.

◆ set_zorigin()

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

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

Note
This is an absolute position in space.

Definition at line 184 of file DensityHeader.h.

◆ update_cell_dimensions()

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

◆ update_map_dimensions()

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

Parameters
[in]nnxthe new number of voxels on the X axis
[in]nnythe new number of voxels on the Y axis
[in]nnzthe new number of voxels on the Z axis

Member Data Documentation

◆ alpha

float IMP::em::DensityHeader::alpha

Definition at line 85 of file DensityHeader.h.

◆ Aperture

float IMP::em::DensityHeader::Aperture

Definition at line 104 of file DensityHeader.h.

◆ Astigmatism

float IMP::em::DensityHeader::Astigmatism

Definition at line 112 of file DensityHeader.h.

◆ AstigmatismAngle

float IMP::em::DensityHeader::AstigmatismAngle

Definition at line 113 of file DensityHeader.h.

◆ beta

float IMP::em::DensityHeader::beta

Definition at line 85 of file DensityHeader.h.

◆ CCDArea

float IMP::em::DensityHeader::CCDArea

Definition at line 110 of file DensityHeader.h.

◆ COMMENT_FIELD_NUM_OF

const unsigned short IMP::em::DensityHeader::COMMENT_FIELD_NUM_OF = 10
static

Definition at line 73 of file DensityHeader.h.

◆ COMMENT_FIELD_SINGLE_SIZE

const unsigned short IMP::em::DensityHeader::COMMENT_FIELD_SINGLE_SIZE = 80
static

Definition at line 74 of file DensityHeader.h.

◆ comments

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

text comments

Definition at line 98 of file DensityHeader.h.

◆ CountsPerElectron

float IMP::em::DensityHeader::CountsPerElectron

Definition at line 115 of file DensityHeader.h.

◆ Cs

float IMP::em::DensityHeader::Cs

Definition at line 103 of file DensityHeader.h.

◆ data_type_

int IMP::em::DensityHeader::data_type_
protected

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

Definition at line 213 of file DensityHeader.h.

◆ Defocus

float IMP::em::DensityHeader::Defocus

Definition at line 111 of file DensityHeader.h.

◆ dmax

float IMP::em::DensityHeader::dmax

Definition at line 89 of file DensityHeader.h.

◆ dmean

float IMP::em::DensityHeader::dmean

Definition at line 89 of file DensityHeader.h.

◆ dmin

float IMP::em::DensityHeader::dmin

Definition at line 89 of file DensityHeader.h.

◆ EnergyOffset

float IMP::em::DensityHeader::EnergyOffset

Definition at line 118 of file DensityHeader.h.

◆ EnergySlitwidth

float IMP::em::DensityHeader::EnergySlitwidth

Definition at line 117 of file DensityHeader.h.

◆ Exposuretime

float IMP::em::DensityHeader::Exposuretime

Definition at line 107 of file DensityHeader.h.

◆ FocusIncrement

float IMP::em::DensityHeader::FocusIncrement

Definition at line 114 of file DensityHeader.h.

◆ gamma

float IMP::em::DensityHeader::gamma

Definition at line 85 of file DensityHeader.h.

◆ Intensity

float IMP::em::DensityHeader::Intensity

Definition at line 116 of file DensityHeader.h.

◆ is_resolution_set_

bool IMP::em::DensityHeader::is_resolution_set_
protected

Definition at line 209 of file DensityHeader.h.

◆ ispg

int IMP::em::DensityHeader::ispg

Definition at line 90 of file DensityHeader.h.

◆ lswap

int IMP::em::DensityHeader::lswap

Definition at line 123 of file DensityHeader.h.

◆ machinestamp

int IMP::em::DensityHeader::machinestamp

Definition at line 94 of file DensityHeader.h.

◆ magic

int IMP::em::DensityHeader::magic

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

Definition at line 101 of file DensityHeader.h.

◆ Magnification

float IMP::em::DensityHeader::Magnification

Definition at line 105 of file DensityHeader.h.

◆ map

char IMP::em::DensityHeader::map[MAP_FIELD_SIZE]

Definition at line 93 of file DensityHeader.h.

◆ MAP_FIELD_SIZE

const unsigned short IMP::em::DensityHeader::MAP_FIELD_SIZE = 4
static

Definition at line 71 of file DensityHeader.h.

◆ mapc

int IMP::em::DensityHeader::mapc

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

Definition at line 88 of file DensityHeader.h.

◆ mapr

int IMP::em::DensityHeader::mapr

Definition at line 88 of file DensityHeader.h.

◆ maps

int IMP::em::DensityHeader::maps

Definition at line 88 of file DensityHeader.h.

◆ MarkerX

float IMP::em::DensityHeader::MarkerX

Definition at line 121 of file DensityHeader.h.

◆ MarkerY

float IMP::em::DensityHeader::MarkerY

Definition at line 122 of file DensityHeader.h.

◆ Microscope

float IMP::em::DensityHeader::Microscope

Definition at line 108 of file DensityHeader.h.

◆ mx

int IMP::em::DensityHeader::mx

Definition at line 83 of file DensityHeader.h.

◆ my

int IMP::em::DensityHeader::my

Definition at line 83 of file DensityHeader.h.

◆ mz

int IMP::em::DensityHeader::mz

Definition at line 83 of file DensityHeader.h.

◆ nlabl

int IMP::em::DensityHeader::nlabl

Definition at line 96 of file DensityHeader.h.

◆ nsymbt

int IMP::em::DensityHeader::nsymbt

Definition at line 91 of file DensityHeader.h.

◆ nx_

int IMP::em::DensityHeader::nx_
protected

Definition at line 210 of file DensityHeader.h.

◆ nxstart

int IMP::em::DensityHeader::nxstart

number of first columns in map (x-dimension)

Definition at line 77 of file DensityHeader.h.

◆ ny_

int IMP::em::DensityHeader::ny_
protected

Definition at line 210 of file DensityHeader.h.

◆ nystart

int IMP::em::DensityHeader::nystart

number of first columns in map (y-dimension)

Definition at line 79 of file DensityHeader.h.

◆ nz_

int IMP::em::DensityHeader::nz_
protected

Definition at line 210 of file DensityHeader.h.

◆ nzstart

int IMP::em::DensityHeader::nzstart

number of first columns in map (z-dimension)

Definition at line 81 of file DensityHeader.h.

◆ Objectpixelsize_

float IMP::em::DensityHeader::Objectpixelsize_

Definition at line 190 of file DensityHeader.h.

◆ Pixelsize

float IMP::em::DensityHeader::Pixelsize

Definition at line 109 of file DensityHeader.h.

◆ Postmagnification

float IMP::em::DensityHeader::Postmagnification

Definition at line 106 of file DensityHeader.h.

◆ resolution_

float IMP::em::DensityHeader::resolution_
protected

Definition at line 208 of file DensityHeader.h.

◆ rms

float IMP::em::DensityHeader::rms

Definition at line 95 of file DensityHeader.h.

◆ Tiltangle

float IMP::em::DensityHeader::Tiltangle

Definition at line 119 of file DensityHeader.h.

◆ Tiltaxis

float IMP::em::DensityHeader::Tiltaxis

Definition at line 120 of file DensityHeader.h.

◆ top_calculated_

bool IMP::em::DensityHeader::top_calculated_
protected

Definition at line 207 of file DensityHeader.h.

◆ user

int IMP::em::DensityHeader::user[USER_FIELD_SIZE]

Definition at line 92 of file DensityHeader.h.

◆ USER_FIELD_SIZE

const unsigned short IMP::em::DensityHeader::USER_FIELD_SIZE = 25
static

Definition at line 72 of file DensityHeader.h.

◆ voltage

float IMP::em::DensityHeader::voltage

Definition at line 102 of file DensityHeader.h.

◆ xlen

float IMP::em::DensityHeader::xlen

Definition at line 84 of file DensityHeader.h.

◆ xorigin_

float IMP::em::DensityHeader::xorigin_
protected

Definition at line 206 of file DensityHeader.h.

◆ xtop_

float IMP::em::DensityHeader::xtop_
protected

Definition at line 205 of file DensityHeader.h.

◆ ylen

float IMP::em::DensityHeader::ylen

Definition at line 84 of file DensityHeader.h.

◆ yorigin_

float IMP::em::DensityHeader::yorigin_
protected

Definition at line 206 of file DensityHeader.h.

◆ ytop_

float IMP::em::DensityHeader::ytop_
protected

Definition at line 205 of file DensityHeader.h.

◆ zlen

float IMP::em::DensityHeader::zlen

Definition at line 84 of file DensityHeader.h.

◆ zorigin_

float IMP::em::DensityHeader::zorigin_
protected

Definition at line 206 of file DensityHeader.h.

◆ ztop_

float IMP::em::DensityHeader::ztop_
protected

Definition at line 205 of file DensityHeader.h.


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