biomedisa 2024.5.18__py3-none-any.whl → 2024.5.20__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. biomedisa/__init__.py +2 -6
  2. biomedisa/deeplearning.py +88 -91
  3. biomedisa/{biomedisa_features → features}/DataGenerator.py +1 -1
  4. biomedisa/{biomedisa_features → features}/DataGeneratorCrop.py +1 -1
  5. biomedisa/{biomedisa_features → features}/PredictDataGenerator.py +1 -1
  6. biomedisa/{biomedisa_features → features}/PredictDataGeneratorCrop.py +1 -1
  7. biomedisa/{biomedisa_features → features}/active_contour.py +15 -18
  8. biomedisa/{biomedisa_features → features}/assd.py +1 -1
  9. biomedisa/{biomedisa_features → features}/biomedisa_helper.py +107 -117
  10. biomedisa/{biomedisa_features → features}/create_slices.py +51 -60
  11. biomedisa/{biomedisa_features → features}/crop_helper.py +111 -116
  12. biomedisa/{biomedisa_features → features}/curvop_numba.py +1 -1
  13. biomedisa/{biomedisa_features → features}/django_env.py +9 -10
  14. biomedisa/{biomedisa_features → features}/keras_helper.py +143 -170
  15. biomedisa/{biomedisa_features → features}/nc_reader.py +1 -1
  16. biomedisa/{biomedisa_features → features}/pid.py +2 -2
  17. biomedisa/{biomedisa_features → features}/process_image.py +12 -14
  18. biomedisa/{biomedisa_features → features}/pycuda_test.py +2 -1
  19. biomedisa/{biomedisa_features → features}/random_walk/gpu_kernels.py +2 -1
  20. biomedisa/{biomedisa_features → features}/random_walk/pycuda_large.py +2 -2
  21. biomedisa/{biomedisa_features → features}/random_walk/pycuda_large_allx.py +2 -2
  22. biomedisa/{biomedisa_features → features}/random_walk/pycuda_small.py +2 -2
  23. biomedisa/{biomedisa_features → features}/random_walk/pycuda_small_allx.py +2 -2
  24. biomedisa/{biomedisa_features → features}/random_walk/pyopencl_large.py +1 -1
  25. biomedisa/{biomedisa_features → features}/random_walk/pyopencl_small.py +1 -1
  26. biomedisa/{biomedisa_features → features}/random_walk/rw_large.py +11 -11
  27. biomedisa/{biomedisa_features → features}/random_walk/rw_small.py +12 -12
  28. biomedisa/{biomedisa_features → features}/remove_outlier.py +13 -16
  29. biomedisa/features/split_volume.py +167 -0
  30. biomedisa/interpolation.py +10 -12
  31. biomedisa/mesh.py +9 -12
  32. {biomedisa-2024.5.18.dist-info → biomedisa-2024.5.20.dist-info}/METADATA +15 -16
  33. biomedisa-2024.5.20.dist-info/RECORD +44 -0
  34. biomedisa/biomedisa_features/split_volume.py +0 -274
  35. biomedisa-2024.5.18.dist-info/RECORD +0 -44
  36. /biomedisa/{biomedisa_features → features}/__init__.py +0 -0
  37. /biomedisa/{biomedisa_features → features}/amira_to_np/__init__.py +0 -0
  38. /biomedisa/{biomedisa_features → features}/amira_to_np/amira_data_stream.py +0 -0
  39. /biomedisa/{biomedisa_features → features}/amira_to_np/amira_grammar.py +0 -0
  40. /biomedisa/{biomedisa_features → features}/amira_to_np/amira_header.py +0 -0
  41. /biomedisa/{biomedisa_features → features}/amira_to_np/amira_helper.py +0 -0
  42. /biomedisa/{biomedisa_features → features}/random_walk/__init__.py +0 -0
  43. {biomedisa-2024.5.18.dist-info → biomedisa-2024.5.20.dist-info}/LICENSE +0 -0
  44. {biomedisa-2024.5.18.dist-info → biomedisa-2024.5.20.dist-info}/WHEEL +0 -0
  45. {biomedisa-2024.5.18.dist-info → biomedisa-2024.5.20.dist-info}/top_level.txt +0 -0
