Amélie Biron

Laurent Beaugerie

Olivier Chazouillères

Dr Julien Kirchgesner
email: julien.kirchgesner@gmx.com

Impact of thiopurines and tumour necrosis factor antagonists on primary sclerosing cholangitis outcomes in patients with inflammatory bowel disease Short title: Impact of immunosuppressants in PSC-IBD

Keywords: primary sclerosing cholangitis, inflammatory bowel disease, biliary tract cancer, thiopurines, anti-TNF

Impact of thiopurines and tumour necrosis factor antagonists on primary sclerosing cholangitis outcomes in patients with inflammatory bowel disease

INTRODUCTION

Crohn's disease and ulcerative colitis, collectively referred to as inflammatory bowel disease (IBD), are lifetime inflammatory gastrointestinal disorders of unknown origin. The diagnosis of Primary Sclerosing Cholangitis (PSC) is made in 1 to 5% of patients with IBD. 1 Conversely, 30-80% of patients with PSC are diagnosed with IBD before, at or after the diagnosis of PSC. 2,3 Patients with an established diagnosis of PSC and IBD (PSC-IBD) are followed jointly by gastroenterologists and liver specialists. For gastroenterologists who manage patients with IBD and PSC, the two main objectives are: to try to obtain a sustained control of intestinal inflammation, [START_REF] Berre | Selecting End Points for Disease-Modification Trials in Inflammatory Bowel Disease: the SPIRIT Consensus From the IOIBD[END_REF][START_REF] Gupta | Treat to Target: The Role of Histologic Healing in Inflammatory Bowel Diseases: A Systematic Review and Meta-analysis[END_REF] using increasingly for this purpose thiopurines and tumor necrosis factor antagonists (anti-TNF); [START_REF] Kirchgesner | Therapeutic management of inflammatory bowel disease in real-life practice in the current era of anti-TNF agents: analysis of the French administrative health databases 2009-2014[END_REF] to prevent/detect colorectal neoplasia. [START_REF] Beaugerie | Cancers Complicating Inflammatory Bowel Disease[END_REF][START_REF] Wijnands | Prognostic Factors for Advanced Colorectal Neoplasia in Inflammatory Bowel Disease: Systematic Review and Metaanalysis[END_REF] For liver specialists who manage PSC, the main objectives are to limit the progression of hepatobiliary damage, avoid severe biliary sepsis, detect biliary tract malignancies, and indicate when possible and appropriate liver transplantation. [START_REF] Singh | Primary sclerosing cholangitis: diagnosis, prognosis, and management[END_REF][START_REF] Williamson | Primary sclerosing cholangitis: a clinical update[END_REF][START_REF] Boonstra | Population-based epidemiology, malignancy risk, and outcome of primary sclerosing cholangitis[END_REF] Exposure to thiopurines and anti-TNF has been associated with an excess risk of various cancers [START_REF] Beaugerie | Predicting, Preventing, and Managing Treatment-Related Complications in Patients With Inflammatory Bowel Diseases[END_REF] and serious infections [START_REF] Kirchgesner | Risk of Serious and Opportunistic Infections Associated With Treatment of Inflammatory Bowel Diseases[END_REF] in patients with IBD. From a conceptual point of view, one could fear that thiopurines and/or anti-TNF promote PSC-associated malignancies and/or serious biliary infections. While the risks of the main complications of PSC-IBD have been recently quantified in a nationwide cohort, [START_REF] Trivedi | Effects of Primary Sclerosing Cholangitis on Risks of Cancer and Death in People With Inflammatory Bowel Disease, Based on Sex, Race, and Age[END_REF] little or no data is available on the impact of exposure to thiopurines and/or anti-TNF on the risk of PSC complications. To our knowledge, only the absence of overt excess of cholangiocarcinoma [START_REF] Zenouzi | No Evidence That Azathioprine Increases Risk of Cholangiocarcinoma in Patients With Primary Sclerosing Cholangitis[END_REF][START_REF] Stokkeland | Statin Use Is Associated With Improved Outcomes of Patients With Primary Sclerosing Cholangitis[END_REF] and other PSC main outcomes [START_REF] Stokkeland | Statin Use Is Associated With Improved Outcomes of Patients With Primary Sclerosing Cholangitis[END_REF] has been reported in patients with PSC-IBD exposed to thiopurines.

In this study, we identified in the nationwide French administrative health database patients with PSC-IBD and assessed the impact of exposure to thiopurines and/or anti-TNF on two major outcomes of PSC, namely biliary tract cancer and liver transplantation.

METHODS

Data sources

This cohort study was based on the French National health insurance database (Système National des Données de Santé, SNDS), which covers 95% of the French population with different insurance schemes based on employment situation.

The SNDS provides individual data on all drug reimbursements, medical procedures and outpatient medical care. Additionally, the SNDS includes information on individuals' status with respect to full reimbursement of care for severe long-term diseases (LTD), including CD, UC, and PSC. Using a unique anonymous identifier, outpatient data are linked to the French national hospital discharge database, which provides individual medical information since 2006 on all hospital admissions in France, including discharge diagnoses (International Classification of Diseases, 10th edition [ICD-10]) and medical procedures performed. These databases have been used previously for large pharmacoepidemiological studies. [START_REF] Kirchgesner | Risk of Serious and Opportunistic Infections Associated With Treatment of Inflammatory Bowel Diseases[END_REF][START_REF] Lemaitre | Association Between Use of Thiopurines or Tumor Necrosis Factor Antagonists Alone or in Combination and Risk of Lymphoma in Patients With Inflammatory Bowel Disease[END_REF][START_REF] Kirchgesner | Risk of acute arterial events associated with treatment of inflammatory bowel diseases: nationwide French cohort study[END_REF] This study was approved by the French Data Protection Supervisory Authority (Commission Nationale de l'Informatique et des Libertés, authorisation number 918364).

All data used in this study contained only anonymous patient records. Patient informed consent was not required because the databases were de-identified.

Study population

The source population included all patients aged 18 years and older identified with PSC and IBD before January 1, 2018 based on data from the SNDS. Identification of IBD cases was based on a previously published algorithms, [START_REF] Kirchgesner | Risk of Serious and Opportunistic Infections Associated With Treatment of Inflammatory Bowel Diseases[END_REF][START_REF] Lemaitre | Association Between Use of Thiopurines or Tumor Necrosis Factor Antagonists Alone or in Combination and Risk of Lymphoma in Patients With Inflammatory Bowel Disease[END_REF] and was defined as the obtaining of LTD's status for CD or UC and/or the existence of at least one hospitalisation discharge with a primary or related diagnosis code related to CD or UC. In case of multiple hospitalisations with ICD-10 codes related to UC or CD, the most recent diagnosis at cohort entry was retained. The date of IBD diagnosis was defined as the earliest date between the starting date of the LTD status and the first date of hospitalisation discharge with a primary or related diagnosis related to CD or UC. Patients with a single hospital discharge diagnosis of IBD and no pharmacy claim for any IBD medication (enteral budesonide, aminosalicylates, thiopurines, anti-TNF, vedolizumab, ustekinumab, and tofacitinib) were considered to have an unconfirmed diagnosis of IBD.

Since the ICD-10 code related to PSC (K83.0, cholangitis) is not specific to PSC, and can be attributed to cholangitis unrelated to PSC, we developed a diagnostic algorithm of PSC identification based on four parameters which are potential direct or indirect diagnostic markers of PSC: hospital discharge diagnosis code related to cholangitis (as primary, related, or associated diagnoses); LTD status validation related to PSC; first dispensation of ursodeoxycholic acid (UDCA), a drug that is prescribed on a long-term basis in most patients with PSC in France; occurrence of a liver biopsy. The diagnosis of PSC was retained in presence of at least two of these four parameters; the date of confirmed PSC identification was the date associated with the second parameter of the algorithm in chronological order.

In order to assess the accuracy of our identification algorithm used for selecting patients with PSC, we performed a validation analysis in the high-granularity research/care SUVIMIC Saint-Antoine health database. [START_REF] Baut | A Scoring System to Determine Patients' Risk of Colectomy Within 1 y After Hospital Admission for Acute Severe Ulcerative Colitis[END_REF] Among patients regularly followed in our institution from January 2017 to May 2021, we selected all patients with any clinical, radiological or therapeutic (exposure to ursodeoxycholic acid) feature of PSC, using predefined database items and free text research. We identified patients with no PSC, confirmed PSC, or possible PSC. Among the latter patients, we reviewed exhaustively the medical files in order to arbitrate between confirmed cases of PSC and suspected, but not confirmed, cases of PSC. We assessed the positive predictive value (PPV) (whether patients identified with the developed algorithm had a medically confirmed diagnosis of PSC) and sensitivity (whether patients with a medically confirmed diagnosis of PDC were identified with the developed algorithm), using the French national hospital discharge restricted to Saint-Antoine hospital.

Among patients identified with PSC and IBD in our study, we first excluded patients with hospitalisation codes or LTD status related to primary biliary cholangitis or cystic fibrosis since UDCA can be administered for these two diseases (Supplementary Table 1).

Second, in order to assess only incident events, we excluded patients with history of liver transplantation, biliary tract cancer, or any other cancer except non-melanoma skin cancers (NMSC) prior to entry into the cohort. Third, to improve the specificity of the PSC-IBD cohort, we excluded patients with an unconfirmed diagnosis of IBD.

Follow-up

Patients diagnosed with PSC and IBD before January 1, 2009 were referred to as having prevalent cases of PSC-IBD (Supplementary Figure 1). Patients diagnosed with PSC and IBD between January 1, 2009 and December 31, 2017 accounted for incident cases of PSC-IBD. Patients with incident PSC-IBD were followed-up from the date of the most recent diagnosis between that of PSC and that of IBD. Since immunosuppressants other than thiopurines and anti-TNF may have an impact of the risk of cancer, we censored patients follow-up when a treatment with ustekinumab, vedolizumab, or tofacitinib was initiated. Considering that therapeutic management of PSC-IBD may be different after occurrence of cancer and that liver transplantation may be contra-indicated in this setting, patient follow-up was censored on the date of diagnosis of any cancer, except nonmelanoma skin cancers. Thus, patients were followed up until December 31, 2018; occurrence of liver transplantation; occurrence of any cancer except non-melanoma skin cancer; loss to follow-up or death, whichever occurred first. In case of loss to follow-up (defined as no more contact until December 31, 2018), end of follow-up was the last known contact date, defined by the last claim in the database. In order to minimize the inclusion of prevalent cases of biliary tract cancer or liver transplantation, we considered for each patient a 6-month exclusion period from the date of entry into the observation period (January 1, 2009 for prevalent case, and the date of the most recent diagnosis between that of PSC and that of IBD for incident cases), i.e., we did not take into account cases of biliary tract cancer or liver transplantation that occurred within the 6-month interval after entry into the observation period.

Drug exposure

