![]() |
Bsoft 2.1.4
Bernard's software package
|
Functions to do a tomographic reconstruction. More...
Functions | |
Bimage * | project_tomo_reconstruct (Bproject *project, double hi_res, double scale, Vector3< long > size, int interp_type, int pad_factor, double edge_width, double marker_radius, int fill_type, double fill, int action, double wiener) |
Reciprocal space reconstruction from the images in a multi-image file. More... | |
Bimage * | project_fourier_reconstruction_slab (Bproject *project, double hi_res, double scale, Vector3< long > size, int slab_start, int slab_end, double marker_radius, int fill_type, double fill, int action, double wiener) |
Reciprocal space reconstruction from the images in a multi-image file. More... | |
long | project_tomo_reconstruct_particles (Bproject *project, double resolution, int interp_type, int pad_factor, int ctf_action, double wiener, Bsymmetry &sym, Bstring &partbase, Bstring &partpath, Bstring &partext) |
Reconstructs particles from a tilt series. More... | |
long | img_pack_2D_in_recip_space_slab (Bimage *p, Bimage *prec, long zsize, long slab_start, float *weight, float *weight2, double hi_res, Matrix3 mat, double scale) |
Packs a 2D Fourier transform into a 3D reciprocal space volume. More... | |
int | img_backtransform_slices (Bimage *p) |
Backtransforms 2D slices in a 3D volume. More... | |
int | img_phase_shift_slab_to_origin (Bimage *p, int zsize, int slab_start) |
Phase shifts a set of reflections to the image origin. More... | |
int | mg_fft_write (Bproject *project, Vector3< int > size, double scale, int pad_factor, DataType datatype, double marker_radius, int fill_type, double fill) |
Fourier transform micrographs and write to disk. More... | |
Bimage * | img_extract_ytile (Bstring *file_list, int ystart, int ysize) |
Extracts a tile from the image with limits in y. More... | |
Bimage * | img_backtransform_z_on_disk (Bstring *file_list, Bstring &recfile, DataType datatype, double avg, double std, double cutmin, double cutmax) |
The lines along the z-dimensions of a disk-based block is Fourier back-transformed. More... | |
int | img_backtransform_z_lines (Bimage *p) |
The lines along the z-dimensions of a disk-based block is Fourier back-transformed. More... | |
Bimage * | project_missing_mask (Bproject *project, Vector3< long > size, Vector3< double > origin, double hi_res, double scale) |
Creates a reciprocal space mask from the tilt series orientations. More... | |
Functions to do a tomographic reconstruction.
int img_backtransform_slices | ( | Bimage * | p | ) |
Backtransforms 2D slices in a 3D volume.
*p | 3D complex volume. |
Each slice is extracted, backtransformed and copied back into the original volume. Note: The phases are now not hermitian any more.
int img_backtransform_z_lines | ( | Bimage * | p | ) |
The lines along the z-dimensions of a disk-based block is Fourier back-transformed.
*p | image header information (statistics updated). |
Each 2D xz plane is read from the raw complex data block. Each z-line in the plane is back-transformed. The transformed 2D plane is written back into the raw data block.
Bimage * img_backtransform_z_on_disk | ( | Bstring * | file_list, |
Bstring & | recfile, | ||
DataType | datatype, | ||
double | avg, | ||
double | std, | ||
double | cutmin, | ||
double | cutmax | ||
) |
The lines along the z-dimensions of a disk-based block is Fourier back-transformed.
*file_list | list of image file names. |
&recfile | new reconstruction file name. |
datatype | data type for new reconstruction file. |
avg | target average. |
std | target standard deviation. |
cutmin | minimum for truncation. |
cutmax | maximum for truncation. |
Each 2D xz plane is read from the raw complex data block. Each z-line in the plane is back-transformed. The transformed 2D plane is written back into the raw data block.
Extracts a tile from the image with limits in y.
*file_list | list of image file names. |
ystart | first y index. |
ysize | size in y. |
From a series of z-slab images, tiles are extracted from a defined start in y, and with a defined size in y. A file indicating the origins of the tiles, "y.tiles", is written to be used with bpatch to assemble the tiles.
long img_pack_2D_in_recip_space_slab | ( | Bimage * | p, |
Bimage * | prec, | ||
long | zsize, | ||
long | slab_start, | ||
float * | weight, | ||
float * | weight2, | ||
double | hi_res, | ||
Matrix3 | mat, | ||
double | scale | ||
) |
Packs a 2D Fourier transform into a 3D reciprocal space volume.
*p | 2D Fourier transform |
*prec | 3D reciprocal space slab volume. |
zsize | intentional z dimension of reconstruction. |
slab_start | start of current slab. |
*weight | weigth array. |
*weight2 | weight squared array. |
hi_res | high resolution limit. |
mat | affine matrix. |
scale | scale of reconstruction and particle magnification. |
The rotation matrix is used to determine the plane in reciprocal space to which the 2D transform data is added. The map is assumed to be cubic and the 2D transform square. The real space 2D image must be supplied. This is then padded to more than twice its original size, fourier transformed, and packed into the 3D reciprocal space block.
int img_phase_shift_slab_to_origin | ( | Bimage * | p, |
int | zsize, | ||
int | slab_start | ||
) |
Phase shifts a set of reflections to the image origin.
*p | complex image. |
zsize | slab thickness. |
slab_start | slab start. |
A real space translation with wrapping is equivalent to phase shifting in reciprocal space. The phases are shifted based on the embedded sub-image origins.
int mg_fft_write | ( | Bproject * | project, |
Vector3< int > | size, | ||
double | scale, | ||
int | pad_factor, | ||
DataType | datatype, | ||
double | marker_radius, | ||
int | fill_type, | ||
double | fill | ||
) |
Fourier transform micrographs and write to disk.
*project | image processing parameter structure. |
size | intended reconstruction size. |
scale | reconstruction scale. |
pad_factor | factor that determines image padding. |
datatype | datatype (default complex float). |
marker_radius | flag to mask out markers. |
fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
fill | value to paint markers. |
Each micrograph is padded to a square size that has power of 2 dimensions. The micrograph is transformed and the phases shifted to the origin. A pad factor of zero indicates use of original size.
Bimage * project_fourier_reconstruction_slab | ( | Bproject * | project, |
double | hi_res, | ||
double | scale, | ||
Vector3< long > | size, | ||
int | slab_start, | ||
int | slab_end, | ||
double | marker_radius, | ||
int | fill_type, | ||
double | fill, | ||
int | action, | ||
double | wiener | ||
) |
Reciprocal space reconstruction from the images in a multi-image file.
*project | image processing parameter structure. |
hi_res | high resolution limit. |
scale | scale of reconstruction. |
size | size of reconstruction. |
slab_start | start of reconstruction slab. |
slab_end | end of reconstruction slab. |
marker_radius | flag and radius to mask out markers. |
fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
fill | value to paint markers. |
action | flag to apply CTF to projections. |
wiener | Wiener factor. |
The orientation parameters, view vector, angle of rotation and origin, must all be set. Each image is padded to at least two times its size and its Fourier transform packed into 3D reciprocal space. The figure-of-merit calculated for each reciprocal space voxel is: sum(w*re)^2 + sum(w*im)^2 FOM = --------------------------- sum(w)*sum(w*(re^2 + im^2)) where re real part im imaginary part w weight (inverse distance of image pixel to closest grid point) For voxels with only one data pixel contributing to it, FOM = 0. An image is used in the reconstruction if its selection flag has been set. If the selection number is less than zero, all particles with selection flags greater than zero are used. If the selection number is zero or above, all particles with the selection flag set to the same number are used.
Bimage * project_missing_mask | ( | Bproject * | project, |
Vector3< long > | size, | ||
Vector3< double > | origin, | ||
double | hi_res, | ||
double | scale | ||
) |
Creates a reciprocal space mask from the tilt series orientations.
*project | project parameter structure. |
size | size of mask. |
origin | origin of mask. |
hi_res | high resolution limit. |
scale | scale of mask. |
The orientation parameters of the micrographs must all be set. A 2D mask is overlayed onto the 3D image for each micrograph.
Bimage * project_tomo_reconstruct | ( | Bproject * | project, |
double | hi_res, | ||
double | scale, | ||
Vector3< long > | size, | ||
int | interp_type, | ||
int | pad_factor, | ||
double | edge_width, | ||
double | marker_radius, | ||
int | fill_type, | ||
double | fill, | ||
int | action, | ||
double | wiener | ||
) |
Reciprocal space reconstruction from the images in a multi-image file.
*project | image processing parameter structure. |
hi_res | high resolution limit. |
scale | scale of reconstruction. |
size | size of reconstruction. |
interp_type | interpolation type. |
pad_factor | factor that determines image padding. |
edge_width | edge smoothing width for masks. |
marker_radius | flag and radius to mask out markers. |
fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
fill | value to paint markers. |
action | flag to apply CTF to projections. |
wiener | Wiener factor. |
The orientation parameters, view vector, angle of rotation and origin, must all be set. Each image is padded to at least two times its size and its Fourier transform packed into 3D reciprocal space. The figure-of-merit calculated for each reciprocal space voxel is: sum(w*re)^2 + sum(w*im)^2 FOM = --------------------------- sum(w)*sum(w*(re^2 + im^2)) where re real part im imaginary part w weight (inverse distance of image pixel to closest grid point) For voxels with only one data pixel contributing to it, FOM = 0. An image is used in the reconstruction if its selection flag has been set. If the selection number is less than zero, all particles with selection flags greater than zero are used. If the selection number is zero or above, all particles with the selection flag set to the same number are used.
long project_tomo_reconstruct_particles | ( | Bproject * | project, |
double | resolution, | ||
int | interp_type, | ||
int | pad_factor, | ||
int | ctf_action, | ||
double | wiener, | ||
Bsymmetry & | sym, | ||
Bstring & | partbase, | ||
Bstring & | partpath, | ||
Bstring & | partext | ||
) |
Reconstructs particles from a tilt series.
*project | micrograph project. |
resolution | high resolution limit for reconstruction. |
interp_type | interpolation type. |
pad_factor | factor that determines image padding. |
ctf_action | flag to apply CTF to projections. |
wiener | Wiener factor. |
*sym | point group symmetry. |
&partbase | particle base name for new particle reconstructions. |
&partpath | directory for new particle reconstructions. |
&partext | extension of new reconstructions. |
Requires the particles to be defined in all micrographs. The partbase, partpath and partext arguments can be left empty to use defaults.