biomedisa/__init__.py CHANGED
@@ -1,15 +1,11 @@
1
1
  import os
2
- import sys
3
2
  import subprocess
4
3
 
5
4
  # from source base directory
6
5
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
7
6
 
8
- # pip base directory
9
- if not os.path.exists(os.path.join(BASE_DIR,'biomedisa_features')):
10
- BASE_DIR = os.path.dirname(os.path.abspath(__file__))
11
- # add BASE_DIR to PYTHONPATH for absolute imports
12
- sys.path.append(BASE_DIR)
7
+ # pip installation
8
+ if not os.path.exists(os.path.join(BASE_DIR,'biomedisa/settings.py')):
13
9
 
14
10
  # metadata
15
11
  import importlib_metadata
biomedisa/deeplearning.py CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/python3
2
2
  ##########################################################################
3
3
  ## ##
4
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
4
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
5
5
  ## ##
6
6
  ## This file is part of the open source project biomedisa. ##
7
7
  ## ##
@@ -27,13 +27,11 @@
27
27
  ## ##
28
28
  ##########################################################################
29
29
 
30
- import sys, os
31
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
32
- sys.path.append(BASE_DIR)
30
+ import os
33
31
  import biomedisa
34
- import biomedisa_features.crop_helper as ch
35
- from biomedisa_features.keras_helper import *
36
- from biomedisa_features.biomedisa_helper import _error_, unique_file_path
32
+ import biomedisa.features.crop_helper as ch
33
+ from biomedisa.features.keras_helper import *
34
+ from biomedisa.features.biomedisa_helper import _error_, unique_file_path
37
35
  from tensorflow.python.framework.errors_impl import ResourceExhaustedError
38
36
  import tensorflow as tf
39
37
  import numpy as np
@@ -43,6 +41,7 @@ import h5py
43
41
  import time
44
42
  import subprocess
45
43
  import glob
44
+ import tempfile
46
45
 
47
46
  class Biomedisa(object):
48
47
  pass
@@ -120,7 +119,7 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
120
119
  project = os.path.splitext(bm.shortfilename)[0]
121
120
 
122
121
  # path to model
123
- bm.path_to_model = BASE_DIR + f'/private_storage/images/{bm.username}/{project}.h5'
122
+ bm.path_to_model = biomedisa.BASE_DIR + f'/private_storage/images/{bm.username}/{project}.h5'
124
123
  if not bm.remote:
125
124
  bm.path_to_model = unique_file_path(bm.path_to_model)
126
125
 
@@ -128,7 +127,7 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
128
127
  project = os.path.splitext(os.path.basename(bm.path_to_model))[0]
129
128
 
130
129
  # create pid object
131
- from biomedisa_features.django_env import create_pid_object
130
+ from biomedisa.features.django_env import create_pid_object
132
131
  create_pid_object(os.getpid(), bm.remote, bm.queue, bm.img_id, (bm.path_to_model if bm.train else ''))
133
132
 
134
133
  # write in log file
@@ -227,81 +226,83 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
227
226
  crop_data = True if 'cropping_weights' in hf else False
228
227
  hf.close()
229
228
 
