Salome HOME
updated copyright message
[modules/med.git] / src / MEDCalc / tui / medimages.py
index 6493341039f053f0a19374d4ae321e23f981a8c3..60de6d699b2245eb1bca4a018f5c427a9dec28a0 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2023  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -24,7 +24,7 @@ import sys
 if sys.platform == "win32":
   import MEDCouplingCompat as MC
 else:
-  import MEDCoupling as MC
+  import medcoupling as MC
 
 import MEDLoader as ML
 
@@ -53,7 +53,7 @@ class FieldBuilder:
         # just have to specify the field and the MEDLoader will save the
         # underlying mesh.
         createFromScratch=True
-        ML.MEDLoader.WriteField(medFilepath,field,createFromScratch)
+        ML.WriteField(medFilepath,field,createFromScratch)
 
     def createMesh(self, meshname, sizeX, sizeY):
         """
@@ -130,8 +130,8 @@ class FieldBuilder:
 
 def getTestImagePath():
     import os
-    MED_ROOT_DIR=os.environ["MED_ROOT_DIR"]
-    RESDIR=os.path.join(MED_ROOT_DIR, "share", "salome", "resources", "med", "medcalc_testfiles")
+    FIELDS_ROOT_DIR=os.environ["FIELDS_ROOT_DIR"]
+    RESDIR=os.path.join(FIELDS_ROOT_DIR, "share", "salome", "resources", "fields", "medcalc_testfiles")
     imgFileName="irm_test1.png"
     imgFilePath=os.path.join(RESDIR,imgFileName)
     return imgFilePath