|
Bsoft 2.1.4
Bernard's software package
|
Functions | |
| Bimage * | img_radon_transform (Bimage *p, int type, int nkernel, int kernel_power, int padd, int ntheta) |
| Calculates the Radon transform of an image. More... | |
| Bimage * | img_radon_inverse_transform (Bimage *p, int type, int nkernel, int kernel_power, int padd) |
| Calculates a 3D image from a Radon transform. More... | |
| int | img_radon_pocs_filter (Bimage *p, int n_cyc_out, int n_cyc_in, double rad_3D, double rad_plane, int support, Bimage *pmask) |
| Filters a radon transform using the POCS method. More... | |
| Bimage * | img_radon_reconstruction (Bproject *project, Bsymmetry &sym, Bstring &file_mask, int rec_size, int ntheta, int table_size, double threshold, Vector3< double > origin, int nkernel, int kernel_power) |
| Reconstructs a Radon transform from a set of projections. More... | |
| int | img_resize_to_next_power2 (Bimage *p, int fill_type, double fill) |
| Resizes without interpolation or rescaling to the next power of 2. More... | |
| Bimage * img_radon_inverse_transform | ( | Bimage * | p, |
| int | type, | ||
| int | nkernel, | ||
| int | kernel_power, | ||
| int | padd | ||
| ) |
Calculates a 3D image from a Radon transform.
| *p | radon transform to be back-transformed. |
| type | type of transformation. |
| nkernel | kernel size. |
| kernel_power | kernel exponent (usually 2). |
| padd | padding flag (0=no padding, 1=padding twofold). |
Type: 1 = From single axis proj. to 3D structure, output is a 3D image with size (z,z,z) 2 = From quarter radon transform to single axis proj., output is a gallery of ntheta 2D image with size (z,z) 3 = From full radon transform to 3D structure, output is a 3D image with size (z,z,z) 4 = From quarter radon transform to 3D structure, output is a 3D image with size (z,z,z)
| int img_radon_pocs_filter | ( | Bimage * | p, |
| int | n_cyc_out, | ||
| int | n_cyc_in, | ||
| double | rad_3D, | ||
| double | rad_plane, | ||
| int | support, | ||
| Bimage * | pmask | ||
| ) |
Filters a radon transform using the POCS method.
| *p | radon transform. |
| n_cyc_out | outer cycles, swapping r,phi and r,theta planes |
| n_cyc_in | inner cycles, within r,phi and r,theta planes |
| rad_3D | limiting radius in 3D. |
| rad_plane | limiting radius in plane. |
| support | flag to impose finiteness in real space. |
| *pmask | mask of dimension (ntheta/2,ntheta/2). |
Filters a Radon transform to impose consistency and/or to fill holes.
It can be used in two ways:
a) When the Radon transform is not completely filled, it fills the holes
described in the mask file produced by proj_to_radon.
b) When the Radon transform is filled and noisy, it impose consistency.
The mask must have the same dimensions as a plane in the radon transform.
| Bimage * img_radon_reconstruction | ( | Bproject * | project, |
| Bsymmetry & | sym, | ||
| Bstring & | file_mask, | ||
| int | rec_size, | ||
| int | ntheta, | ||
| int | table_size, | ||
| double | threshold, | ||
| Vector3< double > | origin, | ||
| int | nkernel, | ||
| int | kernel_power | ||
| ) |
Reconstructs a Radon transform from a set of projections.
| *project | image processing parameter structure. |
| &sym | point group symmetry. |
| &file_mask | output file name of mask of dimension (ntheta,ntheta). |
| rec_size | reconstruction size (x,y,z) |
| ntheta | number of angles in the 2*PI range. |
| table_size | lookup table size. |
| threshold | threshold for rejecting images. |
| origin | origin reference for shifts. |
| nkernel | kernel size. |
| kernel_power | kernel exponent (usually 2). |
The parameters are defined in the hierarchical project structure. The radon transform of each image is calculated and all its symmetry-related views are written into the reconstruction volume. A mask image is calculated for the angular coverage of orientation space and used to weigh the reconstruction.
| Bimage * img_radon_transform | ( | Bimage * | p, |
| int | type, | ||
| int | nkernel, | ||
| int | kernel_power, | ||
| int | padd, | ||
| int | ntheta | ||
| ) |
Calculates the Radon transform of an image.
| *p | image to be transformed. |
| type | type of transformation. |
| nkernel | kernel size. |
| kernel_power | kernel exponent (usually 2). |
| padd | padding flag (0=no padding, 1=padding twofold). |
| ntheta | number of angles in the 2*PI range. |
Computes the Radon transform of a 3D image with all sides equal
(a cube) and a power of 2. The transform is calculated in spherical
coordinates where ntheta is the number of sampling points in the
range 0 - 2*PI along the two angular axes. Because half of this
range is redundant (0-PI is enough), a smaller output can be
generated.
Type:
1 = From 3D structure to single axis proj., output is a gallery of ntheta 2D image with size (x,x)
2 = From single axis proj. to quarter radon transform, output is a 3D image with size (x,ntheta/2,ntheta/2)
3 = From 3D structure to full radon transform, output is a 3D image with size (x,ntheta,ntheta)
4 = From 3D structure to quarter radon transform, output is a 3D image with size (x,ntheta/2,ntheta/2)
| int img_resize_to_next_power2 | ( | Bimage * | p, |
| int | fill_type, | ||
| double | fill | ||
| ) |
Resizes without interpolation or rescaling to the next power of 2.
| p | image (modified). |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
| fill | value to fill in new regions. |
An image is resized to the next power of two in each dimension greater than 1 with translation and filling of new regions with a given value. The new data replaces the old data.