|
Bsoft
2.1.0
Bernard's software package
|
Header file for functions to extract particles from micrographs. More...
Go to the source code of this file.
Functions | |
| int | particle_setup_filenames (Bparticle *part, Bstring filename, Bstring partpath) |
| Sets up individual particle file names for extraction. More... | |
| int | filament_setup_filenames (Bfilament *fil, Bstring filename, Bstring filpath) |
| Sets up individual filament file names for extraction. More... | |
| Vector3< double > * | vector3_spline_from_nodes (Bfilnode *fnode, long &nspline) |
| Calculates a spline curve from a set of filament nodes. More... | |
| long | project_extract_particles (Bproject *project, double scale, int back_flag, int norm_flag, int fill_type, double fill, int mask_width, int split, Bstring &partbase, Bstring &partpath, Bstring &partext) |
| Extracts particle images from micrographs defined in a project. More... | |
| long | micrograph_extract_particles (Bmicrograph *mg, Bimage *p, double scale, int back_flag, int norm_flag, double fill, int mask_width) |
| Extracts particle images from a micrograph. More... | |
| long | reconstruction_extract_particles (Breconstruction *rec, Bimage *p, double scale, int back_flag, int norm_flag, double fill, int mask_width) |
| Extracts particle images from a reconstruction. More... | |
| Bparticle * | reconstruction_project_extract_particles (Breconstruction *rec, Bimage *p, double scale, int back_flag, int norm_flag, double fill, int mask_width) |
| Extracts and projects 3D particle images from a reconstruction and return a 2D list. More... | |
| Bimage * | particle_extract (Bparticle *particles, Bbadarea *bad_areas, Bimage *p, Vector3< long > size, double scale, double bad_radius, int back_flag, int norm_flag, double fill, int mask_width) |
| Extracts particle images from an image. More... | |
| Bimage * | micrograph_extract_gold (Bmicrograph *mg, Bimage *p, double radius) |
| Extracts gold particle images from a micrograph. More... | |
| Bimage * | reconstruction_extract_gold (Breconstruction *rec, Bimage *p, double radius) |
| Extracts gold particle images from a reconstruction. More... | |
| Bimage * | marker_extract_gold (Bmarker *marker_list, Bimage *p, int img_num, double radius) |
| Extracts gold particle images from an image. More... | |
| long | project_extract_filaments (Bproject *project, int filament_width, int axis, Bstring &base, Bstring &path, Bstring &ext, int split) |
| Extracts filament images from micrographs defined in a project. More... | |
| long | micrograph_extract_filaments (Bmicrograph *mg, Bimage *p, double width, int axis) |
| Extracts filament images from a micrograph. More... | |
| long | reconstruction_extract_filaments (Breconstruction *rec, Bimage *p, double width, int axis) |
| Extracts filament images from a micrograph. More... | |
| Bimage * | filament_extract (Bfilament *filaments, Bimage *p, double width, int axis) |
| Extracts filament images from a micrograph. More... | |
| int | project_filaments_to_particles (Bproject *project, Vector3< long > box_size, double boxing_interval, double rise, double angle) |
| Converts filaments to sets of particles. More... | |
| int | micrograph_filaments_to_particles (Bmicrograph *mg, Vector3< long > box_size, double boxing_interval, double rise, double angle) |
| Converts filaments to sets of particles. More... | |
| int | reconstruction_filaments_to_particles (Breconstruction *rec, Vector3< long > box_size, double boxing_interval, double rise, double angle) |
| Converts filaments to sets of particles. More... | |
| Bparticle * | filaments_to_particles (Bfilament *filaments, Vector3< double > pixel_size, Vector3< long > box_size, double boxing_interval, double rise, double angle) |
| Converts filaments to sets of particles. More... | |
| int | project_mask_filament_particles (Bproject *project, int mask_width) |
| Masks particles extracted from filaments. More... | |
| int | project_rotate_mask_filament_particles (Bproject *project, int rotation_axis, int back_flag, int mask_width) |
| Rotates and masks particles extracted from filaments. More... | |
Header file for functions to extract particles from micrographs.
Definition in file mg_extract.h.
Extracts filament images from a micrograph.
| *filaments | filament parameters. |
| *p | image. |
| width | width of box around filament to extract. |
| axis | helical axis alignment: x=1, y=2, z=3. |
If the file names for individual filaments are specified, they are
used to write individual filaments to files.
Default axis alignment (for axis==0):
2D images: x-axis (1)
3D images: z-axis (3)
Definition at line 934 of file mg_extract.cpp.
Sets up individual filament file names for extraction.
| *fil | filament list. |
| filename | filament file name base. |
| filpath | filament path with optional wild card characters. |
The filament path can have wildcard characters ('?') that specify
the number of digits to use to insert numbers in the path and
the file name.
Definition at line 86 of file mg_extract.cpp.
| Bparticle* filaments_to_particles | ( | Bfilament * | filaments, |
| Vector3< double > | pixel_size, | ||
| Vector3< long > | box_size, | ||
| double | boxing_interval, | ||
| double | rise, | ||
| double | angle | ||
| ) |
Converts filaments to sets of particles.
| *filaments | filament parameters. |
| pixel_size | sampling. |
| box_size | size of particle box. |
| boxing_interval | step size between boxes. |
| rise | rise per asymmetric unit in angstrom. |
| angle | angular rotation per asymmetric unit in radians. |
Particle coordinates are calculated along a spline curve through the filament nodes, separated by half the given width. Different filaments in a micrograph are indicated by the selection number.
Definition at line 1113 of file mg_extract.cpp.
Extracts gold particle images from an image.
| *marker_list | marker parameters. |
| *p | image. |
| img_num | sub-image number. |
| radius | radius of gold particle. |
Definition at line 702 of file mg_extract.cpp.
| long micrograph_extract_filaments | ( | Bmicrograph * | mg, |
| Bimage * | p, | ||
| double | width, | ||
| int | axis | ||
| ) |
Extracts filament images from a micrograph.
| *mg | micrograph parameters. |
| *p | micrograph image. |
| width | width of box around filament to extract. |
| axis | helical axis alignment: x=1, y=2, z=3. |
Definition at line 875 of file mg_extract.cpp.
| Bimage* micrograph_extract_gold | ( | Bmicrograph * | mg, |
| Bimage * | p, | ||
| double | radius | ||
| ) |
Extracts gold particle images from a micrograph.
| *mg | micrograph parameters. |
| *p | micrograph image. |
| radius | radius of gold particle. |
Definition at line 665 of file mg_extract.cpp.
| long micrograph_extract_particles | ( | Bmicrograph * | mg, |
| Bimage * | p, | ||
| double | scale, | ||
| int | back_flag, | ||
| int | norm_flag, | ||
| double | fill, | ||
| int | mask_width | ||
| ) |
Extracts particle images from a micrograph.
| *mg | micrograph parameters. |
| *p | micrograph image. |
| scale | scale to extract (usually 1). |
| back_flag | background correction flag. |
| norm_flag | normalization flag. |
| fill | value to fill in new regions. |
| mask_width | filament mask width, if 0, don't apply. |
Definition at line 352 of file mg_extract.cpp.
| int micrograph_filaments_to_particles | ( | Bmicrograph * | mg, |
| Vector3< long > | box_size, | ||
| double | boxing_interval, | ||
| double | rise, | ||
| double | angle | ||
| ) |
Converts filaments to sets of particles.
| *mg | micrograph parameters. |
| box_size | size of particle box. |
| boxing_interval | step size between boxes. |
| rise | rise per asymmetric unit in angstrom. |
| angle | angular rotation per asymmetric unit in radians. |
Particle coordinates are calculated along a spline curve through the filament nodes, separated by half the given width. Different filaments in a micrograph are indicated by the selection number.
Definition at line 1040 of file mg_extract.cpp.
| Bimage* particle_extract | ( | Bparticle * | particles, |
| Bbadarea * | bad_areas, | ||
| Bimage * | p, | ||
| Vector3< long > | size, | ||
| double | scale, | ||
| double | bad_radius, | ||
| int | back_flag, | ||
| int | norm_flag, | ||
| double | fill, | ||
| int | mask_width | ||
| ) |
Extracts particle images from an image.
| *particles | particle parameters. |
| *bad_areas | bad area parameters. |
| *p | image. |
| size | size of box to extract. |
| scale | scale to extract (usually 1). |
| bad_radius | radius of bad area. |
| back_flag | background correction flag. |
| norm_flag | normalization flag. |
| fill | value to fill in new regions. |
| mask_width | filament mask width, if 0, don't apply. |
If the background flag is specified, the particle mask is set in the background, defined as outside the inscribing circle. The mask is set within every bad area in the micrograph and transferred to the mask for a particle where it overlaps.
Definition at line 491 of file mg_extract.cpp.
Sets up individual particle file names for extraction.
| *part | particle list. |
| filename | particle file name base. |
| partpath | particle path with optional wild card characters. |
The particle path can have wildcard characters ('?') that specify
the number of digits to use to insert numbers in the path and
the file name.
Definition at line 36 of file mg_extract.cpp.
| long project_extract_filaments | ( | Bproject * | project, |
| int | filament_width, | ||
| int | axis, | ||
| Bstring & | base, | ||
| Bstring & | path, | ||
| Bstring & | ext, | ||
| int | split | ||
| ) |
Extracts filament images from micrographs defined in a project.
| *project | micrograph project. |
| filament_width | extracted filament width. |
| axis | helical axis alignment: x=1, y=2, z=3. |
| &base | file name base. |
| &path | path to filament file. |
| &ext | filament file extension. |
| split | flag to split filaments into individual files. |
Definition at line 766 of file mg_extract.cpp.
| long project_extract_particles | ( | Bproject * | project, |
| double | scale, | ||
| int | back_flag, | ||
| int | norm_flag, | ||
| int | fill_type, | ||
| double | fill, | ||
| int | mask_width, | ||
| int | split, | ||
| Bstring & | partbase, | ||
| Bstring & | partpath, | ||
| Bstring & | partext | ||
| ) |
Extracts particle images from micrographs defined in a project.
| *project | micrograph project. |
| scale | scale to extract (usually 1). |
| back_flag | background correction flag. |
| norm_flag | normalization flag. |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER. |
| fill | value to fill in new regions. |
| mask_width | filament mask width, if 0, don't apply. |
| split | flag to split images into separate files. |
| &partbase | file name base. |
| &partpath | path to particle file. |
| &partext | particle file extension. |
Definition at line 161 of file mg_extract.cpp.
| int project_filaments_to_particles | ( | Bproject * | project, |
| Vector3< long > | box_size, | ||
| double | boxing_interval, | ||
| double | rise, | ||
| double | angle | ||
| ) |
Converts filaments to sets of particles.
| *project | project parameters. |
| box_size | size of particle box. |
| boxing_interval | step size between boxes. |
| rise | rise per asymmetric unit in angstrom. |
| angle | angular rotation per asymmetric unit in radians. |
Particle coordinates are calculated along a spline curve through the filament nodes, separated by half the given width. Different filaments in a micrograph are indicated by the selection number.
Definition at line 1006 of file mg_extract.cpp.
| int project_mask_filament_particles | ( | Bproject * | project, |
| int | mask_width | ||
| ) |
Masks particles extracted from filaments.
| *project | project parameters. |
| mask_width | width of mask to apply. |
The orientation of the filament is inferred from the view angle and the adjacent regions are set to the background.
Definition at line 1176 of file mg_extract.cpp.
| int project_rotate_mask_filament_particles | ( | Bproject * | project, |
| int | rotation_axis, | ||
| int | back_flag, | ||
| int | mask_width | ||
| ) |
Rotates and masks particles extracted from filaments.
| *project | project parameters. |
| rotation_axis | axis to rotate to: 1=x, 2=y, 3=z. |
| back_flag | background correction flag. |
| mask_width | width of mask to apply. |
The orientation of the filament is inferred from the view angle and the particle is rotated to orient the filament axis along a cartesian axis. The mask is applied and adjacent regions are set to the background.
Definition at line 1208 of file mg_extract.cpp.
| long reconstruction_extract_filaments | ( | Breconstruction * | rec, |
| Bimage * | p, | ||
| double | width, | ||
| int | axis | ||
| ) |
Extracts filament images from a micrograph.
| *rec | reconstruction parameters. |
| *p | reconstruction image. |
| width | width of box around filament to extract. |
| axis | helical axis alignment: x=1, y=2, z=3. |
Definition at line 901 of file mg_extract.cpp.
| Bimage* reconstruction_extract_gold | ( | Breconstruction * | rec, |
| Bimage * | p, | ||
| double | radius | ||
| ) |
Extracts gold particle images from a reconstruction.
| *rec | reconstruction parameters. |
| *p | reconstruction image. |
| radius | radius of gold particle. |
Definition at line 683 of file mg_extract.cpp.
| long reconstruction_extract_particles | ( | Breconstruction * | rec, |
| Bimage * | p, | ||
| double | scale, | ||
| int | back_flag, | ||
| int | norm_flag, | ||
| double | fill, | ||
| int | mask_width | ||
| ) |
Extracts particle images from a reconstruction.
| *rec | reconstruction parameters. |
| *p | micrograph image. |
| scale | scale to extract (usually 1). |
| back_flag | background correction flag. |
| norm_flag | normalization flag. |
| fill | value to fill in new regions. |
| mask_width | filament mask width, if 0, don't apply. |
Definition at line 386 of file mg_extract.cpp.
| int reconstruction_filaments_to_particles | ( | Breconstruction * | rec, |
| Vector3< long > | box_size, | ||
| double | boxing_interval, | ||
| double | rise, | ||
| double | angle | ||
| ) |
Converts filaments to sets of particles.
| *rec | reconstruction parameters. |
| box_size | size of particle box. |
| boxing_interval | step size between boxes. |
| rise | rise per asymmetric unit in angstrom. |
| angle | angular rotation per asymmetric unit in radians. |
Particle coordinates are calculated along a spline curve through the filament nodes, separated by half the given width. Different filaments in a micrograph are indicated by the selection number.
Definition at line 1076 of file mg_extract.cpp.
| Bparticle* reconstruction_project_extract_particles | ( | Breconstruction * | rec, |
| Bimage * | p, | ||
| double | scale, | ||
| int | back_flag, | ||
| int | norm_flag, | ||
| double | fill, | ||
| int | mask_width | ||
| ) |
Extracts and projects 3D particle images from a reconstruction and return a 2D list.
| *rec | reconstruction parameters. |
| *p | micrograph image. |
| scale | scale to extract (usually 1). |
| back_flag | background correction flag. |
| norm_flag | normalization flag. |
| fill | value to fill in new regions. |
| mask_width | filament mask width, if 0, don't apply. |
The file name of the new particles is returned in the image file name.
Definition at line 423 of file mg_extract.cpp.
Calculates a spline curve from a set of filament nodes.
| *fnode | node list. |
| &nspline | number of elements in the spline array. |
The node coordinates are copied into a new array used to calculate the spline array.
Definition at line 128 of file mg_extract.cpp.