Back to index

salome-paravis  6.5.0
Functions | Variables
demo_14_med Namespace Reference

Functions

def medread

Variables

tuple testdir = os.getenv("TESTDIR")
tuple pvdata = os.getenv("PVDATA")

Function Documentation

def demo_14_med.medread (   path,
  impth 
)

Definition at line 32 of file demo_14_med.py.

00032 
00033 def medread (path, impth):
00034   print '============================================================'
00035 
00036   if os.path.exists(path):
00037     filelist = os.listdir(path)
00038     num = len (filelist)
00039     
00040     for i in range(num):
00041       fname = str(filelist[i])
00042       if fname.rfind(".med") > -1:
00043         v = GetRenderView()
00044         v.UseLight = 1
00045         v.CameraPosition = [0.0, 0.0, 6.7]
00046         v.LightSwitch = 0
00047         v.CameraClippingRange = [4.5, 9.5]
00048         v.LODThreshold = 5.0
00049         v.Background = [0., 0., 0.]
00050         v.CameraParallelScale = 1.8
00051         
00052         file_med = MEDReader( FileName=(path + fname))
00053         
00054         time.sleep(10)
00055         SetActiveSource(file_med)
00056         Show()
00057         ##Show (file_med, view=v)
00058         ##Render(view=v)
00059         Render()
00060         time.sleep(10)
00061         WriteImage(filename = (impth +  "medFile_" + str(i+1) + ".png"), view=v, Magnification=2)
00062         print str(i+1), "Shown file is:  ", fname
00063         
00064         Delete(v)
00065         v1 = CreateRenderView()
00066         SetActiveView(v1)
00067         

Here is the call graph for this function:


Variable Documentation

tuple demo_14_med.pvdata = os.getenv("PVDATA")

Definition at line 69 of file demo_14_med.py.

tuple demo_14_med.testdir = os.getenv("TESTDIR")

Definition at line 68 of file demo_14_med.py.