km_regional_fits_to_tsv ============================================= .. py:function:: petpal.utils.image_io.km_regional_fits_to_tsv(fit_results_dir: str, out_tsv_dir: str) Tidies the output of regional kinetic modeling results by converting JSON files into a TSV file with one row per fit region. Accomodates lists by converting them into key-value pairs. Assigns a subject and session to each row inferred from the original TAC file path. Requires fields to be identical across all JSON results files. :param fit_results_dir: Directory where RTM results are stored in JSON files. :type fit_results_dir: str :param out_tsv_dir: Path where resulting TSV file containing fit results will be stored. :type out_tsv_dir: str :returns: *km_fits (pd.DataFrame)* -- DataFrame containing KM fit data for all regions.