biomedisa 2024.5.17__py3-none-any.whl → 2024.5.19__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biomedisa
3
- Version: 2024.5.17
3
+ Version: 2024.5.19
4
4
  Summary: Segmentation of 3D volumetric image data
5
5
  Author: Philipp Lösel
6
6
  Author-email: philipp.loesel@anu.edu.au
@@ -55,13 +55,8 @@ Biomedisa (https://biomedisa.info) is a free and easy-to-use open-source applica
55
55
 
56
56
  #### Python example
57
57
  ```python
58
- # change this line to your biomedisa directory
59
- path_to_biomedisa = '/home/<user>/git/biomedisa'
60
-
61
- import sys
62
- sys.path.append(path_to_biomedisa)
63
- from biomedisa_features.biomedisa_helper import load_data, save_data
64
- from biomedisa_features.biomedisa_interpolation import smart_interpolation
58
+ from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
59
+ from biomedisa.interpolation import smart_interpolation
65
60
 
66
61
  # load data
67
62
  img, _ = load_data('Downloads/trigonopterus.tif')
@@ -81,11 +76,7 @@ save_data('Downloads/final.trigonopterus.smooth.am', smooth_result, header=heade
81
76
 
82
77
  #### Command-line based
83
78
  ```
84
- # change to the features directory
85
- cd git/biomedisa/biomedisa_features/
86
-
87
- # start smart interpolation
88
- python biomedisa_interpolation.py C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
79
+ python -m biomedisa.interpolation C:\Users\%USERNAME%\Downloads\tumor.tif C:\Users\%USERNAME%\Downloads\labels.tumor.tif
89
80
  ```
90
81
 
91
82
  # Deep Learning
@@ -93,14 +84,8 @@ python biomedisa_interpolation.py C:\Users\%USERNAME%\Downloads\tumor.tif C:\Use
93
84
 
94
85
  #### Python example (training)
95
86
  ```python
96
- # change this line to your biomedisa directory
97
- path_to_biomedisa = '/home/<user>/git/biomedisa'
98
-
99
- # load libraries
100
- import sys
101
- sys.path.append(path_to_biomedisa)
102
- from biomedisa_features.biomedisa_helper import load_data
103
- from biomedisa_features.biomedisa_deeplearning import deep_learning
87
+ from biomedisa.biomedisa_features.biomedisa_helper import load_data
88
+ from biomedisa.deeplearning import deep_learning
104
89
 
105
90
  # load image data
106
91
  img1, _ = load_data('Head1.am')
@@ -129,27 +114,18 @@ deep_learning(img_data, label_data, train=True, batch_size=12,
129
114
 
130
115
  #### Command-line based (training)
131
116
  ```
132
- # change to the features directory
133
- cd git/biomedisa/biomedisa_features/
134
-
135
117
  # start training with a batch size of 12
136
- python biomedisa_deeplearning.py C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs 12
118
+ python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -bs 12
137
119
 
138
120
  # validation (optional)
139
- python biomedisa_deeplearning.py C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi C:\Users\%USERNAME%\Downloads\val_img -vl C:\Users\%USERNAME%\Downloads\val_labels
121
+ python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\training_heart C:\Users\%USERNAME%\Downloads\training_heart_labels -t -vi C:\Users\%USERNAME%\Downloads\val_img -vl C:\Users\%USERNAME%\Downloads\val_labels
140
122
  ```
141
123
  If running into ResourceExhaustedError due to out of memory (OOM), try to use smaller batch size.
142
124
 
143
125
  #### Python example (prediction)
144
126
  ```python
145
- # change this line to your biomedisa directory
146
- path_to_biomedisa = '/home/<user>/git/biomedisa'
147
-
148
- # load libraries
149
- import sys
150
- sys.path.append(path_to_biomedisa)
151
- from biomedisa_features.biomedisa_helper import load_data, save_data
152
- from biomedisa_features.biomedisa_deeplearning import deep_learning
127
+ from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
128
+ from biomedisa.deeplearning import deep_learning
153
129
 
154
130
  # load data
155
131
  img, _ = load_data('Head5.am')
@@ -164,20 +140,14 @@ save_data('final.Head5.am', results['regular'], results['header'])
164
140
 
165
141
  #### Command-line based (prediction)
166
142
  ```
167
- # change to the features directory
168
- cd git/biomedisa/biomedisa_features/
169
-
170
- # start prediction with a batch size of 6
171
- python biomedisa_deeplearning.py C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p -bs 6
143
+ python -m biomedisa.deeplearning C:\Users\%USERNAME%\Downloads\testing_axial_crop_pat13.nii.gz C:\Users\%USERNAME%\Downloads\heart.h5 -p
172
144
  ```
173
145
 
174
146
  # Biomedisa Features
175
147
 
176
148
  #### Load and save data (such as Amira Mesh, TIFF, NRRD, NIfTI or DICOM)
177
149
  ```python
178
- import sys
179
- sys.path.append(path_to_biomedisa) # e.g. '/home/<user>/git/biomedisa'
180
- from biomedisa_features.biomedisa_helper import load_data, save_data
150
+ from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
181
151
 
182
152
  # load data as numpy array
183
153
  # for DICOM, PNG files, or similar formats, 'path_to_data' must reference
@@ -190,10 +160,8 @@ save_data(path_to_data, data, header)
190
160
 
191
161
  #### Create STL mesh from segmentation (label values are saved as attributes)
192
162
  ```python
193
- import os, sys
194
- sys.path.append(path_to_biomedisa) # e.g. '/home/<user>/git/biomedisa'
195
- from biomedisa_features.biomedisa_helper import load_data, save_data
196
- from biomedisa_features.create_mesh import get_voxel_spacing, save_mesh
163
+ from biomedisa.biomedisa_features.biomedisa_helper import load_data, save_data
164
+ from biomedisa.mesh import get_voxel_spacing, save_mesh
197
165
 
198
166
  # load segmentation
199
167
  data, header, extension = load_data(path_to_data, return_extension=True)
@@ -209,7 +177,7 @@ save_mesh(path_to_data, data, x_res, y_res, z_res, poly_reduction=0.9, smoothing
209
177
 
210
178
  #### Create mesh directly
211
179
  ```
212
- python git/biomedisa/biomedisa_features/create_mesh.py <path_to_data>
180
+ python -m biomedisa.mesh <path_to_data>
213
181
  ```
214
182
 
215
183
  #### Options
@@ -225,9 +193,7 @@ python git/biomedisa/biomedisa_features/create_mesh.py <path_to_data>
225
193
 
226
194
  #### Resize data
227
195
  ```python
228
- import os, sys
229
- sys.path.append(path_to_biomedisa) # e.g. '/home/<user>/git/biomedisa'
230
- from biomedisa_features.biomedisa_helper import img_resize
196
+ from biomedisa.biomedisa_features.biomedisa_helper import img_resize
231
197
 
232
198
  # resize image data
233
199
  zsh, ysh, xsh = data.shape
@@ -240,7 +206,7 @@ label_data = img_resize(label_data, new_zsh, new_ysh, new_xsh, labels=True)
240
206
 
241
207
  #### Remove outliers and fill holes
242
208
  ```python
243
- from biomedisa_features.biomedisa_helper import clean, fill
209
+ from biomedisa.biomedisa_features.biomedisa_helper import clean, fill
244
210
 
245
211
  # delete outliers smaller than 90% of the segment
246
212
  label_data = clean(label_data, 0.9)
@@ -251,24 +217,28 @@ label_data = fill(label_data, 0.9)
251
217
 
252
218
  #### Accuracy assessment
253
219
  ```python
254
- from biomedisa_features.biomedisa_helper import Dice_score, ASSD
220
+ from biomedisa.biomedisa_features.biomedisa_helper import Dice_score, ASSD
255
221
  dice = Dice_score(ground_truth, result)
256
222
  assd = ASSD(ground_truth, result)
257
223
  ```
258
224
 
259
225
  # Update Biomedisa
260
- If you have used `git clone`, change to the Biomedisa directory and make a pull request.
226
+ If you installed Biomedisa via Pip
227
+ ```
228
+ pip install --upgrade biomedisa
229
+ ```
230
+ If you used `git clone`, change to the Biomedisa directory and make a pull request
261
231
  ```
262
232
  cd git/biomedisa
263
233
  git pull
264
234
  ```
265
235
 
266
- If you have installed the browser based version of Biomedisa (including MySQL database), you also need to update the database.
236
+ If you installed the browser based version of Biomedisa (including MySQL database), you also need to update the database
267
237
  ```
268
238
  python manage.py migrate
269
239
  ```
270
240
 
271
- If you have installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server.
241
+ If you installed an [Apache Server](https://github.com/biomedisa/biomedisa/blob/master/README/APACHE_SERVER.md), you need to restart the server
272
242
  ```
273
243
  sudo service apache2 restart
274
244
  ```
@@ -1,6 +1,6 @@
1
1
  biomedisa/__init__.py,sha256=BLbuGv-c8I8XMzOOnc07qrcWxq8CUA5NM73S3gkixEI,1690
2
2
  biomedisa/__main__.py,sha256=a1--8vhtztWEloHVtbM43FZLCfrFo4BELgdsgtWE8ls,536
3
- biomedisa/deeplearning.py,sha256=eobgRva1ucb1IKpj7SNxmBOsWdZCPAJ-BNbIKnApNeA,27063
3
+ biomedisa/deeplearning.py,sha256=jh6LivGgWSjIoz_2bm-kfnyq90EMiLZwuh6T8Ldj738,27136
4
4
  biomedisa/interpolation.py,sha256=mz5Ieiee2RftqisqNzKcCU7IV1n0LGON4zyhvBwE94s,17335
5
5
  biomedisa/mesh.py,sha256=6f5klVPoA3zmF3jxLCOUkCXelLtlroS6tJquRHaMwsQ,15920
6
6
  biomedisa/biomedisa_features/DataGenerator.py,sha256=FTktX35_FboSzk4UXG_ZN58xXYJqwjX_7ZJ65bzNuFs,12770
@@ -10,12 +10,12 @@ biomedisa/biomedisa_features/PredictDataGeneratorCrop.py,sha256=JBwFcOZMakNMlL5U
10
10
  biomedisa/biomedisa_features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  biomedisa/biomedisa_features/active_contour.py,sha256=PUAfCzHKU-p7xeQoWxmDh0ZFbnInXEsafgeE1k-96d0,18131
12
12
  biomedisa/biomedisa_features/assd.py,sha256=cXHAhwJqhwOvzgTodlQb21NvYafWTjBJ7_H_icuBNMU,6537
13
- biomedisa/biomedisa_features/biomedisa_helper.py,sha256=fY7kHLg5VBLF4f_W-p9tZaeqZn6wCq9OHPImZC41GRU,32401
14
- biomedisa/biomedisa_features/create_slices.py,sha256=gQJev1-DXvqDchGbnLC1bsCtb1gAnv4D82IgOnCJVt8,13329
15
- biomedisa/biomedisa_features/crop_helper.py,sha256=Op8x10IltAR_5YMotuVHzF3hSbxiOkAchhJM5L0qutw,23894
13
+ biomedisa/biomedisa_features/biomedisa_helper.py,sha256=OhsjzMUhtGLpeo95zU23_LVSyCKcuMm6rXlzG_QO0hk,32294
14
+ biomedisa/biomedisa_features/create_slices.py,sha256=lPYdA2AgwVUJmW94EKrSjKF_lkf7_ROFRSlnLLTQ1EY,13098
15
+ biomedisa/biomedisa_features/crop_helper.py,sha256=jcvMysMfCbarDzayTkc6rY5Tv3Mx37k00yyzSc4Nphw,24533
16
16
  biomedisa/biomedisa_features/curvop_numba.py,sha256=9jc4OvHQ6JDN-DaFhRQMLpBDU85HhqzX_YUVBf3Q3vA,7049
17
17
  biomedisa/biomedisa_features/django_env.py,sha256=S-ajQpw5A2aBlTYgn_FiyIr02QH05rInzhBDulb9lNg,8989
18
- biomedisa/biomedisa_features/keras_helper.py,sha256=J4VZNPgdoQSH5wnCcdkubRhxquNmPOUzEAlSkTZltuw,50343
18
+ biomedisa/biomedisa_features/keras_helper.py,sha256=49LTHH_Jn9fyIe5B9uounQNXA86qPjSsvtKAhuEg8qs,50321
19
19
  biomedisa/biomedisa_features/nc_reader.py,sha256=7uwdmz4pLC__xb8hWjZ7Y9jrkNJOyD01kIA1EOP8GV0,7406
20
20
  biomedisa/biomedisa_features/pid.py,sha256=HAIq52F-PKwDGRyKE74qsY-bdBTs1s85vcIQTKaMIy8,2528
21
21
  biomedisa/biomedisa_features/process_image.py,sha256=yxBC3ACV2umscEycXZtY9Hsi1ATws7omnvXROEDfQfA,11159
@@ -37,8 +37,8 @@ biomedisa/biomedisa_features/random_walk/pyopencl_large.py,sha256=cOBhvxrdKCkbr6
37
37
  biomedisa/biomedisa_features/random_walk/pyopencl_small.py,sha256=2XALYNNv9D8Gb1u2lcjR1O4W9UM0Xxjj0r4nr-NiEkk,17068
38
38
  biomedisa/biomedisa_features/random_walk/rw_large.py,sha256=FERIsTXmqZprGCTShRR75PesIX5MMVtptk-SqI-4abo,19805
39
39
  biomedisa/biomedisa_features/random_walk/rw_small.py,sha256=0YFL0Ovb_400Ikbxv5yOXWskl3vAyfQ_0_Gz5EXzvVQ,14881
40
- biomedisa-2024.5.17.dist-info/LICENSE,sha256=sehayP6UhydNnmstfL4yFR3genMRdpuUh6uZVWJN1H0,14152
41
- biomedisa-2024.5.17.dist-info/METADATA,sha256=bK2cYJrYfbZGh63SVp6RuZweIX8OPHEda9gAmmIsM_E,11677
42
- biomedisa-2024.5.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
43
- biomedisa-2024.5.17.dist-info/top_level.txt,sha256=opsf1Eb4vCguPSxev4HHSeiUKCccT_C_RcUCdAYbHWQ,10
44
- biomedisa-2024.5.17.dist-info/RECORD,,
40
+ biomedisa-2024.5.19.dist-info/LICENSE,sha256=sehayP6UhydNnmstfL4yFR3genMRdpuUh6uZVWJN1H0,14152
41
+ biomedisa-2024.5.19.dist-info/METADATA,sha256=81H289XkDEGCBCcKyRtjUVoohr8kZIY1PIquZr9RM_Q,10696
42
+ biomedisa-2024.5.19.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
43
+ biomedisa-2024.5.19.dist-info/top_level.txt,sha256=opsf1Eb4vCguPSxev4HHSeiUKCccT_C_RcUCdAYbHWQ,10
44
+ biomedisa-2024.5.19.dist-info/RECORD,,