Exposure to anti-TNF (infliximab, adalimumab, and golimumab) was assessed during follow-up. First day of treatment exposure was defined as the day of first infliximab infusion or treatment delivery. Patients who received infliximab were considered exposed for two months following each infusion; those who received adalimumab, golimumab, or thiopurines were considered exposed for one month following each delivery. Combination therapy was defined as the concomitant exposure of anti-TNF and thiopurines. During follow-up, patients could be exposed successively to different treatment sequences and could therefore contribute to more than one group of drug exposure. We considered that a time interval of up to 6 months may be necessary to confirm the diagnosis of a suspected cancer, or to perform liver transplantation when indicated. Thus, to minimize the risk of falsely attributing an event of interest to a recent change of drug exposure status, exposure time during follow-up started 6 months after treatment initiation and was extended 6 months after treatment switch or withdrawal. The Anatomical Therapeutic Chemical (ATC) codes used to define drug exposures are detailed in Supplementary Table 2.

Outcomes

Study primary outcome was the first incident event among biliary tract cancer and liver transplantation. Biliary tract cancer was defined as the obtaining of LTD's status for biliary tract cancer and/or the existence of at least one hospitalisation with primary ICD-10 discharge code related to biliary tract cancer. Biliary tract cancers included intra and extrahepatic, perihilar forms of cholangiocarcinoma, and gallbladder carcinoma. The date of diagnosis was defined as the earliest diagnosis date between the starting date of the LTD status and discharge date of the first cancer-related hospitalisation. Liver transplantation was defined by procedure codes related to liver transplantation. Some patients may undergo liver transplantation without preoperative suspicion of biliary tract cancer, and be secondarily diagnosed with biliary cancer after histological assessment of liver explant.

The date of the liver transplantation was considered as the date of the two events. The ICD-10 and Classification Commune des Actes Médicaux (CCAM) codes used to define outcomes are detailed in Supplementary Table 3.

Covariates

Time-fixed covariates were measured at cohort entry and included demographic characteristics (age and sex), IBD subtype and comorbidities, IBD duration prior to entry as continuous variable, previous exposure to anti-TNF, thiopurines, methotrexate, and 5aminosalicylates within six months prior to cohort entry, history of IBD-related surgery and hospitalisation, digestive imaging (Ultrasound, magnetic resonance imaging, and CTscan) and endoscopy of the digestive tract within six months prior to cohort entry.

Comorbidities included history of cardiovascular disease, cerebrovascular disease, chronic pulmonary disease, chronic kidney disease, diabetes, cirrhosis and cirrhosis complications (GI bleeding related to portal hypertension, ascites, encephalopathy, and portal vein thrombosis), obesity, alcohol use disorder, and smoking behavior. Timevarying covariates were related to PSC clinical activity and management, and were updated every three months. These covariates included PSC-related hospitalisations, endoscopic/radiological biliary drainages, and chronic liver diseases (including cirrhosis complicated or not, viral, metabolic, autoimmune, toxic hepatitis). The ICD-10, ATC and CCAM codes used to define covariates are detailed in Supplementary Table 4.

Statistical Analyses

Patient characteristics at cohort entry were assessed according to treatment exposure and cumulative incidences of biliary tract cancer and liver transplantation were estimated.

Cumulative incidences were also assessed for colorectal cancer and any cancer occurrence except NMSC.

We used marginal structural Cox proportional hazard models adjusted for the time-fixed and time-varying covariates listed to assess the risks of biliary tract cancer and liver transplantation between associated with exposure to thiopurines and anti-TNF. Marginal structural models are appropriate in the presence of time-dependent covariates (markers of PSC activity including PSC-related hospitalisation, chronic liver diseases or biliary drainage) that might be associated with both exposure and outcomes (time-dependent confounders) and could also be affected by past exposure to thiopurines and anti-TNF.

Weight calculations were performed as suggested by Cole and Hernán. [START_REF] Cole | Constructing inverse probability weights for marginal structural models[END_REF] Detailed statistical method is provided in the supplementary appendix.

Several sensitivity analyses were performed to assess the robustness of the findings: exclusion of patients exposed to thiopurines or anti-TNF prior to entry into the observation period, in order to assess a potential prevalent user bias; 21 exclusion of patients not exposed to UDCA and patients without ICD-10 codes related to PSC, in order to test a more stringent approach of diagnosis of PSC-IBD; exclusion of patients with history of chronic liver diseases at entry (HBV and HCV chronic infection, autoimmune hepatitis, chronic alcoholic liver disease, hemochromatosis) which can lead to liver transplantation or biliary tract cancer; exclusion of patients with a concomitant diagnosis of autoimmune hepatitis which are potentially treated with thiopurines for autoimmune hepatitis and not IBD; inclusion of patients with a history of cancer prior to entry; no censoring of followup at occurrence of non-biliary incident cancers or initiation of a treatment with ustekinumab, vedolizumab, or tofacitinib; setting the length of the exclusion period after entry into the observation period to three months or one year instead of 180 days.

In the SNDS database, causes of death based on death certificate were not comprehensively collected during the study period, so it is impossible to accurately assess liver-related death. To assess the impact of this outcome, we performed a sensitivity analysis by adding the occurrence of death within 3 months after a hospitalization for chronic liver disease to the primary outcome definition.

Analyses were performed using SAS (v9.4) statistical software (SAS Institute).

Results

Characteristics of the study population

Among 305,911 patients diagnosed with IBD up to December 31, 2017, 3031 patients were identified as having PSC, using our identification algorithm. Most patients diagnosed with PSC were identified through exposure to UDCA and hospitalisation with ICD-10 codes related to PSC (Supplementary Table 5).

Among 3807 patients followed in the Saint-Antoine IBD centre between January 2017 and May 2021, we identified using the SUVIMIC database and exhaustive review of medical files of possible cases of PSC, 3667 patients with IBD and no feature of PSC, 117 patients with IBD and confirmed PSC, and 23 patients with IBD and suspected, but not confirmed, PSC. Considering the diagnosis of confirmed PSC as a gold standard, the positive predictive value of the identification algorithm was 100% while the sensitivity was 89.7%.

Among the 3031 patients identified in the SNDS with PSC-IBD, 228 were younger than 18 years at diagnosis, 256 had a history of primary biliary cholangitis or cystic fibrosis,154 had liver transplantation prior to cohort entry, 327 had a history of cancer other than nonmelanoma kin cancer (including 62 cases of biliary tract cancer) prior to cohort entry, and 137 had an unconfirmed diagnosis of IBD (Figure 1). Thus, a total of 1929 patients with PSC-IBD ultimately constituted the study population subjected to follow-up.

Patient characteristics at entry into the observation period according to treatment exposure during follow-up are summarised in Table 1. The mean IBD and PSC disease durations at entry into the observation period were 6.9 years (standard Deviation [SD], 6.8) and 2.2 years (SD, 2.6), respectively. Most patients were males (56.2%) and the mean age of patients at entry was 41.5 years (SD, 15.5). The majority of patients were diagnosed with UC (n=1025, 53.1%), notably among patients unexposed to thiopurines or anti-TNF (n=555, 60.5%). 25.3% and 43.9% of patients had previously been treated with anti-TNF and thiopurines prior to entry into the observation period. 14.4% of patients with PSC-IBD had a cirrhosis at baseline. 114 (5.9%) patients had associated autoimmune hepatitis at entry (Table 1) and 160 (8.3%) patients had a diagnosis of autoimmune hepatitis at any time during the study period.

During follow-up, 673 (34.9%) and 625 (32.4%) patients were exposed to thiopurines or anti-TNF, respectively. Among patients exposed to thiopurines, 68.8% (n=463) had previously been exposed to thiopurines prior to entry into the observation period. Among patients exposed to anti-TNF, 354 (56.6%) had previously been exposed to anti-TNF. A total of 237 (12.3%) patients were exposed to the combination of anti-TNF and thiopurines during the follow-up.

Incidence of biliary tract cancer tract and liver transplantation

Overall, the 1929 patients of the study population were followed for a total period of 9827 person-years (PY). Mean follow-up time was 5.1 (SD, 3.2) years in the total population, 4.7 (SD, 3.3), 5.7 (SD, 2.9), and 5.2 (SD, 3.0), in patients not exposed to thiopurines or anti-TNFs, exposed to thiopurines, and exposed to anti-TNFs during follow-up, respectively. Biliary tract cancer and liver transplantation, as primary outcomes, occurred as the first censoring event in 37 (1.9%) and 83 (4.3%) patients, respectively. In one patient, biliary tract cancer and liver transplantation occurred simultaneously. Thus, 120 events occurred in 119 patients, resulting in an overall incidence rate of 12.1 per 1000 PY. Incidence rates were of 3.8 per 1000 PY and 8.4 per 1000 PY for biliary tract cancers and liver transplantation, respectively. The 10-year cumulative risks of biliary tract and liver transplantation were 4.0% (95% CI, 2.8-5.5) and 8.3% (95% CI, 6.6-10.3), respectively (Figure 2). The overall 10-year risk of biliary tract cancer and/or liver transplantation was 11.8% (95% CI, 9.7-14.1). Incidence rates of biliary tract cancer and/or liver transplantation by drug exposure are provided in Table 2, and cumulative incidences of liver transplantation or biliary tract cancer by exposure group are provided in Supplementary Figure 2. Patient characteristics according to outcome occurrence during follow-up are provided in Table 3.

Incidence of colorectal cancer or any cancer, except NMSC

Among the 1929 patients of the study population, 35 (1.8%) developed colorectal cancer as first incident cancer, resulting in an incidence rate of 3.6 per 1000 PY. The 10-year cumulative risk of colorectal cancer was 3.1% (95% CI, 2.1-4.4). Sixty-one (3.2%) patients developed any cancer except NMSC as first censoring event, resulting in an overall incidence rate of 8.2 per 1000 PY. The 10-year cumulative risk of developing any cancer except NMSC was 5.9 % (95% CI, 4.4-7.7).

Risk of biliary tract cancer and liver transplantation according to drug exposure

Compared with patients unexposed to thiopurines and anti-TNF, patients exposed to thiopurines were not at excess risk of biliary tract cancer (hazard ratio [HR], 1.05; 95% confidence interval [CI], 0.39-2.82) and liver transplantation (HR, 0.67; 95% CI, 0.30-1.48). Compared with patients unexposed to thiopurines and anti-TNF, patients exposed to anti-TNF were not at excess risk of biliary tract cancer (HR: 0.59 95% CI, 0.13-2.80) and liver transplantation (HR: 0.68, 95% CI, 0.22-2.09). Results were similar (Figure 3) regarding; the combined risk of biliary tract cancer and/or liver transplantation, both in patients exposed to thiopurines and to anti-TNF; the risk of biliary tract cancer and/or liver transplantation in patients exposed to combination therapy of thiopurines and anti-TNF.

HRs were not substantially changed (Table 4) in the different sensitivity analyses. Adding the occurrence of death within 3 months after a hospitalization for chronic liver disease to the primary outcome definition, did not impact the main findings (HR: 0.68 95% CI, 0.36-1.31, HR: 0.59, 95% CI, 0.24-1.45, HR: 0.41 95% CI, 0.12-1.35, in patients exposed to thiopurines, anti-TNFs, and combination therapy, respectively)

DISCUSSION

Based on a large population-based nationwide cohort of patients with PSC-IBD, our findings suggest that the exposure to thiopurines and/or anti-TNF has no deleterious impact on the risk of biliary tract cancer and liver transplantation.

