![]() |
Bsoft 2.1.4
Bernard's software package
|
Generating a mask from an atomic model. More...
#include "rwmodel.h"
#include "model_mask.h"
#include "model_shell.h"
#include "model_util.h"
#include "matrix_linear.h"
#include "Vector3.h"
#include "linked_list.h"
#include "utilities.h"
Functions | |
Bimage * | model_create_mask (Bmodel *model, Vector3< long > size, Vector3< double > ori, Vector3< double > sam, double edge) |
Calculates a mask of the components and links of a model structure. More... | |
Bimage * | model_create_hull_mask (Bmodel *model, Vector3< long > size, Vector3< double > ori, Vector3< double > sam, int curv_flag, int fast) |
Calculates a mask based on the periphery of a model structure. More... | |
Bimage * | model_create_shell_mask (Bmodel *model, Vector3< long > size, Vector3< double > ori, Vector3< double > sam, double shell_width, int curv_flag, int fast) |
Calculates a shell mask covering a model structure. More... | |
Bimage * | model_create_level_mask (Bmodel *model, Vector3< long > size, Vector3< double > ori, Vector3< double > sam) |
Calculates a mask with one level per model. More... | |
Bimage * | img_extract_segments_using_model (Bimage *p, Bmodel *model, int multi_level) |
Extracts segmentss from a multi-level mask around points defined by a model. More... | |
int | img_add_model_to_mask (Bimage *p, Bmodel *model) |
Adds to the mask the component locations. More... | |
Bmodel * | model_from_multilevel_mask (Bimage *p) |
Generates components at the center of mass of each mask level. More... | |
Bimage * | model_create_projected_mask (Bmodel *model, Vector3< long > size, Vector3< double > ori, Vector3< double > sam, double dang, Bsymmetry &sym) |
Calculates a set of 2D masks for the projections of a model structure. More... | |
Variables | |
int | verbose |
Generating a mask from an atomic model.
Adds to the mask the component locations.
*p | mask. |
*model | model. |
At each component location, the voxel is added to the mask.
Extracts segmentss from a multi-level mask around points defined by a model.
*p | multi-level mask. |
*model | model marking regions in mask. |
multi_level | flag to retain multiple levels. |
Each segment should only be marked by a maximum of one component.
Bimage * model_create_hull_mask | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | ori, | ||
Vector3< double > | sam, | ||
int | curv_flag, | ||
int | fast | ||
) |
Calculates a mask based on the periphery of a model structure.
*model | model structure. |
size | size of the new mask. |
ori | origin of the new mask. |
sam | pixel size of the new mask. |
curv_flag | flag to indicate curved surface. |
fast | flag to use fast algorithm. |
Each point in the new image is tested for inclusion in the mask, by calculating whether it falls inside the closest 3 vertices. Only the first model in the linked list is used.
Bimage * model_create_level_mask | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | ori, | ||
Vector3< double > | sam | ||
) |
Calculates a mask with one level per model.
*model | model structure. |
size | size of the new mask. |
ori | origin of the new mask. |
sam | pixel size of the new mask. |
A level is defined as those voxels closest to the vertices of one model.
Bimage * model_create_mask | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | ori, | ||
Vector3< double > | sam, | ||
double | edge | ||
) |
Calculates a mask of the components and links of a model structure.
*model | model structure. |
size | size of the new mask. |
ori | origin of the new mask. |
sam | pixel size of the new mask. |
edge | edge width in angstrom. |
Each component is used to generate a sphere and each link a bar. Only the first model in the linked list is used.
Bimage * model_create_projected_mask | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | ori, | ||
Vector3< double > | sam, | ||
double | dang, | ||
Bsymmetry & | sym | ||
) |
Calculates a set of 2D masks for the projections of a model structure.
*model | model structure. |
size | size of the new mask. |
ori | origin of the new mask. |
sam | pixel size of the new mask. |
dang | angular step size. |
sym | point group symmetry. |
Each component is used to set the corresponding projected pixel in each 2D image. The projection directions are calculated within the asymmetric unit.
Bimage * model_create_shell_mask | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | ori, | ||
Vector3< double > | sam, | ||
double | shell_width, | ||
int | curv_flag, | ||
int | fast | ||
) |
Calculates a shell mask covering a model structure.
*model | model structure. |
size | size of the new mask. |
ori | origin of the new mask. |
sam | pixel size of the new mask. |
shell_width | width of shell mask. |
curv_flag | flag to indicate curved surface. |
fast | flag to use fast algorithm. |
Each point in the new image is tested for inclusion in the mask, by calculating whether it falls inside the closest 3 vertices. Only the first model in the linked list is used.
Generates components at the center of mass of each mask level.
*p | multi-level mask. |
The mask is expected to be of integer data type.
|
extern |