center#

class Center(Import)[source]#

Bases: object

Class for creating a tab to help find the center of rotation. See examples for more information on center finding.

Attributes
ImportImport

Needs an import object to be constructed.

current_centerdouble

Current center of rotation. Updated when center_textbox is updated.

center_guessdouble

Guess value for center of rotation for automatic alignment (find_center).

index_to_tryint

Index to try out when automatically (entropy) or manually trying to find the center of rotation.

search_stepdouble

Step size between centers (see tomopy.recon.rotation.write_center or tomopyui.backend.util.center).

search_rangedouble

Will search from [center_guess - search_range] to [center_guess + search range] in steps of search_step.

num_iterint

Number of iterations to use in center reconstruction.

algorithmstr

Algorithm to use in the reconstruction. Chosen from dropdown list.

filterstr

Filter to be used. Only works with fbp and gridrec. If you choose another algorith, this will be ignored.

find_center_manual_on_click(*args)[source]#

Reconstructs at various centers when you click the button, and plots the results with a slider so one can view. TODO: see X example. Uses search_range, search_step, center_guess. Creates a hyperslicer + histogram plot

find_center_on_click(*args)[source]#

Callback to button for attempting to find center automatically using tomopy.recon.rotation.find_center. Takes index_to_try and center_guess. This method has worked better for me, if I use a good index_to_try and center_guess.

find_center_vo_on_click(*args)[source]#

Callback to button for attempting to find center automatically using tomopy.recon.rotation.find_center_vo. Note: this method has not worked well for me.

get_ds_projections()[source]#
make_tab()[source]#

Function to create a Center object’s Tab.

refresh_plots()[source]#
remove_center(*args)[source]#
set_center_to_slice(*args)[source]#
set_metadata()[source]#

Sets Center metadata.

update_center_select()[source]#