230
- # extract image files
231
- bm.tmp_dir = None
232
- if bm.path_to_images is not None and (os.path.splitext(bm.path_to_images)[1]=='.tar' or bm.path_to_images[-7:]=='.tar.gz'):
233
- path_to_dir = os.path.dirname(bm.path_to_images) + '/final.'+os.path.basename(bm.path_to_images)
234
- if path_to_dir[-3:]=='.gz':
235
- path_to_dir = path_to_dir[:-3]
236
- if bm.django_env and not bm.remote:
237
- path_to_dir = unique_file_path(path_to_dir)
238
- bm.tmp_dir = BASE_DIR + '/tmp/' + id_generator(40)
239
- tar = tarfile.open(bm.path_to_images)
240
- tar.extractall(path=bm.tmp_dir)
241
- tar.close()
242
- bm.path_to_images = bm.tmp_dir
243
- bm.save_cropped, bm.acwe = False, False
244
- bm.clean, bm.fill = None, None
245
-
246
- # list of images
247
- path_to_finals = []
248
- if bm.path_to_images is not None and os.path.isdir(bm.path_to_images):
249
- files = glob.glob(bm.path_to_images+'/**/*', recursive=True)
250
- bm.path_to_images = [f for f in files if os.path.isfile(f)]
251
- else:
252
- bm.path_to_images = [bm.path_to_images]
253
-
254
- # loop over all images
255
- for bm.path_to_image in bm.path_to_images:
256
-
257
- # create path_to_final
258
- if bm.path_to_image:
259
- filename = os.path.basename(bm.path_to_image)
260
- filename = os.path.splitext(filename)[0]
261
- if filename[-4:] == '.nii':
262
- filename = filename[:-4]
263
- bm.path_to_cropped_image = os.path.dirname(bm.path_to_image) + '/' + filename + '.cropped.tif'
264
- if bm.django_env and not bm.remote and not bm.tmp_dir:
265
- bm.path_to_cropped_image = unique_file_path(bm.path_to_cropped_image)
266
- filename = 'final.' + filename
267
- bm.path_to_final = os.path.dirname(bm.path_to_image) + '/' + filename + extension
268
- if bm.django_env and not bm.remote and not bm.tmp_dir:
269
- bm.path_to_final = unique_file_path(bm.path_to_final)
270
-
271
- # crop data
272
- region_of_interest, cropped_volume = None, None
273
- if crop_data:
274
- region_of_interest, cropped_volume = ch.crop_data(bm.path_to_image, bm.path_to_model, bm.path_to_cropped_image,
275
- bm.batch_size, bm.debug_cropping, bm.save_cropped, img_data, bm.x_range, bm.y_range, bm.z_range)
276
-
277
- # load prediction data
278
- img, img_header, z_shape, y_shape, x_shape, region_of_interest, img_data = load_prediction_data(bm.path_to_image,
279
- channels, bm.x_scale, bm.y_scale, bm.z_scale, bm.no_scaling, normalize, normalization_parameters,
280
- region_of_interest, img_data, img_header)
281
-
282
- # make prediction
283
- results, bm = predict_semantic_segmentation(bm, img, bm.path_to_model,
284
- bm.z_patch, bm.y_patch, bm.x_patch, z_shape, y_shape, x_shape, bm.compression, header,
285
- img_header, bm.stride_size, allLabels, bm.batch_size, region_of_interest,
286
- bm.no_scaling, extension, img_data)
287
-
288
- # results
289
- if cropped_volume is not None:
290
- results['cropped_volume'] = cropped_volume
291
-
292
- # path to results
293
- if bm.path_to_image:
294
- path_to_finals.append(bm.path_to_final)
295
-
296
- # write tar file and delete extracted image files
297
- if bm.tmp_dir is not None and os.path.exists(bm.tmp_dir):
298
- with tarfile.open(path_to_dir, 'w') as tar:
299
- for file_path in path_to_finals:
300
- file_name = os.path.basename(file_path)
301
- tar.add(file_path, arcname=file_name)
302
- shutil.rmtree(bm.tmp_dir)
303
- bm.path_to_final = path_to_dir
304
- bm.path_to_cropped_image = None
229
+ # make temporary directory
230
+ with tempfile.TemporaryDirectory() as temp_dir:
231
+
232
+ # extract image files from tar file
233
+ bm.tarfile = False
234
+ if bm.path_to_images is not None and (os.path.splitext(bm.path_to_images)[1]=='.tar' or bm.path_to_images[-7:]=='.tar.gz'):
235
+ bm.tarfile = True
236
+ path_to_result = os.path.dirname(bm.path_to_images) + '/final.'+os.path.basename(bm.path_to_images)
237
+ if path_to_result[-3:]=='.gz':
238
+ path_to_result = path_to_result[:-3]
239
+ if bm.django_env and not bm.remote:
240
+ path_to_result = unique_file_path(path_to_result)
241
+ tar = tarfile.open(bm.path_to_images)
242
+ tar.extractall(path=temp_dir)
243
+ tar.close()
244
+ bm.path_to_images = temp_dir
245
+ bm.save_cropped, bm.acwe = False, False
246
+ bm.clean, bm.fill = None, None
247
+
248
+ # list of images
249
+ path_to_finals = []
250
+ if bm.path_to_images is not None and os.path.isdir(bm.path_to_images):
251
+ files = glob.glob(bm.path_to_images+'/**/*', recursive=True)
252
+ bm.path_to_images = [f for f in files if os.path.isfile(f)]
253
+ else:
254
+ bm.path_to_images = [bm.path_to_images]
255
+
256
+ # loop over all images
257
+ for bm.path_to_image in bm.path_to_images:
258
+
259
+ # create path_to_final
260
+ if bm.path_to_image:
261
+ filename = os.path.basename(bm.path_to_image)
262
+ filename = os.path.splitext(filename)[0]
263
+ if filename[-4:] == '.nii':
264
+ filename = filename[:-4]
265
+ bm.path_to_cropped_image = os.path.dirname(bm.path_to_image) + '/' + filename + '.cropped.tif'
266
+ if bm.django_env and not bm.remote and not bm.tarfile:
267
+ bm.path_to_cropped_image = unique_file_path(bm.path_to_cropped_image)
268
+ filename = 'final.' + filename
269
+ bm.path_to_final = os.path.dirname(bm.path_to_image) + '/' + filename + extension
270
+ if bm.django_env and not bm.remote and not bm.tarfile:
271
+ bm.path_to_final = unique_file_path(bm.path_to_final)
272
+
273
+ # crop data
274
+ region_of_interest, cropped_volume = None, None
275
+ if crop_data:
276
+ region_of_interest, cropped_volume = ch.crop_data(bm.path_to_image, bm.path_to_model, bm.path_to_cropped_image,
277
+ bm.batch_size, bm.debug_cropping, bm.save_cropped, img_data, bm.x_range, bm.y_range, bm.z_range)
278
+
279
+ # load prediction data
280
+ img, img_header, z_shape, y_shape, x_shape, region_of_interest, img_data = load_prediction_data(bm.path_to_image,
281
+ channels, bm.x_scale, bm.y_scale, bm.z_scale, bm.no_scaling, normalize, normalization_parameters,
282
+ region_of_interest, img_data, img_header)
283
+
284
+ # make prediction
285
+ results, bm = predict_semantic_segmentation(bm, img, bm.path_to_model,
286
+ bm.z_patch, bm.y_patch, bm.x_patch, z_shape, y_shape, x_shape, bm.compression, header,
287
+ img_header, bm.stride_size, allLabels, bm.batch_size, region_of_interest,
288
+ bm.no_scaling, extension, img_data)
289
+
290
+ # results
291
+ if cropped_volume is not None:
292
+ results['cropped_volume'] = cropped_volume
293
+
294
+ # path to results
295
+ if bm.path_to_image:
296
+ path_to_finals.append(bm.path_to_final)
297
+
298
+ # write tar file and delete extracted image files
299
+ if bm.tarfile and os.path.exists(temp_dir):
300
+ with tarfile.open(path_to_result, 'w') as tar:
301
+ for file_path in path_to_finals:
302
+ file_name = os.path.basename(file_path)
303
+ tar.add(file_path, arcname=file_name)
304
+ bm.path_to_final = path_to_result
305
+ bm.path_to_cropped_image = None
305
306
 
