def attach_measure_thickness(api, window):
    """Attaches the measure Thickness computation to the target data item in the window."""
    target_data_item = window.target_data_item
    if target_data_item and target_data_item.display_xdata.is_data_1d:
        api.library.create_computation('nion.eels_analysis.measure_thickness',
            inputs={'src': target_data_item}, outputs={'thickness_interval':
            None})