Patients with IBD exposed to thiopurines exhibit an excess risk of various hematological malignancies, urinary tract cancers and non-melanoma skin cancers. [START_REF] Beaugerie | Predicting, Preventing, and Managing Treatment-Related Complications in Patients With Inflammatory Bowel Diseases[END_REF] Patients with PSC are at high risk of cholangiocarcinoma and gallbladder cancer compared with age and gender-matched controls from the general population. [START_REF] Trivedi | Effects of Primary Sclerosing Cholangitis on Risks of Cancer and Death in People With Inflammatory Bowel Disease, Based on Sex, Race, and Age[END_REF] In a retrospective study by Zenouzi et al. from three tertiary care centers, there was no evidence that exposure to azathioprine further increases the risk of cholangiocarcinoma in patients with PSC. [START_REF] Zenouzi | No Evidence That Azathioprine Increases Risk of Cholangiocarcinoma in Patients With Primary Sclerosing Cholangitis[END_REF] We confirm this result in our study that differs in some points from the previous one: our study was population-based, featured a total number of person-years almost doubled, and results were adjusted for time-fixed and time-varying covariates.

Patients with IBD exposed to anti-TNF are at mild excess risk of melanomas. [START_REF] Long | Risk of melanoma and nonmelanoma skin cancer among patients with inflammatory bowel disease[END_REF] Whether ant-TNFs promote other types of cancers is still a matter of debate, especially with regard to lymphomas. [START_REF] Lemaitre | Association Between Use of Thiopurines or Tumor Necrosis Factor Antagonists Alone or in Combination and Risk of Lymphoma in Patients With Inflammatory Bowel Disease[END_REF][START_REF] Andersen | Association between tumor necrosis factor-α antagonists and risk of cancer in patients with inflammatory bowel disease[END_REF] To our knowledge, the impact of anti-TNF on the risk of biliary tract cancer has not been specifically studied to date. Our study provides a first reassuring signal in this field.

Patients with an association of autoimmune hepatitis and PSC should be considered separately in terms of natural history and propensity to receive thiopurines. Major trends of the study were not affected in a sensitivity analysis that excluded patients with a concomitant diagnosis of autoimmune hepatitis.

In patients with IBD, chronic inflammation of the digestive tract is considered as an independent driver of the risk of colorectal cancer, small bowel adenocarcinoma and anal cancers. [START_REF] Beaugerie | Cancers Complicating Inflammatory Bowel Disease[END_REF][START_REF] Greuter | Malignancies in Inflammatory Bowel Disease[END_REF] Thiopurines and anti-TNF can reduce the inflammation in intestinal segments that are affected by IBD, which can in turn reduce the risk of inflammation-related cancers.

This chemopreventive effect of immune-suppressive drugs in the risk of colorectal has been suggested in patients with UC for thiopurines in two nationwide cohorts. [START_REF] Beaugerie | Risk of colorectal high-grade dysplasia and cancer in a prospective observational cohort of patients with inflammatory bowel disease[END_REF][START_REF] Gordillo | Thiopurine Therapy Reduces the Incidence of Colorectal Neoplasia in Patients with Ulcerative Colitis. Data from the ENEIDA Registry[END_REF] In our study, we did not observe a reduced risk of biliary tract cancer in patients with PSC-IBD exposed to thiopurines and/or anti-TNF. This absence of chemopreventive effect of thiopurines and anti-TNF is consistent with the lack of definite proof of efficacy of thiopurines and anti-TNF on chronic inflammatory lesions of PSC, [START_REF] Schramm | Combined therapy with azathioprine, prednisolone, and ursodiol in patients with primary sclerosing cholangitis. A case series[END_REF][START_REF] Hommes | A double-blind, placebo-controlled, randomized study of infliximab in primary sclerosing cholangitis[END_REF] despite the fact that a decreased risk of death or liver transplantation has been suggested in a recent Swedish population-based cohort. [START_REF] Stokkeland | Statin Use Is Associated With Improved Outcomes of Patients With Primary Sclerosing Cholangitis[END_REF] Exposure to thiopurines and anti-TNF had no obvious impact on the time of liver transplantation in patients with PSC-IBD. Thiopurines and anti-TNF promote all types of serious infections. [START_REF] Kirchgesner | Risk of Serious and Opportunistic Infections Associated With Treatment of Inflammatory Bowel Diseases[END_REF] From a conceptual point of view, we could therefore have hypothesised that thiopurines and anti-TNF promote repeated infections of the bile ducts, this leading to a more rapid progression of biliary and liver lesions, and therefore to an earlier indication of liver transplantation. Conversely, the need for liver transplantation could have been reduced if thiopurines and anti-TNF had had an established slowing effect on the progression of biliary and liver lesions in PSC. But, as mentioned above, this impact has not been fully demonstrated to date. [START_REF] Stokkeland | Statin Use Is Associated With Improved Outcomes of Patients With Primary Sclerosing Cholangitis[END_REF][START_REF] Schramm | Combined therapy with azathioprine, prednisolone, and ursodiol in patients with primary sclerosing cholangitis. A case series[END_REF][START_REF] Hommes | A double-blind, placebo-controlled, randomized study of infliximab in primary sclerosing cholangitis[END_REF] Our study has several strengths. The primary strength of our study is its nationwide, population-based cohort design. The database is comprehensive in that it includes all medical prescriptions and hospital stays for PSC-IBD in France. Patients are unselected because universal access to health care is guaranteed for all French residents, and there is no other universal insurance scheme in France. This design increases the generalizability of the findings reported, while the majority of studies assessing the clinical course of PSC are based on tertiary care centers. It is the first observational study that evaluates the risk of exposure to main immunosuppressive IBD-drugs, notably anti-TNF, on poor PSC outcomes. Analyses were adjusted for a variety of confounding factors including co-treatment exposure, comorbidities, IBD and PSC disease severity. Lastly, these findings were consistent across several sensitivity analyses.

The main potential limitation of our study was the use a specifically-designed classification algorithm for identifying patients with PSC, given the fact that the ICD code available in the SNDS does not distinguish between PSC and other causes of cholangitis. However, we were able to validate our algorithm in a phenotyped-in-depth tertiary care IBD population. All patients identified with PSC using the algorithm had a medically confirmed diagnosis of PSC, and the vast majority of patients with IBD and PSC were correctly selected. This may explain why the proportion of patients with IBD who were identified with PSC in our cohort was similar or slightly lower than that reported in nationwide studies, [START_REF] Trivedi | Effects of Primary Sclerosing Cholangitis on Risks of Cancer and Death in People With Inflammatory Bowel Disease, Based on Sex, Race, and Age[END_REF][START_REF] Guerra | Clinical Characteristics, Associated Malignancies and Management of Primary Sclerosing Cholangitis in Inflammatory Bowel Disease Patients: A Multicentre Retrospective Cohort Study[END_REF] or in a recent meta-analysis. [START_REF] Barberio | Prevalence of Primary Sclerosing Cholangitis in Patients With Inflammatory Bowel Disease: A Systematic Review and Meta-analysis[END_REF] Nevertheless, future studies will benefit from the recently introduced ICD-11 code for PSC (K83.01) to overcome these limitations.

We acknowledge, however, some other limitations. First, baseline adjustment for IBD activity and time-dependent adjustment for PCS activity were not based on continuous recording of disease activity, but to indirect markers of activity, including hospitalisations/diagnostic procedures for disease flares and disease complications. Second, we were not able to adjust our multivariate analysis for the suspected inverse relation between clinical and anatomical severity of intestinal and biliary disease. [START_REF] Marelli | Does the severity of primary sclerosing cholangitis influence the clinical course of associated ulcerative colitis?[END_REF] However, we included the IBD subtype and baseline IBD disease activity in the analysis, in order to adjust for the fact that the need for liver transplantation has been suggested to be lower in Crohn's disease than in ulcerative colitis, [START_REF] Fevery | Patients with large-duct primary sclerosing cholangitis and Crohn's disease have a better outcome than those with ulcerative colitis, or without IBD[END_REF] while patients with Crohn's disease are more exposed to immunosuppressants. Finally, we must emphasize the limited power of our study, resulting in wide confidence intervals of the HR. We had 80% power to rule out a theoretical 1.7-fold increase of biliary tract cancer or liver transplantation in patients either exposed to thiopurines or anti-TNFs, while a total number of 32 000 PY would have been necessary to rule out with a beta risk of 20% a 1.2-fold increase of the risk of biliary tract cancer or liver transplantation in patients either exposed to thiopurines or anti-TNFs.

Therefore, caution should be made in the interpretation of results, especially in patients exposed to combination of thiopurines and anti-TNF, given the limited subgroup size.

The incidence of liver transplantation, although lower than that observed in studies restricted to tertiary care centers, 3 was of the same extent as that reported in a recent nationwide English cohort. [START_REF] Trivedi | Effects of Primary Sclerosing Cholangitis on Risks of Cancer and Death in People With Inflammatory Bowel Disease, Based on Sex, Race, and Age[END_REF] By contrast, in our study, the incidence of biliary tract was substantially lower than in the English cohort. This discrepancy can be attributed to the fact that up to one third of biliary tract cancers are diagnosed within the first year following the diagnosis of PSC, while in our cohort: mean duration of PSC at entry into the observation period was two years; biliary tract cancers that occurred before entry were excluded; cancers that occurred within the 6 first months of the observation period were not taken into account.

