def calculate_parameters_in_pixels(x_pixel_um, y_pixel_um, z_pixel_um,
    soma_diameter_um, max_cluster_size_um3, ball_xy_size_um, ball_z_size_um):
    """
    Convert the command-line arguments from real (um) units to pixels
    :param x_pixel_um:
    :param y_pixel_um:
    :param z_pixel_um:
    :param soma_diameter_um:
    :param max_cluster_size_um3:
    :param ball_xy_size_um:
    :param ball_z_size_um:
    :return:
    """
    mean_in_plane_pixel_size = 0.5 * (x_pixel_um + y_pixel_um)
    voxel_volume = x_pixel_um * y_pixel_um * z_pixel_um
    soma_diameter = int(round(soma_diameter_um / mean_in_plane_pixel_size))
    max_cluster_size = int(round(max_cluster_size_um3 / voxel_volume))
    ball_xy_size = int(round(ball_xy_size_um / mean_in_plane_pixel_size))
    ball_z_size = int(round(ball_z_size_um / z_pixel_um))
    return soma_diameter, max_cluster_size, ball_xy_size, ball_z_size
