def METHOD_NAME(input_dir, ref_dir, out_dir, parameters):
    modalities = ["t1-linear", "pet-linear", "flair-linear"]
    uncropped_image = [True, False]
    acquisition_label = ["18FAV45", "11CPIB"]
    parameters["prepare_dl"] = True
    for modality in modalities:
        parameters["preprocessing"] = modality
        if modality == "pet-linear":
            parameters["save_features"] = True
            for acq in acquisition_label:
                parameters["tracer"] = acq
                parameters["suvr_reference_region"] = "pons2"
                parameters["use_uncropped_image"] = False
                parameters[
                    "extract_json"
                ] = f"{modality}-{acq}_mode-{parameters['mode']}.json"
                tsv_file = join(input_dir, f"pet_{acq}.tsv")
                mode = parameters["mode"]
                extract_generic(out_dir, mode, tsv_file, parameters)
        elif modality == "custom":
            parameters["save_features"] = True
            parameters["use_uncropped_image"] = True
            parameters[
                "custom_suffix"
            ] = "graymatter_space-Ixi549Space_modulated-off_probability.nii.gz"
            parameters["roi_custom_template"] = "Ixi549Space"
            parameters["extract_json"] = f"{modality}_mode-{parameters['mode']}.json"
            tsv_file = input_dir / "subjects.tsv"
            mode = parameters["mode"]
            extract_generic(out_dir, mode, tsv_file, parameters)
        elif modality == "t1-linear":
            parameters["save_features"] = True
            for flag in uncropped_image:
                parameters["use_uncropped_image"] = flag
                parameters[
                    "extract_json"
                ] = f"{modality}_crop-{not flag}_mode-{parameters['mode']}.json"
                # tsv_file = input_dir / "subjects.tsv"
                mode = parameters["mode"]
                extract_generic(out_dir, mode, None, parameters)
        elif modality == "flair-linear":
            parameters["save_features"] = False
            parameters["prepare_dl"] = False
            for flag in uncropped_image:
                parameters["use_uncropped_image"] = flag
                parameters[
                    "extract_json"
                ] = f"{modality}_crop-{not flag}_mode-{parameters['mode']}.json"
                mode = f"{parameters['mode']}_flair"
                extract_generic(out_dir, mode, None, parameters)
        else:
            raise NotImplementedError(
                f"Test for modality {modality} was not implemented."
            )
    assert compare_folders(out_dir / f"caps_{mode}", ref_dir / f"caps_{mode}", out_dir)