This is an old revision of the document!
Centering : Utility for centering in 2D or 3D.
Usage in command line:
sp_center_2d3d.py input_stack_or_volume output_directory --mode=centering_mode --verbosity=verbosity_level --debug --threshsigma=threshold_sigma --applyshift stack_or_volume_to_be_centered --ndilation=number_of_dilations --nerosion=number_of_erosions --volradius=volume_radius --dimensions=number_of_dimensions --stem=output_volume_prefix --threshint=intermediate_threshold --pad=padding_factor
The purpose of sp_center_2d3d.py is to:
: center a stack of 2D images, or : center a 3D reconstruction
1. General usage:
sp_center_2d3d.py input_stack_or_volume output_directory
2. Center a stack of 2D images using an autocorrelation function
sp_center_2d3d.py input_stack output_directory --threshsigma=threshold_sigma
Images will be thresholded in units of standard deviations above the mean. Check the output stkmask.hdf to see if the threshold is reasonable.
3. Centering a stack by rotating each image by 180 degrees and aligning to itself:
sp_center_2d3d.py input_stack output_directory --mode=rt180
4. Center a binarized volume using an autocorrelation function:
sp_center_2d3d.py input_binary_volume output_directory --applyshift=volume_to_be_centered
Generate the input binary volume using, for example, sp_mask.py. An adaptive mask is fine also; it will be thresholded. The mask will be centered, and those shifts will be applied to the volume to be shifted.
5. Center a binarized volume by finding a box that encloses it and centering that box:
sp_center_2d3d.py input_binary_volume output_directory --mode=boundingbox --applyshift=volume_to_be_centered
As above, the input binary mask will be centered, and those shifts will be applied to the volume to be centered.
6. Center a volume by alignment to a Gaussian blob:
sp_center_2d3d.py volume_to_be_centered output_directory --mode=blob --volradius=volume_radius
If your volume to be centered isn't round, try the radius in the smallest dimension.
Tapu Shaikh
Category 1:: APPLICATIONS
sphire/bin/sp_center_2d3d.py
Beta:: Under evaluation and testing. Please let us know if there are any bugs.
There are no known bugs so far.