How it works
Contents
How it works#
Packages tomopyui relies on#
As mentioned on the home page, tomopyui is built on many open-source python packages including:
tomopy
Automatic center of rotation finding using
tomopy.recon.rotation.find_centerandtomopy.recon.rotation.find_center_voManual center of rotation finding using
tomopy.recon.rotation.write_centerIterative alignment algorithm
CPU-based reconstruction algorithms (TK)
Wrapper for ASTRA algorithms
astra-toolbox
Tomographic reconstruction toolbox with many GPU-accelerated algorithms
ipywidgets
The user interface is created inside of JupyterLab using ipywidgets.
cupy
Sends numpy arrays to the GPU for calculations
bqplot
bqplot-image-gl
tomocupy
Utilizes GPU-acceleration to speed up automatic alignment
Built from tomopy, but sends data to the GPU to do some of the calculations.
Only a few functions available now, but could be expanded significantly
Included as a module in tomopyui (for now)
Helps run a lot of the backend of tomopyui
Structure#
The code is divided into the frontend (tomopyui.widgets) and the backend (tomopyui.backend and tomopyui.tomocupy).
When the user calls tomopyui.widgets.main.create_dashboard, they are creating several different objects:
Importtab:The type of
Importtab is dictated by the user’s choice in string on the call from the Jupyter notebook (e.g., “SSRL_62C” or “ALS_832”)Holds both raw and prenormalized
Uploaders, which hold a specific type ofRawProjections(depending on the choice above) and a generalPrenormalized_Projectionsobject, respectively.Uploaders upload the data (hold buttons, viewers, etc.), andProjections hold the data.Projectionobjects also hold specific types of metadata. Storing metadata along the processing pipeline is critical.
Centertab:Used to interactively find the center of rotation
Contains two Accordion widgets:
tomopy.recon.rotation.find_centerandtomopy.recon.rotation.find_center_vofor automatic center finding.Reconstruction of a given slice of the data at various centers. The user can then maneuver the slider to find the best center by eye.
Aligntab:Used to align jittery data using the automatic alignment algorithms built into tomopy.
Align only a part of a dataset by selecting an ROI in the “Imported Projections” viewer.
Recontab:Used to reconstruct data using one of many algorithms available from TomoPy and Astra Toolbox.
Data Explorertab:Used to look at prior alignments.
All of these objects talk to view.py, which holds the image viewers.