In summary, our study suggests that the exposure to thiopurines and/or anti-TNF has no deleterious impact on the risk of biliary tract cancer and liver transplantation in patients with PSC-IBD. Although these results must be replicated in an independent cohort, we provide a first reassuring signal for physicians who were hesitating to treat on a long-term 7.4 (6.9) 5.6 (6.4) 6.9 (6.5) 6.9 (6.8) Mean PSC duration, y, mean (SD) 2.5 (2.9) 1.9 (2.

  Abbreviations used in this paper:

FigureFigure 1 .

 1 Figure

Figure 2 .

 2 Figure 2. Cumulative incidence of biliary tract cancers and/or liver transplantation as first

Figure 3 .

 3 Figure 3. Multivariable adjusted Hazard ratios (HR) for biliary tract cancer and/or liver

Table 1 . Patient characteristics at entry into the observation period according to drug exposure during follow-up.

 1

	Unexposed to	Exposed to	Exposed to
	thiopurines and anti-	thiopurines a	Anti-TNF a	All a
	TNF during follow-up	during follow-up	during follow-up	(n = 1929)
	(n = 918)	(n = 673)	(n = 625)

  Patients exposed to combination of anti-TNF and thiopurines at any time during the follow-up were included both in the group of patients exposed to anti-TNF and in the group of patients exposed to thiopurines. b Free access to health care for all French people whose annual income is less than half the poverty line.

			3)	1.8 (2.3)	2.2 (2.6)
	IBD subtype
	Crohn disease, n (%)	363 (39.5)	339 (50.4)	356 (57.0)	904 (46.9)
	Ulcerative colitis, n (%)	555 (60.5)	334 (49.6)	269 (43.0)	1025 (53.1)
	IBD treatment c , n (%)
	Anti-TNF	113 (12.3)	150 (22.3)	354 (56.6)	489 (25.3)
	Thiopurines	199 (21.7)	463 (68.8)	384 (61.4)	846 (43.9)
	Methotrexate	61 (6.6)	17 (2.5)	70 (11.2)	142 (7.4)
	Aminosalicylates	764 (83.2)	447 (66.4)	437 (69.9)	1458 (75.6)
	Hospitalisations c , n (%)
	IBD-related hospitalisation	144 (15.7)	159 (23.6)	190 (30.4)	401 (20.8)
	IBD-related surgery	89 (9.7)	79 (11.7)	109 (17.4)	230 (11.9)
	Hospitalisation not related to IBD, n (%)	315 (34.3)	234 (34.8)	206 (33.0)	667 (34.6)
	IBD disease activity assessment c , n (%)
	Endoscopy of the digestive tract	547 (59.6)	402 (59.7)	382 (61.1)	1155 (59.9)
	Imaging exams of the digestive tract d	568 (61.9)	428 (63.6)	397 (63.5)	1206 (62.5)
	Complications related to PSC e , n (%)
	Hospitalisations related to PSC	225 (24.5)	145 (21.5)	105 (16.8)	422 (21.9)
	Cirrhosis	127 (13.8)	97 (14.4)	89 (14.2)	277 (14.4)
	Complications of cirrhosis f	61 (6.6)	36 (5.3)	38 (6.1)	122 (6.3)
	Comorbidities, n (%)
	Chronic Liver disease	177 (19.3)	184 (27.3)	131 (21.0)	431 (22.3)
	Autoimmune hepatitis	32 (3.5)	73 (10.8)	27 (4.3)	114 (5.9)
	Cardiovascular disease	113 (12.3)	56 (8.3)	66 (10.6)	217 (11.2)
	Cerebrovascular disease	19 (2.1)	6 (0.9)	11 (1.8)	36 (1.9)
	Peripheral vascular disease	17 (1.9)	15 (2.2)	12 (1.9)	40 (2.1)
	Chronic pulmonary disease	200 (21.8)	125 (18.6)	129 (20.6)	411 (21.3)
	Chronic kidney disease	17 (1.9)	11 (1.6)	9 (1.4)	33 (1.7)
	Inflammatory Rheumatism	49 (5.3)	38 (5.6)	88 (14.1)	156 (8.1)
	Venous thromboembolism disease	36 (3.9)	25 (3.7)	28 (4.5)	77 (4.0)
	Hypertension	246 (26.8)	136 (20.2)	139 (22.2)	476 (24.7)
	Diabetes	90 (9.8)	64 (9.5)	54 (8.6)	190 (9.8)
	Dyslipidemia	195 (21.2)	131 (19.5)	126 (20.2)	396 (20.5)
	Alcohol use disorder	39 (4.2)	22 (3.3)	28 (4.5)	78 (4.0)
	Smoking behavior	43 (4.7)	44 (6.5)	63 (10.1)	129 (6.7)
	Obesity	70 (7.6)	52 (7.7)	56 (9.0)	158 (8.2)
	Abbreviations: SD, standard deviation; IBD, inflammatory bowel disease; PSC, primary sclerosing cholangitis.

a c Within 6 months prior to entry into the observation period. d Ultrasound, magnetic resonance imaging, CT-scan. e At any time between PSC diagnosis and entry into the observation period. f GI bleeding related to portal hypertension, ascites, encephalopathy, and portal vein thrombosis

Table 2 . Incidence rates of biliary tract cancer and/or liver transplantation according to drug exposure.

 2 patients exposed to combination of anti-TNF and thiopurines at any time during the follow-up were included both in the group of patients exposed to anti-TNF and in the group of patients exposed to thiopurines.

			All (9,827 PY)	Unexposed to thiopurines and anti-TNF during follow-up (6,223 PY)	Exposed to thiopurines a during follow-up (2,022 PY)	Exposed to Anti-TNF a during follow-up (2,015 PY)
		Events	IR b (95% CI)	Events	IR b (95% CI)	Events	IR b (95% CI)	Events	IR b (95% CI)
	Biliary tract
	cancer and/or liver	119	12.1 (10.1-14.5)	89	14.3 (11.6-17.6)	21	10.4 (6.8-15.9)	10	5.0 (2.7-9.2)
	transplantation
	Biliary tract cancer	37	3.8 (2.7-5.2)	30	4.8 (3.4-6.9)	4	2.0 (0.7-5.3)	3	1.5 (0.5-4.6)
	Liver transplantation	83	8.4 (6.8-10.5)	60	9.6 (7.5-12.4)	17	8.4 (5.2-13.5)	7	3.5 (1.6-7.3)
	Values are n (incidence rate/1000 person-years). Abbreviations: PY, person-years.

a b Incidence rates per 1000 person-years Abbreviations: PY, person-years; TNF, Tumor Necrosis Factor

Table 3 . Patient characteristics at entry into the observation period according to outcome occurrence during follow-up.

 3 Free access to health care for all French people whose annual income is less than half the poverty line.

	Absence of biliary tract	Biliary tract cancer tract
	cancer tract and liver	or liver transplantation	All
	transplantation	occurrence	(n = 1929)
	(n = 1810)	(n = 119)

a b Within 6 months prior to entry into the observation period. c Ultrasound, magnetic resonance imaging, CT-scan. d At any time between PSC diagnosis and entry into the observation period. e GI bleeding related to portal hypertension, ascites, encephalopathy, and portal vein thrombosis

Table 4 . Sensitivity analyses: multivariable adjusted Hazard ratios (HR) for biliary tract cancer and/or liver transplantation according to treatment exposure between patients exposed to thiopurines and/or anti-TNF and patients unexposed to thiopurines and anti-TNF.

 4

	Risk of biliary tract cancer HR (95% CI)	Risk of liver transplantation HR (95% CI)	Risk of biliary tract cancer liver and/or liver transplantation HR (95% CI)

Abbreviations: CI, confidence interval; TNF, tumor necrosis factor; UDCA, ursodeoxycholic acid. a No event occurred in the active treatment group

Olivier Chazouillères received grant support from Aptalis and Arrow, consulting fees from Genfit, PeptiMimesis Pharma and Pliant Therapeutics and fees for teaching and consulting from Intercept. Julien Kirchgesner received lecture fees from Pfizer and consulting fees from Roche, Pfizer, and Gilead. Amélie Biron discloses no conflicts. This work was not supported by dedicated funding. AB, LB. AB: Conceptualization (Equal), Formal analysis (Equal), Writingoriginal draft (Equal); LB: Conceptualization (Equal), Formal analysis (Equal), Methodology (Supporting), Writingoriginal draft (Equal); OC: Conceptualization (Supporting), Formal analysis (Supporting), Methodology (Supporting), Writingreview & editing (Supporting); JK: Conceptualization (Equal), Formal analysis (Lead), Methodology (Lead), Supervision (Lead), Writingoriginal draft (Supporting).

basis IBD with thiopurines and/or anti-TNF patients with PSC-IBD, for fear of increasing the risk of biliary cancer and severe hepatobiliary damage.

Supplementary material

Appendix: Methods (page 2) Supplementary Table 1 -Codes used to define exclusion criteria (page 3) Supplementary

Appendix: Methods

The conditional probability of receiving observed treatment was estimated using binomial logistic regression. Weights from the exposure selection model were calculated as follows: the numerator was the probability of receiving the treatment actually received after treatment modification conditional on baseline covariates and past treatment history. The denominator was the predicted probability of receiving the treatment actually received after treatment modification conditional on baseline covariates, past treatment history and time-varying covariates. To account for selective loss to follow-up, we similarly modeled the propensity to be censored. Binary logistic regression was used for the censoring model. The stabilized weights were the product of the weights from the exposure selection and the censoring models, updated at each treatment modification. After calculation, the weights were truncated at 5th and 95th percentiles to minimize the impact of extreme weights and improve precision. 1,2 The outcome model was adjusted for baseline covariates. An interaction term between anti-TNF and thiopurines exposure was introduced in the outcome model. 3 Robust variance estimators were used to estimate conservative 95% confidence intervals.

Supplementary


Lionel Truquet

A nonparametric resampling for non causal random fields and its application to the texture synthesis

 for texture synthesis and we also use their multiscale synthesis algorithm incorporating local annealing. We discuss some statistical properties and theoretical points for the convergence of the procedure and provide several convincing simulation examples.

Introduction

Over the two last decades, there was a particular attention to study the problem of texture synthesis. The goal of texture synthesis can be stated as follows: Given a texture sample, synthesize a new texture that appears similar to a human observer. Texture mapping or image compression are frequent applications for such algorithms. The stochastic nature of texture variations makes it a particularly natural area for applying statistical methods. The pioneer work of [START_REF] Cross | Markov random field texture models[END_REF] [START_REF] Cross | Markov random field texture models[END_REF] have shown the ability of Markov random fields to model a homogeneous texture. Such parametric models have been used for texture synthesis (as in [START_REF] Popat | Novel cluster-based probability model for texture synthesis, classification, and compression[END_REF]), but they require the estimation of a high number of parameters for capturing the complexity of real textures, which leads to computational difficulties. On the other hand, some algorithms model textures as a set of features, and generate new images by matching the features in an example texture ( [START_REF] Dehardt | Generalizations of the Glivenko-Cantelli theorem[END_REF], [START_REF] Heeger | Pyramid-based texture analysis/synthesis[END_REF], [START_REF] Simoncelli | Texture characterization via joint statistics of wavelet coefficient magnitudes[END_REF]). Those methods work very well for stochastic textures but have sometimes difficulties with highly structured ones. Significant advances have been done in the area of texture synthesis using nonparametric algorithms with Markov random fields. A popular algorithm has been introduced by Efros and Leung (1999) [START_REF] Efros | Texture synthesis by non-parametric sampling[END_REF]. Many variations of their method have been published that speed up and optimize the original algorithm in different ways in [START_REF] Wei | Fast texture synthesis using tree-structured vector quantization[END_REF] [START_REF] Wei | Fast texture synthesis using tree-structured vector quantization[END_REF], [START_REF] Efros | Image quilting for texture synthesis and transfer[END_REF] [START_REF] Efros | Image quilting for texture synthesis and transfer[END_REF] and [START_REF] Liang | Real-time texture synthesis by patchbased sampling[END_REF] [START_REF] Liang | Real-time texture synthesis by patchbased sampling[END_REF] among others. The main statistical idea behind those algorithms is to consider the observed texture as a realization of a strictly stationary MRF. The data are used to construct an estimate of a local conditional distribution function of the field and a new texture is synthetized with a simulation procedure. Typically, the synthesis starts using a seed and pixels are synthetized in a given order by a recursive simulation of the random field as for time series. Intrinsically, those simulation procedures suppose the causality nature of the observed stochastic process. At a first sight this dependence form seems unnatural but the above algorithms work well on a wide variety of textures which seem well approximated by such random fields. On the other hand, some noncausal procedures have been investigated. The FRAME model introduced by Zhu, Wu and Mumford [START_REF] Zhu | Filters, random fields and maximum entropy (FRAME)-toward a unified theory for texture modeling[END_REF] combine noncausal MRF models and feature matching. This last model has a mathematical justification: maximum entropy with empirical histograms of a finite number of filter responses are used to derive a parametric MRF for the whole distribution of the texture. Despite its solid statistical modeling, FRAME models does not work always very well on real textures. Paget and Longstaff (1998) [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF] have considered another algorithm, with a nonparametric noncausal MRF. Contrarily to [START_REF] Zhu | Filters, random fields and maximum entropy (FRAME)-toward a unified theory for texture modeling[END_REF], the random field is specified through the conditional distribution and the empirical histogram is smoothed with a kernel which allows a simulation procedure with the Gibbs sampler. To avoid long relaxation time and phase discontinuities, Paget and Longstaff have used multiscale grids and have incorporated a temperature parameter for the pixels and the resulting algorithm is shown to be able to synthetize stochastic textures but also highly structured ones. Except the work of Zhu et al. [START_REF] Zhu | Filters, random fields and maximum entropy (FRAME)-toward a unified theory for texture modeling[END_REF], not many theoretical works have been developed to study the consistency of such procedures. To our knowledge, the only contribution is the work of Bickel et Levina [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] who define a formal bootstrap scheme for resampling stationary (causal) random fields which gives a theoretical justification to the algorithm of Efros and Leung [START_REF] Efros | Texture synthesis by non-parametric sampling[END_REF]. The goal of this paper is to extend the method of Bickel and Levina to noncausal random fields for modeling textures as in [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF]. Of course, the use of the Gibbs sampler leads to long computational times and this gives a clear advantage to causal algorithms. However, from a theoretical point of view, the class of noncausal Markov random fields is known to be wider than the class of causal fields and in fact only a noncausal field has a real physical sense. In [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF], the authors study a nonparametric estimation of the local conditional distribution function associated to the random field which is used to simulate an approximate causal field. This method is an extension to random fields of a p-order Markov bootstrap algorithm for time series [START_REF] Paparoditis | The local bootstrap for Markov processes[END_REF]. We will use the same nonparametric estimation of a conditional law and we will use the multiscale synthesis algorithm given in [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF] to give simulation examples. The paper is organized as follows. In the following Section 2, we recall the results of Bickel et Levina and provide the natural extension of their method to the noncausal case. Some considerations on the convergence and the convergence rate of such algorithm are also provided. Section 3 is devoted to recall the multiscale algorithm used by Paget and Longstaff and we incorporate our bootstrap method to provide several simulation examples. Theoretical investigations are postponed to the two last sections of the paper.

