Commit ef638c1f0d697d0ddc52457358e1192225e264c3

Authored by Paulo Henrique Junqueira Amorim
1 parent 87b12fec

FIX: Returned pseudo color list in slices

invesalius/constants.py
@@ -328,8 +328,9 @@ if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\ @@ -328,8 +328,9 @@ if hasattr(sys,"frozen") and (sys.frozen == "windows_exe"\
328 ICON_DIR = os.path.join(abs_path, "icons") 328 ICON_DIR = os.path.join(abs_path, "icons")
329 SAMPLE_DIR = os.path.join(FILE_PATH, 'samples') 329 SAMPLE_DIR = os.path.join(FILE_PATH, 'samples')
330 DOC_DIR = os.path.join(FILE_PATH, 'docs') 330 DOC_DIR = os.path.join(FILE_PATH, 'docs')
331 -  
332 folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join(abs_path, "presets", "raycasting") 331 folder=RAYCASTING_PRESETS_DIRECTORY= os.path.join(abs_path, "presets", "raycasting")
  332 + RAYCASTING_PRESETS_COLOR_DIRECTORY = os.path.join(abs_path, "presets", "raycasting", "color_list")
  333 +
333 else: 334 else:
334 ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', 'icons')) 335 ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', 'icons'))
335 SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'samples')) 336 SAMPLE_DIR = os.path.abspath(os.path.join(FILE_PATH,'..', 'samples'))
@@ -339,6 +340,12 @@ else: @@ -339,6 +340,12 @@ else:
339 "presets", 340 "presets",
340 "raycasting")) 341 "raycasting"))
341 342
  343 + RAYCASTING_PRESETS_COLOR_DIRECTORY = os.path.abspath(os.path.join(".",
  344 + "presets",
  345 + "raycasting",
  346 + "color_list"))
  347 +
  348 +
342 # MAC App 349 # MAC App
343 if not os.path.exists(ICON_DIR): 350 if not os.path.exists(ICON_DIR):
344 ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', '..', '..', '..', 'icons')) 351 ICON_DIR = os.path.abspath(os.path.join(FILE_PATH, '..', '..', '..', '..', 'icons'))
invesalius/presets.py
@@ -169,7 +169,7 @@ class Presets(): @@ -169,7 +169,7 @@ class Presets():
169 169
170 170
171 def get_wwwl_presets(): 171 def get_wwwl_presets():
172 - files = glob.glob(os.path.join('..', 'presets', 'raycasting', 'color_list', '*.plist')) 172 + files = glob.glob(os.path.join(const.RAYCASTING_PRESETS_COLOR_DIRECTORY, '*.plist'))
173 presets = {} 173 presets = {}
174 for f in files: 174 for f in files:
175 p = os.path.splitext(os.path.basename(f))[0] 175 p = os.path.splitext(os.path.basename(f))[0]