tomwer.core.process.reconstruction.axis.axis.AxisTask#

class tomwer.core.process.reconstruction.axis.axis.AxisTask(process_id=None, varinfo=None, inputs=None, node_id=None, node_attrs=None, execinfo=None)#

Process used to compute the center of rotation of a scan

Parameters:

axis_params – parameters to configure the axis process

Type:

AxisRP

compute(scan, wait=True)#

Compute the position value for the scan

Parameters:
  • scan (TomwerScanBase) –

  • wait (bool) – used for threaded process. True if we want to end the computation before releasing hand.

Returns:

scan as a TomoBase

compute_axis_position(scan)#
Parameters:

scan – scan for which we compute the center of rotation

Type:

TomoScan

Returns:

position of the rotation axis. Use the .AxisMode defined by the .ReconsParams of the .AxisProcess

Return type:

float or None (if fail to compute the axis position)

define_calculation_mode(mode, fct_pointer)#

Register the function to call of the given mode

Parameters:
  • mode (AxisMode) – the mode to register

  • fct_pointer – pointer to the function to call

static definition()#

definition of the process

static get_cor_frm_process_file(process_file, entry, as_url=False)#

Read cor position from a tomwer_process file

Parameters:
  • process_file

  • entry

Return type:

Optional[float]

Returns:

static get_inputs(scan)#
static get_inputs_urls(scan)#

Make sure we have valid projections to be used for axis calculation

Parameters:

scan (TomwerScanBase) – scan to check

Raise:

NoAxisUrl if fails to found

Returns:

the two projections to be used for axis calculation

Return type:

tuple of AxisResource

lock_position_value(lock=True)#

lock the position currently computed or defined by the user. In this case we will lock the axis as defined ‘fixed’ with the current value

Parameters:

lock (bool) – if true lock the currently existing position value

static program_name()#

Name of the program used for this processing

static program_version()#

version of the program used for this processing

run()#

Compute the position value then get ready to the next. And call

Note

this simply call compute. But this is needed for the AxisProcessThreaded class

scan_ready(scan)#
setMode(mode, value)#
set_configuration(configuration)#
set_recons_params(recons_params)#