The Markov Mesh Models algorithm 2.1 Principle

We first recall the Markov Mesh Models (MMM in sequel) algorithm introduced by Bickel and Levina [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF]. This algorithm is different of the original algorithm of Efros and Leung [START_REF] Efros | Texture synthesis by non-parametric sampling[END_REF] by the order in which pixels are filled in the synthesized texture (raster instead of spiral), and the weights with which the pixels are resampled. One can note that the raster order is used in some variations of the original algorithm (see [START_REF] Wei | Fast texture synthesis using tree-structured vector quantization[END_REF] and [START_REF] Liang | Real-time texture synthesis by patchbased sampling[END_REF]).

In all the sequel we consider {X t , t ∈ N * × N * } a real-valued random field and a positive integer o ∈ N * . We will use the following notations:

• for A ⊂ N * × N * , X A denote the family (X t ) t∈A ; • for A, B ⊂ N * ×N * , A+B = {t A +t B , (t A , t B ) ∈ A×B} and A-B = {t A -t B , (t A , t B ) ∈ A×B}. For t = (t 1 , t 2 ) ∈ N * × N * and s ∈ N * × N * , define the index sets • U (o) t = u = (u 1 , u 2 ) ∈ N * × N * ; max(1, t 1 -o) ≤ u 1 ≤ t 1 , max(1, t 2 -o) ≤ u 2 ≤ t 2 and u = t ; • U (o) t (s) = U (o) t -{t} + {s}; • W t = {1, . . . , t 1 } × {1, . . . , t 2 } \ {t}.

The set U

(o) t is always included in the square of size (o + 1) × (o + 1) with t as the bottom right corner, t itself excluded, but there are (o + 1) 2 -1 possible shapes of

U (o) t . Then, Definition 1 A random field X = {X t , t ∈ N * × N * } is a Markov mesh model if there exists o ∈ N * such that for all t ∈ N * × N * , P (X t /X Wt ) = P X t /X U (o) t .
(2.1)

Now, the MMM resampling algorithm of Bickel and Levina [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] can be presented. First assume that a trajectory of a MMM X is observed on the index set {1, . .

W ( ) b (y) = b -W ( ) (y/b) for all y ∈ R .
In the sequel, for simplicity, we will omit the exponent o and for respectively U

(o) t , U (o)
t (s) and W

( ) b .

The MMM resampling algorithm

In the sequel we will denote X * = {X * t , t ∈ N * ×N * } the generated texture from (X t , t ∈ {1, . . . , T 1 }× {1 . . . , T 2 }). There are 3 main steps in this algorithm:

1. Select a starting value for {X * t : 1 ≤ t 1 ≤ o + 1, 1 ≤ t 2 ≤ o + 1}, the top left (o + 1) × (o + 1) square. Typically the starting value will be a (o + 1) × (o + 1) square random chosen from the observed field (X t , t ∈ {1, . . . , T 1 } × {1 . . . , T 2 }).

2. Suppose that there exists (u, v) ∈ N * × N * such that X * t has been generated for t ∈ {1, . . . , u -1} × {1, . . . , v} ∪ {u} × {1, . . . , v -1}, that is, u -1 rows are filled in completely, and the row u is filled up for the column v. To generate the next value X * t = X * (u,v) , let N t be a discrete random variable with probability distribution

P(N t = s) = 1 Z W b X * Ut -X Ut(s)
for all s ∈ N * ×N * such that U t (s) ⊂ {1, . . . , T 1 }×{1 . . . , T 2 } and where

Z = s W b (Y * t -Y t (s)
) is a normalizing constant. Note that the set of all possible s is such that all locations where the conditioning neighborhood fits within the observed texture field.

Generate N t and set

X * t = X * (u,v) = X Nt .
In Figure 1, we show two steps in the progress of the MMM algorithm, just after the choice of the seed (step 1 above) and when the neighborhood of the pixel is full (see the center of the picture in Figure 1). In Figure 2, we illustrate the difference with the original algorithm of Efros and Leung.

Here, the seed is put in the center of the new texture and the synthesis is done with a spiral ordering.

To synthesize a pixel at a site t, one considers only the value of pixels already synthesized in a given square window centered at t. Another difference with the MMM algorithm is the choice of uniform weights for the synthesis (see [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] for details). The MMM algorithm is formulated for a particular class of random fields, the Markov Mesh Models (also known as Picard random fields) which were introduced by Abend, Harley and Kanal [START_REF] Abend | Classification of binary random patterns IEEE Trans[END_REF]. These models have been developed for image applications and can be simulated recursively an quickly. The resampling scheme described above is an adaption of a method proposed for bootstrapping Markovian time series ( [START_REF] Rajarshi | Bootstrap in Markov sequences based on estimates of transition density[END_REF], [START_REF] Paparoditis | The local bootstrap for Markov processes[END_REF]).

Consistency results for causal models

First, let us introduce new notations:

• for A ⊂ Z 2 , |A| is the cardinal of A. • for x = (x 1 , x 2 ) ∈ Z 2 , x ∞ = max(|x 1 | , |x 2 |). • for A, B ⊂ Z 2 , d(A, B) = inf x∈A,y∈B { x -y ∞ }.
• for y ∈ R with ∈ N * , y is the usual Euclidian norm.

• for T = (T 1 , T 2 ) ∈ N * × N * , let [T ] = T 1 T 2 and T → ∞ means T 1 ∧ T 2 → ∞. Let A ∈ Z 2 such that |A| < ∞. For t ∈ Z 2 , define Y t = (X t+j ) j∈A .
Moreover we define the following subsets of N * × N * :

I T = t ∈ {1, . . . , T 1 } × {1 . . . , T 2 }, {t} -A ⊂ {1, . . . , T 1 } × {1 . . . , T 2 } .
To show the consistency of their algorithm, Bickel et Levina have proved a general lemma about the estimation of the local conditional distribution function

F X/Y (x/y) = P(X t ≤ x/Y t = y)
(see Theorem 2 in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF]). We first recall this theorem and its assumptions.

Assumptions of Theorem 2 in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] (A1) The random field X is strictly stationary and α-mixing, i.e.

if for k, u, v ∈ N * , α X (k, u, v) = sup E,F ∈Z 2 ,d(E,F )=k,|E|=u,|F |=v |P (AB) -P (A)P (B)|, A ∈ σ(X E ), B ∈ σ(X F )
are the strong mixing coefficients such that there exist > 0, τ > 2 satisfying for all integers u, v ≥ 2, u + v ≤ c, where c is the smallest even integer such that c ≥ τ ,

∞ k=1 (k + 1) 2(c-u+1)-1 α X (k, u, v) /(c+ ) < ∞. (A2) X t has a compact support S ⊂ R. (A3) F X,Y = P (X t ≤ •, Y t ≤ •), F X/Y and F Y = P (Y t ≤ •) have bounded continuous strictly pos- itive densities (denoted f X,Y , f X/Y
and f Y respectively) with respect to Lebesgue measure. Moreover, there exists L > 0 such that for any y, y ∈ S A , any x ∈ S,

x -∞ f X,Y (z, y)dz - x -∞ f X,Y (z, y )dz ≤ L y -y .
(A4) The family of kernels (W ( ) ) ∈N * is such that W ( ) : R → (0, ∞) are bounded, symmetric and first-order Lipshitz continuous functions such that for all ∈ N * ,

u W ( ) (u)dλ (u) = 0 and u W ( ) (u)dλ (u) < ∞.
Moreover, the width of W

( ) b is supposed to be such that b = b T = O([T ] -δ ), with δ > 0.
To show the consistency of the MMM resampling algorithm, Bickel and Levina have established the convergence of the following sample cumulative conditional distribution function, that is, for (x, y) ∈ S × S A and T ∈ N * × N * such that I T = ∅:

F T (x/y) = 1 Z T s∈I T 1 1 Xs≤x W b T (y -Y s ) , (2.2)
where

Z T = s∈I T W b T (y -Y s ). Theorem 1 (Theorem 2 [5]) If X is a MMM satisfying assumptions (A1) -(A4), then for all A ∈ Z 2 such that |A| < ∞, sup (x,y)∈S×S A F T (x/y) -F X/Y (x/y) → T →∞ 0.
Theorem 1 shows the uniform convergence of the conditional distribution of a pixel given its neighborhood. Using this general result with neighborhoods A of causal nature (e.g. A = U t -{t}), Bickel and Levina show the consistency of their MMM algorithm and also of the original spiral resampling algorithm of Efros and Leung. Their proof use the conditional independence properties of the MMM which allow a recursive computation of the joint laws (we refer to Theorem 1 in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] for details). This resampling scheme uses the kernel regression estimation and requires some regularity assumptions (see Assumptions (A1-4)). As it is pointed in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF], those assumptions are perfectly plausible for most real textures: the mixing property is natural for stochastic textures, the compactness assumption is always satisfied since the number of gray levels is finite, and this number is sufficiently high in most of real textures to make the smoothness assumptions plausible. However causal MMM are not really an appropriated for modeling texture: indeed, Why to choose a certain direction as for the dependence of the field? It is more natural to consider a spatial model for which there are no privileged direction for the dependence, i.e. a noncausal random field.

An extension to the noncausal case and a convergence rate of Theorem 1

To extend the previous results of [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] to noncausal fields, consider the following neighborhood

