|
Bsoft
1.9
Bernard's software package
|
Library routines to extract parts of images. More...
#include "rwimg.h"#include "img_extract.h"#include "img_edit.h"#include "Matrix3.h"#include "Complex.h"#include "spline.h"#include "Color.h"#include "utilities.h"Go to the source code of this file.
Functions | |
| Bimage * | img_extract_bitmap (Bimage *p, int img_number, Vector3< float > start, Vector3< int > size) |
| Bimage * | img_extract (Bimage *p, int img_number) |
| Extracts part of an image into a new image. More... | |
| Bimage * | img_extract (Bimage *p, int img_number, Vector3< float > start, Vector3< int > size) |
| Extracts part of an image into a new image. More... | |
| Bimage * | img_extract_shell (Bimage *p, int img_number, float minrad, float maxrad) |
| Extracts a shell from an image into a new image. More... | |
| int | img_extract_tile (Bimage *p, long img_number, Vector3< int > coords, Bimage *pex, long n) |
| Bimage * | img_extract_tiles (Bimage *p, int img_number, Vector3< int > start, Vector3< int > size, Vector3< int > tile_size, int exceed) |
| Extracts a set of tiles from an image into a new image. More... | |
| Bimage * | img_extract_tiles_at_coords (Bimage *p, int img_number, int ntiles, Vector3< int > *coords, Vector3< int > tile_size) |
| Extracts a set of tiles at specified positions from an image into a new image. More... | |
| Bimage * | img_extract_orthogonal_slices (Bimage *p, int img_num, Vector3< int > voxel, Vector3< int > size) |
| Extracts orthogonal views around a voxel. More... | |
| int | img_extract_show_chunk (Bimage *p, Bimage *pshow, int aflag, long i, long len) |
| Bimage * | img_extract_show (Bimage *p, int aflag) |
| Converts a slice from an image to a 2D plane for display. More... | |
| Bimage * | img_extract_magnifying (Bimage *p, int img_num, Vector3< int > center, Vector3< int > size, float scale) |
| Extracts a region from an image to magnify. More... | |
| Bimage * | img_extract_particles (Bimage *p, float radius, float bad_radius, int ncoord, int nbad, float *coords) |
| Extracts particles defined by a series of coordinates. More... | |
| Bimage * | img_extract_filament (Bimage *p, int img_num, double width, int axis, long nspline, Vector3< float > *spline) |
| Extracts a filament defined by a series of coordinates. More... | |
Variables | |
| int | verbose |
Library routines to extract parts of images.
Definition in file img_extract.cpp.
Extracts part of an image into a new image.
| *p | image (not altered). |
| img_number | image number from which to extract, -1 indicates all images. |
A single image (only one sub-image) is extracted from an image. The old data is not affected. Statistics for the extracted image are calculated.
Definition at line 35 of file img_extract.cpp.
Extracts part of an image into a new image.
| *p | image (not altered). |
| img_number | image number from which to extract, -1 indicates all images. |
| start | three-value vector = start of extracted image. |
| size | three-vector size of extracted image. |
A single image (only one sub-image) is extracted from a given sub-image in an image structure, starting at a specified point and with a specified size. The old data is not affected. Statistics for the extracted image are calculated.
Definition at line 62 of file img_extract.cpp.
| Bimage * img_extract_bitmap | ( | Bimage * | p, |
| int | img_number, | ||
| Vector3< float > | start, | ||
| Vector3< int > | size | ||
| ) |
Definition at line 154 of file img_extract.cpp.
| Bimage* img_extract_filament | ( | Bimage * | p, |
| int | img_num, | ||
| double | width, | ||
| int | axis, | ||
| long | nspline, | ||
| Vector3< float > * | spline | ||
| ) |
Extracts a filament defined by a series of coordinates.
| *p | micrograph to extract filament from. |
| img_num | image number from which to extract filament. |
| width | width of filament image to extract. |
| axis | helical axis alignment: x=1, y=2, z=3. |
| nspline | number of coordinates in spline curve. |
| *spline | spline curve. |
A single filament is extracted and written into a pre-existing image.
Definition at line 966 of file img_extract.cpp.
| Bimage* img_extract_magnifying | ( | Bimage * | p, |
| int | img_num, | ||
| Vector3< int > | center, | ||
| Vector3< int > | size, | ||
| float | scale | ||
| ) |
Extracts a region from an image to magnify.
| *p | image. |
| img_num | image number to extract. |
| center | center of region to magnify. |
| size | size of region to magnify. |
| scale | dimensional scaling. |
Only the desired region is extracted from the original image and
resized based on the given scale argument.
The dynamic range is rescaled using the image display minimum and
maximum:
new_data = data*255/(max-min)
with truncation of the data below 0 and above 255.
Bit data are converted to 0 (black) and 255 (white).
RGB data are rescaled as for gray scale images.
Complex data types are converted to intensities. Definition at line 752 of file img_extract.cpp.
| Bimage* img_extract_orthogonal_slices | ( | Bimage * | p, |
| int | img_num, | ||
| Vector3< int > | voxel, | ||
| Vector3< int > | size | ||
| ) |
Extracts orthogonal views around a voxel.
| *p | image. |
| img_num | image number to extract. |
| voxel | voxel of intersection. |
| size | size of slices to extract. |
Only the desired region is extracted from the original image. The fill value is taken from the image background.
Definition at line 505 of file img_extract.cpp.
| Bimage* img_extract_particles | ( | Bimage * | p, |
| float | radius, | ||
| float | bad_radius, | ||
| int | ncoord, | ||
| int | nbad, | ||
| float * | coords | ||
| ) |
Extracts particles defined by a series of coordinates.
| *p | image. |
| radius | radius of box to extract. |
| bad_radius | radius of bad areas. |
| ncoord | number of coordinates. |
| nbad | number of bad area coordinates. |
| *coords | coordinates (sets of x,y,z,n) including bad areas. |
Definition at line 889 of file img_extract.cpp.
Extracts a shell from an image into a new image.
| *p | image (not altered). |
| img_number | image number from which to extract, -1 indicates all images. |
| minrad | minimum shell radius. |
| maxrad | maximum shell radius. |
A single image (only one sub-image) is extracted from a given sub-image in an image structure, starting at a specified point and with a specified size. The old data is not affected. Statistics for the extracted image are calculated.
Definition at line 237 of file img_extract.cpp.
Converts a slice from an image to a 2D plane for display.
| *p | image. |
| aflag | averaging flag. |
Only the desired image slice is extracted from the original image and
resized based on the given scale argument.
The image, slice and scale values are encoded in the image structure.
The dynamic range is rescaled using the image display minimum and maximum:
new_data = data*255/(max-min)
with truncation of the data below 0 and above 255.
Bit data are converted to 0 (black) and 255 (white).
RGB data are rescaled as for gray scale images.
Complex data types are converted to intensities. Definition at line 693 of file img_extract.cpp.
Definition at line 592 of file img_extract.cpp.
Definition at line 301 of file img_extract.cpp.
| Bimage* img_extract_tiles | ( | Bimage * | p, |
| int | img_number, | ||
| Vector3< int > | start, | ||
| Vector3< int > | size, | ||
| Vector3< int > | tile_size, | ||
| int | exceed | ||
| ) |
Extracts a set of tiles from an image into a new image.
| *p | image (not altered). |
| img_number | image number from which to extract. |
| start | 3-vector start for first tile to be extracted. |
| size | 3-vector size of part of image to be extracted (0 = whole image). |
| tile_size | 3-vector size of extracted image. |
| exceed | flag to allow tiles to exceed the input image size. |
A set of tiles of specified size are extracted from a given sub-image in an image structure, starting from a point and generating as many tiles as would fit into the image size given. If the image size given is zero, then the whole image is used. The origins of the tiles are inserted into the sub-image origin fields. The old data is not affected.
Definition at line 347 of file img_extract.cpp.
| Bimage* img_extract_tiles_at_coords | ( | Bimage * | p, |
| int | img_number, | ||
| int | ntiles, | ||
| Vector3< int > * | coords, | ||
| Vector3< int > | tile_size | ||
| ) |
Extracts a set of tiles at specified positions from an image into a new image.
| *p | image (not altered). |
| img_number | image number from which to extract, -1 indicates all images. |
| ntiles | number of tiles to extract. |
| *coords | coordinates for the tile origins. |
| tile_size | 3-vector size of extracted image. |
A set of tiles of specified size are extracted from a given sub-image in an image structure, using given coordinates for the tiles, which have to fit into the image size. The origins of the tiles are inserted into the sub-image origin fields. The old data is not affected.
Definition at line 445 of file img_extract.cpp.
| int verbose |