import copy


def get_preprocessing_transforms(transforms):
    """Checks the transformations parameters and selects the transformations which are done during preprocessing only.

    Args:
        transforms (dict): Transformation dictionary.

    Returns:
        dict: Preprocessing transforms.
    """
    original_transforms = copy.deepcopy(transforms)
    preprocessing_transforms = copy.deepcopy(transforms)
    for idx, tr in enumerate(original_transforms):
        if tr == "Resample" or tr == "CenterCrop" or tr == "ROICrop":
            del transforms[tr]
        else:
            del preprocessing_transforms[tr]

    return preprocessing_transforms