N o where o ∈ N * N o = {j ∈ Z 2 /0 < j ∞ ≤ o}. Thus {t} + N o is the natural extension of the set U (o) t in the noncausal case. Denote v = |N o | = (2o + 1) 2 -1.
The MMM is a very particular case of Markov random fields.

If X = {X t , t ∈ Z 2 } is a R-valued random field, then: Definition 2 X = {X t , t ∈ Z 2 } is a Markov random field if there exists o ∈ N * such that for all t ∈ Z 2 , P X t /X Z 2 \{t} = P (X t /X t+No ) . (2.3)
We will again assume that (X t , t ∈ {1, . . . , T 1 } × {1 . . . , T 2 }) is known. Then, for all t ∈ Z 2 , define now:

Y t = (X t+j ) j∈No = X t+No .
First, a convergence rate for the Theorem 2 of [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] can be established and it is also satisfied in the noncausal case:

Theorem 2 If X is a is a noncausal Markov random field satisfying assumptions (A1 -4), then for all A ∈ Z 2 such that |A| < ∞, sup (x,y)∈S×S No F T (x/y) -F X/Y (x/y) = O [T ] -γ a.s where 0 < γ < τ -2 2(v + 1)(τ + v + 2) and b = b T = O([T ] -δ ) with δ = τ -2 2(v + 1)(τ + v + 2)
.

Since MMM is a particular case of Markov random field, this result is also satisfied by MMM. It is interesting to see in both the causal or noncausal cases that the convergence rate of the MMM resampling algorithm is depending on a power law of [T ] (even if the choice of the optimal bandwidth b T is depending on unknown parameters τ and v). Moreover the maximal exponent of convergence rate that we can obtain in Theorem 2 is 1 2(1+v) (that requires τ → ∞ for the mixing assumption). Remark that if o = 0 (corresponding to a independent random field) then v = 0 and the convergence rate is arbitrary close to T 1/2 .

A partial consistency result for the MMM resampling algorithm in the noncausal case

In order to extend to the noncausal case the consistency proof of Bickel et Levina for the MMM resampling algorithm, we define the following one point conditional distribution defined by:

F T (dx/y) = 1 Z T s∈I T W b T (y -Y s ) δ Xs (dx), (2.4)
where δ x is the usual Dirac mass measure. Note that (2.4) is equal to (2.2) in the case A = N o . However and contrary to the causal case, the one point distribution (2.4) cannot be in general the one point conditional distribution of a noncausal Markov random field (nevertheless, we will use (2.4) to run a Gibbs sampler). A statistical problem with texture modeling by a noncausal Markov random field is to define a consistent nonparametric estimate of the one point conditional distributions which is also compatible with the existence of a conditional specification. This would allow to define an approximate Markov random field. We did not found a such estimate. Some tools are given in the Annex about the link between the convergence of a sequence of one point conditional distributions and the behavior of their joint laws provided they are well defined (see Theorem 3 and Theorem 4).

Here we only provide a restrictive result of consistency of a simulation procedure directly with the Markov chain linked to the Gibbs sampler.

Suppose that we use the conditional distributions (2.4) and the Gibbs sampler to synthetize a new texture on a rectangle R = R T = {1, . . . , u T } × {1, . . . , v T }. We suppose here that assumptions of Theorem 1 hold. Though the conditional distributions F T defined in (2.4) are not compatible with a Markov random field, we can use those distributions to simulate a Markov chain. We denote by ≺ the lexicographic order relation on R. Let z is an arbitrary element of S Z 2 not depending on T . If x, y ∈ S R and s ∈ R, we define the vectors yx(s) ∈ S No such that yx(s) j = y s+j if s + j ≺ s and yx(s) = x s+j otherwise, completed with the boundary conditions

x s+j = z s+j or y s+j = z s+j if site (s, j) ∈ R × N o is such that s + j / ∈ R.
Now for T ∈ N * × N * such that T 1 , T 2 ≥ 2o + 1 (this ensures that I T is not empty), we define the following transition on X R I T ⊂ S R :

P T (x, dy) = ⊗ s∈R F T (dy s /yx(s)) .
Note that P T corresponds to the transition of the homogeneous Markov chain associated to the conditional distributions F T when we implement the Gibbs sampler with a raster ordering for the visiting scheme (see [START_REF] Guyon | Random fields on a network[END_REF] Theorem 6.2.1). Now as for the classical Gibbs sampler, we simulate a Markov chain on I R T , with initial value w ∈ I R T and transition P T . Since P T is a positive transition, the law of this Markov chain with finite state space converges to its unique invariant probability denoted by µ T . Then we have the following equality:

µ T (A) = P T (x, A)µ T (dx), A ∈ B(S R ),
where B(S R ) denote the Borel σ-algebra on S R . One can mention that µ T is not in general a measure that admits F T as conditional distributions. Since S R is a compact metric space, the tightness of the sequence (µ T ) T implies the existence of a cluster point denoted by µ. We are going to show that µ = µ R , where µ R denotes the conditional law X R /X ∂R = z ∂R , where ∂R = (R + N o ) \ R. Then by uniqueness of the cluster point, we will deduce the following consistency result:

Almost surely : lim

T →∞ µ T = µ R in distribution. (2.5)
To show that µ = µ R , we first observe that µ R is an invariant probability of the transition P on S R defined by P (x, dy) = ⊗ s∈R F X/Y (dy s /yx(s)) , x ∈ S R .

Then P define a positive Markov chain and µ R is the unique invariant probability. In fact P is the transition of the homogeneous Markov chain defined in the Gibbs sampler for the simulation of a realization of µ R (still in the case of a periodic visiting scheme). Then if we prove that µ(A) = P (x, A)µ(dx), ∀A ∈ B S R , we we can conclude that µ = µ R .

Suppose that (T n ) n∈N is sequence in N * × N * such that lim n→∞ µ Tn = µ. Then if g be a continuous and bounded function on S R . We have:

g(y)µ Tn (dy) -g(y)P (x, dy)µ(dx) = g(y)P Tn (x, dy)µ Tn (dx) -g(y)P (x, dy)µ(dx)

≤ sup x∈S R
g(y)P Tn (x, dy) -g(y)P (x, dy) + g(y)P (x, dy)(µ Tn -µ)(dx)

= A + B.
Since the function x → g(y)P (x, dy) is still bounded and continuous from assumption (A2), the weak convergence of the sequence (µ Tn ) n implies that B → 0 (n → ∞). Now we show that A → 0 (n → ∞). First we observe that if h is a continuous and bounded function on S R × S R and s ∈ R, then:

sup

(x,y)∈S R ×S R h(x, y) F Tn (dy s /yx(s)) -F X/Y (dy s /yx(s) → n→∞ 0, a.s. (2.6)
The proof of (2.6) is omitted since the proof is very similar to the assertion A → 0 in the proof of Theorem 3, using Theorem 1. If u ∈ R is such that u s, ∀s ∈ R \ {u}, we have:

g(y)P Tn (x, dy) -g(y)P (x, dy)

≤ g(y)F X/Y (dy u /yx(u)) ⊗ s∈R\{u} F Tn (dy s /yx(s)) -⊗ s∈R\{u} F X/Y (dy s /yx(s)) + sup ys∈S,s =u g(y) F Tn (dy u /yx(u)) -F X/Y (dy u /yx(u)) . (2.7)
Then if we iterate the bound (2.7), using a non increasing enumeration of the sites of R, the convergence A → 0 follows from a repeated use of (2.6). Then, by the uniqueness of the limit of the sequence (µ Tn ) n , we conclude that µ(dy) = P (x, dy)µ(dx) and the convergence (2.5) follows from the previous remarks.

However, for obtaining the consistency the natural asymptotic requires that R T increases to Z 2 . Unfortunately, we did not find a proof in this case.

3 The approach of Paget and Longstaff and simulation examples

Paget and Longstaff method

In their paper, Paget and Longstaff [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF] have proposed a noncausal estimate of the local conditional distribution similar than ours, using also a kernel which smooths the multidimensional histogram.

Our approach is more linked to the idea of a resampling scheme and appears in a natural way from the nonparametric estimation of the conditional expectation (x, y) → P X t ≤ x Y t = y . The Gibbs sampler (see [START_REF] Geman | Stochastic relaxation, Gibbs distributions and the Bayesian restoration of images[END_REF]) is a classical stochastic relaxation (SR) algorithm which is used for the simulation of Markov random fields. But as pointed in [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF], a problem with the single-scale relaxation process is that global image characteristics evolve indirectly in the relaxation process. Global image characteristics are typically only propagated across the image lattice by local interactions and therefore evolve slowly, requiring long relaxation times to obtain equilibrium. Moreover the conditional distribution given in (2.4) requires the comparaison of a neighborhood in the output texture with all the neighborhoods of the same shape in the output texture. This leads to a very high computational load especially if p, the neighborhood size, must be very large to capture the global characteristics of the texture. This is why Paget and Longstaff used a multiscale relaxation, where the information obtained from SR at one resolution is used to constrain the SR at the next highest resolution. By this method, global image characteristics that have been resolved at a low resolution are infused into the relaxation process at the higher resolutions. This helps to reduce the number of iterations required to obtain equilibrium with the Gibbs sampler.

The multigrid representation of an image is shown in Figure 3 which is taken from [START_REF] Paget | Texture synthesis via a noncausal nonparametric multiscale Markov random field[END_REF].

If S 0 = [0, M 1 ] × [0, M 2 ]
represents the pixel's sites of an image x 0 , the lower resolutions, or higher grid levels l > 0, are decimated versions of the image at level l = 0. For a grid level l > 0, the image x l is defined on the lattice S l ⊂ S, where

S l = {s = (2 l i, 2 l j)/0 ≤ i ≤ M 1 /2 l , 0 ≤ j ≤ M 2 /2 l }.
The set of sites S l at level l represents a decimation of the previous set of sites S l-1 at the lower grid level l -1. The neighborhood system is redefined for each grid level l > 0:

N l t = {s ∈ S l / t -s ∞ ≤ o}.
For level grid l, SR is not applied to the sites s ∈ S l+1 .

We refer to [START_REF] Luettgen | Multiscale Representations of Markov Random fields[END_REF] for multiscale representations of Markov random fields. To better incorporate the multiscale relaxation described above, Paget and Longstaff have introduced a pixel temperature function used to determine when to terminate the SR process al one level and start it at the next level. Let l be a grid level. A pixel temperature is incorporated in equation (2.4) by modifying the form of the difference

d = y -Y s . (3.1)
In fact at the beginning of the SR at a level l, they define for a site j ∈ S l of the output texture the pixel temperature c j as follows: c j = 0 if j ∈ S l+1 and c j = 1 otherwise. The difference d is replaced by d such that:

d j = (1 -c t+j )(x t+j -X s+j ), j ∈ N o .
When a pixel x t has been relaxed in the SR process, we set:

T t = max{0, ξ + j∈No c t+j |N o | }
where ξ < 0 is fixed by the user.

Here, the idea is to provide a total confidence to pixels coming from the preceding resolution and to progressively increase the confidence level of a pixel synthesized in the present resolution. When c j = 0 ∀j ∈ S l , the SR process is considered as having reached an equilibrium state indicating that the image can be propagated to the next lower grid level. This notion of temperature is related to the global temperature used in stochastic annealing (see [START_REF] Geman | Stochastic relaxation, Gibbs distributions and the Bayesian restoration of images[END_REF]). Although we have incorporated this pixel temperature function for texture synthesis, we will not study in this paper statistical properties of a such approximation.

Texture synthesis examples

We have incorporated our noncausal bootstrap into the multiscale algorithm with the pixel temperature function described above. Concerning the choice of the parameters:

• For the neighborhood size, we choose o = 3 or o = 4.

• As in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF], we have not estimate the bandwidth parameter using theoretical results of kernel regression. We have empirically observed that b = 0.01 × (neighborhood size) 1/2 provides good results.