306
307
  # computation time
307
308
  t = int(time.time() - TIC)
@@ -316,7 +317,7 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
316
317
  # django environment
317
318
  if bm.django_env:
318
319
  from biomedisa_app.config import config
319
- from biomedisa_features.django_env import post_processing
320
+ from biomedisa.features.django_env import post_processing
320
321
  validation=True if bm.validation_split or (bm.val_images is not None and bm.val_images[0] is not None) else False
321
322
  post_processing(bm.path_to_final, time_str, config['SERVER_ALIAS'], bm.remote, bm.queue,
322
323
  img_id=bm.img_id, label_id=bm.label_id, path_to_model=bm.path_to_model,
@@ -324,7 +325,7 @@ def deep_learning(img_data, label_data=None, val_img_data=None, val_label_data=N
324
325
  train=bm.train, predict=bm.predict, validation=validation)
325
326
 
326
327
  # write in log file
327
- path_to_time = BASE_DIR + '/log/time.txt'
328
+ path_to_time = biomedisa.BASE_DIR + '/log/time.txt'
328
329
  with open(path_to_time, 'a') as timefile:
329
330
  if predict:
330
331
  message = 'Successfully segmented ' + bm.shortfilename
@@ -487,7 +488,7 @@ if __name__ == '__main__':
487
488
  reference_image_path = bm.path_to_images
488
489
  bm.username = os.path.basename(os.path.dirname(reference_image_path))
489
490
  bm.shortfilename = os.path.basename(reference_image_path)
490
- bm.path_to_logfile = BASE_DIR + '/log/logfile.txt'
491
+ bm.path_to_logfile = biomedisa.BASE_DIR + '/log/logfile.txt'
491
492
  else:
492
493
  bm.django_env = False
493
494
 
@@ -497,13 +498,9 @@ if __name__ == '__main__':
497
498
  try:
498
499
  deep_learning(None, **kwargs)
499
500
  except InputError:
500
- if any(InputError.img_names):
501
- remove_extracted_data(InputError.img_names, InputError.label_names)
502
501
  print(traceback.format_exc())
503
502
  bm = _error_(bm, f'{InputError.message}')
504
503
  except ch.InputError:
505
- if any(ch.InputError.img_names):
506
- remove_extracted_data(ch.InputError.img_names, ch.InputError.label_names)
507
504
  print(traceback.format_exc())
508
505
  bm = _error_(bm, f'{ch.InputError.message}')
509
506
  except MemoryError:
@@ -1,6 +1,6 @@
1
1
  ##########################################################################
2
2
  ## ##
3
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
3
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
4
4
  ## ##
5
5
  ## This file is part of the open source project biomedisa. ##
6
6
  ## ##
@@ -1,6 +1,6 @@
1
1
  ##########################################################################
2
2
  ## ##
3
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
3
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
4
4
  ## ##
5
5
  ## This file is part of the open source project biomedisa. ##
6
6
  ## ##
@@ -1,6 +1,6 @@
1
1
  ##########################################################################
2
2
  ## ##
3
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
3
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
4
4
  ## ##
5
5
  ## This file is part of the open source project biomedisa. ##
6
6
  ## ##
@@ -1,6 +1,6 @@
1
1
  ##########################################################################
2
2
  ## ##
3
- ## Copyright (c) 2022 Philipp Lösel. All rights reserved. ##
3
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
4
4
  ## ##
5
5
  ## This file is part of the open source project biomedisa. ##
6
6
  ## ##
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/python3
2
2
  ##########################################################################
3
3
  ## ##
4
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
4
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
5
5
  ## ##
6
6
  ## This file is part of the open source project biomedisa. ##
7
7
  ## ##
@@ -27,13 +27,10 @@
27
27
  ## ##
28
28
  ##########################################################################
29
29
 
30
- import sys, os
31
- BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
32
- if not BASE_DIR in sys.path:
33
- sys.path.append(BASE_DIR)
30
+ import os
34
31
  import biomedisa
35
- from biomedisa_features.curvop_numba import curvop, evolution
36
- from biomedisa_features.biomedisa_helper import (unique_file_path, load_data, save_data,
32
+ from biomedisa.features.curvop_numba import curvop, evolution
33
+ from biomedisa.features.biomedisa_helper import (unique_file_path, load_data, save_data,
37
34
  pre_processing, img_to_uint8, silent_remove)
38
35
  import numpy as np
39
36
  import numba
@@ -143,7 +140,7 @@ def activeContour(data, labelData, alpha=1.0, smooth=1, steps=3,
143
140
  if bm.django_env:
144
141
  bm.username = os.path.basename(os.path.dirname(bm.path_to_data))
145
142
  bm.shortfilename = os.path.basename(bm.path_to_data)
146
- bm.path_to_logfile = BASE_DIR + '/log/logfile.txt'
143
+ bm.path_to_logfile = biomedisa.BASE_DIR + '/log/logfile.txt'
147
144
 
148
145
  # pre-processing
149
146
  bm = pre_processing(bm)
@@ -234,13 +231,13 @@ def refinement(bm):
234
231
 
235
232
  def post_processing(path_to_acwe, image_id=None, friend_id=None, simple=False, remote=False):
236
233
  if remote:
237
- with open(BASE_DIR + '/log/config_4', 'w') as configfile:
234
+ with open(biomedisa.BASE_DIR + '/log/config_4', 'w') as configfile:
238
235
  print(path_to_acwe, 'phantom', file=configfile)
239
236
  else:
240
237
  import django
241
238
  django.setup()
242
239
  from biomedisa_app.models import Upload
243
- from biomedisa_features.create_slices import create_slices
240
+ from biomedisa.features.create_slices import create_slices
244
241
  from redis import Redis
245
242
  from rq import Queue
246
243
 
@@ -300,7 +297,7 @@ def init_active_contour(image_id, friend_id, label_id, simple=False):
300
297
 
301
298
  # get host information
302
299
  host = ''
303
- host_base = BASE_DIR
300
+ host_base = biomedisa.BASE_DIR
304
301
  subhost, qsub_pid = None, None
305
302
  if 'REMOTE_QUEUE_HOST' in config:
306
303
  host = config['REMOTE_QUEUE_HOST']
@@ -313,8 +310,8 @@ def init_active_contour(image_id, friend_id, label_id, simple=False):
313
310
  if host:
314
311
 
315
312
  # command
316
- cmd = ['python3', host_base+'/biomedisa_features/active_contour.py']
317
- cmd += [image.pic.path.replace(BASE_DIR,host_base), friend.pic.path.replace(BASE_DIR,host_base)]
313
+ cmd = ['python3', host_base+'/biomedisa/features/active_contour.py']
314
+ cmd += [image.pic.path.replace(biomedisa.BASE_DIR,host_base), friend.pic.path.replace(biomedisa.BASE_DIR,host_base)]
318
315
  cmd += [f'-iid={image.id}', f'-fid={friend.id}', '-r']
319
316
 
320
317
  # command (append only on demand)
@@ -338,8 +335,8 @@ def init_active_contour(image_id, friend_id, label_id, simple=False):
338
335
 
339
336
  # send data to host
340
337
  success=0
341
- success+=send_data_to_host(image.pic.path, host+':'+image.pic.path.replace(BASE_DIR,host_base))
342
- success+=send_data_to_host(friend.pic.path, host+':'+friend.pic.path.replace(BASE_DIR,host_base))
338
+ success+=send_data_to_host(image.pic.path, host+':'+image.pic.path.replace(biomedisa.BASE_DIR,host_base))
339
+ success+=send_data_to_host(friend.pic.path, host+':'+friend.pic.path.replace(biomedisa.BASE_DIR,host_base))
343
340
 
344
341
  if success==0:
345
342
 
@@ -355,14 +352,14 @@ def init_active_contour(image_id, friend_id, label_id, simple=False):
355
352
  subprocess.Popen(cmd).wait()
356
353
 
357
354
  # config
358
- success = subprocess.Popen(['scp', host+':'+host_base+'/log/config_4', BASE_DIR+'/log/config_4']).wait()
355
+ success = subprocess.Popen(['scp', host+':'+host_base+'/log/config_4', biomedisa.BASE_DIR+'/log/config_4']).wait()
359
356
 
360
357
  if success==0:
361
- with open(BASE_DIR + '/log/config_4', 'r') as configfile:
358
+ with open(biomedisa.BASE_DIR + '/log/config_4', 'r') as configfile:
362
359
  acwe_on_host, _ = configfile.read().split()
363
360
 
364
361
  # local file names
365
- path_to_acwe = unique_file_path(acwe_on_host.replace(host_base,BASE_DIR))
362
+ path_to_acwe = unique_file_path(acwe_on_host.replace(host_base,biomedisa.BASE_DIR))
366
363
 
367
364
  # get results
368
365
  subprocess.Popen(['scp', host+':'+acwe_on_host, path_to_acwe]).wait()
@@ -1,6 +1,6 @@
1
1
  ##########################################################################
2
2
  ## ##
3
- ## Copyright (c) 2024 Philipp Lösel. All rights reserved. ##
3
+ ## Copyright (c) 2019-2024 Philipp Lösel. All rights reserved. ##
4
4
  ## ##
5
5
  ## This file is part of the open source project biomedisa. ##
6
6
  ## ##