• As in [START_REF] Paget | Nonparametric Markov random field models for natural texture images[END_REF], we set ξ = -1 and generally we have used 4 or 5 grid levels for the synthesis.

Another possibility for the simulation is to use a Conditional Iterative Mode (see [START_REF] Besag | On the Statistical Analysis of Dirty Pictures[END_REF]). The principle of this deterministic algorithm is to replace each step in the Gibbs sampler by choosing the value X s such that F T dx t x t+No is maximal or equivalently such that x t+No -Y s is minimal in (2.4). Usually this algorithm converges toward a local extremum of the law of the random field on S R T . This local extremum depends on the initial values put for the pixels on the output texture. We have used the Conditional Iterative Mode for texture synthesis although its definition is not very clear in our case, since the joint laws are not defined.

To illustrate the principle of the multiscale algorithm, Figure 4 shows a step of the synthesis in the highest resolution. The Gibbs sampler runs in the raster ordering and Figure 4 shows the first sweep. One can see that the lower resolutions give the shape of the texture. Moreover the pixel temperature function helps for a good initialization of the sampler. This multiscale algorithm does not correctly work only for stochastic textures as in Figure 8 but also for highly structured ones as Figure 5 shows, even if small discontinuities appear in the last case.

In fact, we have observed that the ICM works as well as the non deterministic algorithm and in some cases better as in Figure 6. Figure 9 exhibits a comparison with Efros and Leung's algorithm in a failure case. Texture (b) is taken from Efros and Leung's paper [START_REF] Efros | Texture synthesis by non-parametric sampling[END_REF] and shows that this causal approach can create garbage when the algorithm slips into a wrong part of the search space. Although the noncausal algorithm does not have the same problem, a gray dark area is often reproduced in texture (c).

Figure 10 shows a comparison with two some populars pixel by pixel algorithms. Texture (b) synthesized using Wei et Levoy algorithm [START_REF] Wei | Fast texture synthesis using tree-structured vector quantization[END_REF] and texture (c) using the Ashikhmin method are taken from [START_REF] Ashikhmin | Synthesizing Natural Textures[END_REF]. The noncausal algorithm used for texture (d) avoids excessive blurring as in (b) and rough images as in (c).

Annex

We will use the convenient notation: for s, t ∈ N * × N * define:

Y t = X U (o) t and Y t (s) = X U (o) t (s) .

Proof of Theorem 2

We follow the proof of theorem 2 of Bickel et Levina in order to compute convergence rate. We first recall the following lemma which proof can be found in [START_REF] Doukhan | Mixing: Properties and Examples[END_REF].

Lemma 1 (Moment inequality). Let F t be a real-valued random field indexed by I ⊂ Z d satisfying conditions (A1). If EF t = 0, F t ∈ L τ + and τ ≥ 2, then there exists a constant C depending only on τ and mixing coefficients of F t such that

E t∈I F t τ ≤ C max L(τ, ), L(2, ) τ /2 , where L(µ, ) = t∈I E |F t | µ+ µ/(µ+ ) .
It is easy to see that if sup t F t ∞ ≤ M , then we obtain:

E t∈I F t τ ≤ CM τ |I| τ /2 (4.1)
For (x, y) ∈ S × S A , we set:

r T (x, y) = [T ] -1 s∈I T 1 1 (-∞,x] (X s )W b (y -Y s ), r(x, y) = 1 1 (-∞,x] (z)f X,Y (z, y)dz, f T (y) = [T ] -1 s∈I T W b (y -Y s ).
We have:

F T (x/y) = r T (x, y) f T (y) , F X/Y (x/y) = r(x, y) f Y (y) . (4.2)
Following the proof of lemma A2 in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF], we prove the following result

Lemma 2 Under assumptions (A1) -(A4), for any x ∈ R sup (x,y)∈S×S A |r T (x, y) -r(x, y)| = O([T ] -γ ) for 0 < γ < τ -2 2(v+1)(τ +v+2) .
Proof of Lemma 2 In this proof, we will denote by C > 0 a generic constant which does not depend on T . Let δ > 0 such that b T = O [T ] -δ , then the proof of lemma A2 in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF] leads to sup

(x,y)∈S×S A |Er T (x, y) -r(x, y)| = O [T ] -δ . (4.3)
Then we need to bound sup (x,y)∈S×S A |r T (x, y) -Er T (x, y)|.

As in [START_REF] Bickel | Texture synthesis and nonparametric resampling of random fields[END_REF], we define

Z t,T (x, y) = 1 1 (-∞,x] (X t )W b T (y -Y t ) -E (1 1 Xt≤x W b T (y -Y t ))
and we need to bound sup (x,y)∈S×S A 1

[T ] t∈I T Z t,T (x, y) . As S × S A is compact, we can cover S × S A with N T cubes I i,T with centers (x i , y i ) and sides L T for the supremum norm. Without loss of generality, we suppose

x 1 ≤ • • • ≤ x N T and we set x 0 = x 1 -L T and x N T = x N T + L T . Then sup (x,y)∈S×S A [T ] -1 t∈I T Z t,T (x, y) ≤ max 1≤i≤N T [T ] -1 t∈I T Z t,T (x i , y i ) + max 1≤i≤N T sup (x,y)∈(S×S A )∩I i,T [T ] -1 t∈I T (Z t,T (x, y) -Z t,T (x i , y i )) = I + II
• First let deal with term II. Using assumption (A4) for the kernel, we have for t ∈ I T and

x ∈ (x i-1 , x i ]:

|Z t,T (x, y) -Z t,T (x i , y i )| ≤ C b -(v+1) T y -y i + b -v T 1 1 x i-1 <Xt≤x i + P(x i-1 < X t ≤ x i ) ≤ C b -(v+1) T L T + b -v T 1 1 x i-1 <Xt≤x i + P(x i-1 < X t ≤ x i )
We choose L T = [T ] -β and we set U i,t = 1 1 ]x i-1 ,x i ] (X t ) -P(x i-1 < X t ≤ x i+1 ). Remark that assumption (A2) about the existence of densities allows to derive the bound:

P(x i-1 < X 0 ≤ x i ) ≤ CL T .
We have: sup

(x,y)∈(S×S A )∩I i,T [T ] -1 t∈I T (Z t,T (x, y) -Z t,T (x i , y i )) ≤ C   [T ] δ(v+1)-β + [T ] vδ-1 | t∈I T U i,t | + [T ] vδ P(x i-1 < X 0 ≤ x i )   ≤ C   [T ] δ(v+1)-β + max 1≤i≤N T [T ] vδ-1 | t∈I T U i,t |   .
Now we consider a real number γ < τ -2-2vδτ -2β(v+1)

2τ

. Since v+1) , we obtain using (A1) and lemma 1

N T = O L -(v+1) T = O [T ] β(
P   max 1≤i≤N T [T ] vδ-1 t∈I T U i,t > [T ] -γ   ≤ N T i=1 [T ] (γ+vδ-1)τ E t∈I T U i,t τ ≤ C[T ] β(v+1)+(γ+vδ-1)τ + τ 2
By the choice of γ, we have β(v + 1) + (γ + vδ -1)τ + τ 2 < -1 and we deduce from the Borel Cantelli lemma that

max 1≤i≤N T [T ] vδ-1 t∈I T U i,t = O [T ] -γ a.s, γ < τ -2 -2vδτ -2β(v + 1) 2τ .
Now using the previous inequalities, we deduce that:

II ≤ O [T ] δ(v+1)-β + [T ] -γ , γ < τ -2 -2vδτ -2β(v + 1) 2τ . (4.4)
• Now we turn on the term I. For a real number γ < τ -2-2vδτ -2β(v+1) 2τ , we have using (A1) and lemma 1:

P(I > [T ] -γ ) ≤ N T i=1 [T ] ( γ-1)τ E t Z t,T (x i , y i ) τ ≤ CN T [T ] ( γ-1)τ + τ 2 b -vτ T ≤ C[T ] β(v+1)+( γ-1)τ + τ 2 +δvτ
By the choice of γ, we have

β(v + 1) + ( γ -1)τ + τ 2 + δvτ < -1,
and by the Borel Cantelli lemma, we have

I = O T -γ a.s, γ < τ -2 -2vδτ -2β(v + 1) 2τ
Now we choose the number β such that:

β -δ(v + 1) = τ -2 -2vδτ -2β(v + 1) 2τ .
This leads to β = τ -2+2τ δ 2(v+τ +1) and to the following rate:

I + II = O [T ] -γ , γ < τ -2 -2δ((v + 1) 2 + vτ ) 2(v + τ + 1)
.

Finally, we choose δ for an equilibrium with the bound (4.3), solving the equation:

δ = τ -2 -2δ((v + 1) 2 + vτ ) 2(v + τ + 1) .
This leads to:

δ = τ -2 2(v + 1)(τ + v + 2) > 0,
which gives the rate given by the Lemma 2.

Proof of Theorem 2 We write:

F T (x/y) -F X/Y (x/y) = 1 f T (y)
r T (x, y) -r(x, y) + r(x, y) -F X/Y (x/y)f T (y) 5 Some tools for the consistency: Continuity results

In this section, we give two results which describe the behavior of random fields in relation to their one point conditional distributions. If it is possible to construct a nonparametric estimate of the one point conditional distribution which is also compatible with the one point conditional distribution of a Markov random field, the following results will be useful to describe the statistical properties of the joint laws of the model.

We first give a lemma which states the behavior of the joint laws of a sequence of random fields when their one-point conditional distributions are convergent. In the sequel, let S be a compact set of R endowed with its Borelian algebra B(S). Let X = S I where I is a denumerable set. For any sequence (u i ) i∈I of positive real numbers satisfying i∈I u i < ∞, we consider the distance d on X defined by:

d(z, z ) = i∈I u i z i -z i , z, z ∈ X .
Then (X , d) is a compact metric space. For A ⊂ I, let p A : X → S, z → z A . For t ∈ I, we will write p t instead of p {t} . Moreover, for t ∈ I, we set:

F - t = σ(p j / j = t).
We denote by P(X ) the set of probability measures on X . If ν 1 , ν 2 are two elements of P(X ), the Prohorov distance d P between ν 1 and ν 2 is defined by:

d P (ν 1 , ν 2 ) = inf{ > 0, ν 1 (A) ≤ ν 2 (A ) + , ∀A ∈ B(X )},
where A = {z ∈ X /d(z, A) ≤ }. The distance d P defines the weak convergence on P(X ) which is a compact space topology. Now for ν ∈ P(X ) and any bounded measurable function f on X , we set:

E ν (f ) = f dν.
For t ∈ I, we denote ν t the kernel on P(X ) such that:

ν t (A/z) = E ν 1 1 A /F - t (z),
where E ν (•/F) denotes the conditional expectation with respect to a σ-algebra F ⊂ B(X ).

Finally let γ = (γ t ) t∈I be a sequence of probability kernels such that for t ∈ I, γ t is a kernel from F - t to B(X ) satisfying the property:

γ t (A ∩ B/•) = γ t (A/•) × 1 1 B , (A, B) ∈ σ(p t ) × F - t .
One can conclude that:

sup z∈X ν (n k ) t (h)(z) -γ t (h)(z) → k →∞ 0.
Hence A → 0.

Moreover since γ t (h) ∈ C(X ) by condition (C), the weak convergence of the sequence ν

= ⊗ k i=1 [a, x t i ] × S I\{t 1 ,.
..,t k } ? In other words, can we obtain the distance between the distribution functions of the joint laws? This problem is linked to the phase transition phenomenon and to the Dobrushin's contraction formula. In order to apply this formula, the following assumption will be needed:

(H) We assume that there exist two families of non negative real numbers {L t,j /t, j ∈ I} and {M t,j /t, j ∈ I}, with L = sup t∈I j =t L t,j < 1 and M = sup t∈I j =t M t,j < ∞, such that ∀z, z ∈ X :

sup x∈S µ (p t ≤ x/z) -µ p t ≤ x/z ≤ j =t M t,j z j -z j , S µ (p t ≤ x/z) -µ p t ≤ x/z dx ≤ j =t L t,j z j -z j .
Theorem 4 Let µ, ν ∈ P(X ) with S = [a, b]. Suppose that the random field µ satisfies assumption (H). Then for each finite subset {t 1 , . . . , t k } of I, we have:

sup (xt 1 ,...,xt k )∈S k µ C xt 1 ,...,xt k -ν C xt 1 ,...,xt k ≤ C sup t∈I sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)| , where C = 1 + M (b -a) k -1 + 1 1-L .
We first recall the following inequality due to Dobrushin (see [START_REF] Fllmer | Random Fields and Diffusion Processes[END_REF] remark 2.17). This inequality allows to bound the distance between two random fields µ and ν with the distance between their local conditional specification. Of course, a such inequality implies that there is no phase transition. Some contraction conditions on the local conditional specifications are needed to get this inequality. Before giving this inequality in our case, we introduce some notations. Let r be a metric on S = [a, b].

If α and β are two probability on S, the Warsserstein metric is defined as

R(α, β) = sup f dα -f dβ δ(f ) ,
where the supremum is taken over all Lipshitz functions f on S with δ(f ) = sup

x =x |f (x) -f (x )| r(x, x ) < ∞.
For our result, we will only consider the metric r(x, x ) = |x -x |. One can mention that in this case, R has the following expression:

≤ g k dµ -g k dν + g k dν -h k dν ≤ g k dµ -g k dν + β k
where β l = g l -h l ∞ , l ∈ {1, . . . , k}.

First by lemma 4, one can apply inequality (5.5) to the function g k . We obtain:

g k dµ -g k dν ≤ i∈I (bD) i δ i (g k ).
Using for i ∈ I, the inequality j∈I C n j,i ≤ c n = L n and the bound given in (5.3), we have: If we use the bound for β k in Lemma 5, we conclude that: Proof of lemma 3

f k dµ -f k dν ≤ C sup
1. For (x, z, t) ∈ S × X × Z 2 , with (xz) t the element r of X such that r t = x and r s = z s if s = t. Let g z,t : S → R, x → g((xz) t ) is a Lipshitz function and then is derivable almost everywhere with g z,t satisfying g z,t ∞ ≤ δ t (g). Let z, z ∈ X . With an integration by parts formula, we have:

A = g z,t (
i∈I δ i (g l ) ≤ M.
Proof of Lemma 4 First using assumption (A5), g 1 ∈ L(X ) and we have:

i∈i δ i (g 1 ) ≤ i =t 1 M t 1 ,i ≤ M.
Using the point 1 of lemma 3, a straightforward finite induction shows that g l ∈ L(X ), l ≤ k. Now, if l ≥ 2, with the point 1 in lemma 3 and the definition of g l , i∈I δ i (g l ) ≤ i∈I δ i (g l-1 ), and Lemma 4 follows.

Lemma 5 For l ∈ N * , we have:

β k ≤ (1 + (k -1)(b -a)M ) ×

Figure 1 :

 1 Figure 1: MMM algorithm, o = 2

Figure 2 :

 2 Figure 2: Efros and Leung algorithm, o = 2

Figure 3 :

 3 Figure 3: Grid organisation via decimation.

Figure 4 :Figure 5 :Figure 6 :

 456 Figure 4: The Gibbs sampler and the highest resolution.

Figure 7 :Figure 8 :Figure 9 :

 789 Figure 7: Original texture (128 × 128) and synthesis (200 × 200)

Figure 10 :

 10 Figure 10: Comparison with causal methods: (a) sample 128×128, (b) Wei et Levoy algorithm, (c) Ashikhmin method, (d) ICM. All the synthesized textures are 200 × 200 pixels.

≤ 1 f

 1 T (y) |r T (y) -r(y)| + F X/Y (x/y) |f T (y) -f Y (y)| By lemma 2, we have sup x,y |r T (x, y) -r(x, y)| , sup y |f T (y) -f (y)| = O (T -γ ) a.s with 0 < γ < τ -2 2(v+1)(τ +v+2) . Since by (A2), inf y∈S A f Y (y) > 0 and sup (x,y)∈S×S A F X/Y (x/y) ≤ 1, we get the result.

(

  bD) i ≤ j∈I D j,i sup j∈I b j ≤ b -a 1 -L sup t∈I sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)| ,(5.6)Then using lemma 4, we conclude that:g k dµ -g k dν ≤ M b -a 1 -L sup t∈I sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)| .

Lemma 3

 3 |µ(p t ≤ x/z) -ν(p t ≤ x/z)| , with C = 1 + M (b -a) k -1 + 1 1-L .The proof of theorem 4 is now complete. Let g ∈ L(X ) and t ∈ I. Then 1. µ t (g) ∈ L(X ) and:i∈I δ i (µ t (g)) ≤ i∈I δ i (g).

2 .

 2 µ t (g) -ν t (g) ∞ ≤ (b -a)δ t (g) sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)|.

  (n k ) Then we conclude that for t ∈ I, we have νγ t = ν, and the result follows from this contradiction. Now we investigate the following problem. Suppose for simplicity that S = [a, b]. Assume that for µ, ν ∈ P(X ), the distance between the conditional distribution functions ν t (p t ≤ •/•) and µ t (p t ≤ •/•) is known, then is it possible to obtain the distance between µ and ν over some cylinders sets of the form C xt 1 ,...,xt k

	k ∈N
	implies B → 0.

  x) (µ(p t ∈ dx/z) -µ(p t ∈ dx/ z))Now this leads to:g z,t (x)µ(p t ∈ dx/z) -g z,t (x)µ(p t ∈ dx/ z) (g) |z i -z i | + δ t (g) i =t L t,i |z i -z i | From this bound, it is obvious that µ t (g) ∈ L(X ) if g ∈ L(X ) since: i∈I δ i (µ t (g)) ≤ i =t δ i (g) + Lδ t (g) < ∞.2. For z ∈ X , with another integration by parts formula:|µ t (g)(z) -ν t (g)(z)| = g z,t(x)µ(p t ∈ dx/z) -g z,t (x)ν(p t ∈ dx/z)

	≤	δ i (g) |z i -z i | + A
	i =t
	≤	δ i
	i =t

=

(µ(p t < dx/z) -µ(p t < x/ z)) g z,t (x)dx

≤ δ t (g) i =t L t,i |z i -z i | . ≤ (µ(p t < x/z) -ν(p t < x/z)) g z,t (x)dx ≤ (b -a)δ t (g) sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)| Lemma 4

For l ∈ N * , we have g l ∈ L(X ) and:

  max t∈{t 1 ,...,t k } sup (x,z)∈S×X |µ(p t ≤ x/z) -ν(p t ≤ x/z)| .Proof of Lemma 5 We have by definitionβ 1 ≤ sup (x,z)∈S×X |µ(p t 1 ≤ x/z) -ν(p t 1 ≤ x/z)| . Now, let l ∈ {1, .. . , k -1}. We have using the point 2 of Lemma 3 and Lemma 4:β l+1 = µ t l+1 (g l ) -ν t l+1 (h l ) ∞ ≤ ν t l+1 (g l ) -ν t l+1 (h l ) ∞ + ν t l+1 (g l ) -µ t l+1 (g l )

∞ ≤ β l + (b -a)δ t l+1 (g l ) × sup (x,z)∈S×X µ(p t l+1 ≤ x/z) -ν(p t l+1 ≤ x/z) ≤ β T,l + (b -a)M sup (x,z)∈S×X µ(p t l+1 ≤ x/z) -ν(p t l+1 ≤ x/z)

One can easily deduce the result.

If h is a bounded measurable function on X , we denote γ t (h) the measurable function on X such that:

γ t (h)(z) = f (w)γ t (dw/z), z ∈ X .

We define the following subset of P(X ):

where for all (t, ν) ∈ I × P(X ), νγ t denotes the element of P(X ) such that:

We will say that γ satisfies the condition (C) if:

where C(X ) is the space of continuous and bounded functions on X .

The following result gives the behavior of a sequence of random fields in the case of uniform convergence of their one point conditional distribution. A general treatment of topological properties of random fields is given in [START_REF] Georgii | Gibbs measures and phase transitions[END_REF]. For completeness of this work, we state and prove the following result:

Theorem 3 For t ∈ I, let γ t be a probability kernel on X ×F - t . Suppose that the sequence γ = (γ t ) t∈I satisfies condition (C). Then for a sequence (ν

Proof of Lemma 3 Suppose that there exists > 0 and a subsequence s = (ν (n k ) ) k∈N such that d P (ν n k , G(γ)) > , ∀k ∈ N. Since this sequence is relatively compact with respect to the weak topology, then there exists a subsequence (ν (n k ) ) k of s and ν ∈ P(X ) such that:

We are going to show that ν ∈ G(γ), which is a contradiction with

For t ∈ I, we have:

Let ε > 0. Since h is uniformly continuous on X , there exists δ > 0 such that d(z, z ) < δ ⇒ |h(z) -h(z )| < . We choose a subdivision a 1 , . . . , a k of the interval [a, b] ⊃ S with step smaller then δ/u t . Let h k the function defined on [a, b] by h k (z) = k-1 l=1 h(z(l))1 1 ]a l ,a l+1 ] (z 0 ) where for l = 1, . . . , k -1, z(l) is the element of X such that z(l) t = a l and z(l) s = z s if s = t. We have sup z∈X |h(z) -h k (z)| < . We deduce:

(5.1)

We define also L(X ) the space of real functions f such that:

Let µ, ν ∈ P(X ). We suppose that the following continuity condition holds:

For µ ∈ P(X ), the contraction coefficients are defined by

Note that with the expression (5.1), we have the bound: C ik < 1.

(5.4)

In this case, the following inequality holds:

Proof of Theorem 4 First, from the point 1 of lemma 3, condition (5.2) is satisfied for µ. Moreover for i, k ∈ Z 2 , we have C i,k = L k,i and the condition (5.4) is satisfied with c = L. Then, inequality (5.5) holds for ν.

For l ∈ {1, . . . , k} and x ∈ X , we set:

and

We have: