Skip to content

Commit 5408fff

Browse files
committed
Merge branch 'hotfix'
2 parents d249c8d + 7c3e8f6 commit 5408fff

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

ClearMap.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ dependencies:
3131
- scikit-learn
3232
- graph-tool
3333
- pytorch
34+
- mkl<2024.1 # Breaks pytorch (https://github.com/pytorch/pytorch/issues/123097)
3435
- pip:
3536
- lxml

ClearMap/ImageProcessing/Binary/Smoothing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def smooth_by_configuration_block(source, iterations = 1, verbose = False):
340340
Returns
341341
-------
342342
smoothed : array
343-
Thre smoothed binary array.
343+
The smoothed binary array.
344344
"""
345345
try:
346346
if isinstance(source, io.src.Source):
@@ -360,8 +360,9 @@ def smooth_by_configuration_block(source, iterations = 1, verbose = False):
360360
smoothed = lut[smoothed];
361361

362362
if verbose:
363-
print(f'Binary Smoothing: itertion {i+1} / {iterations} done!', flush=True)
363+
print(f'Binary Smoothing: iteration {i+1} / {iterations} done!', flush=True)
364364
except Exception as err:
365+
print(f"ERROR in smooth_by_configuration")
365366
print(err, flush=True)
366367
raise
367368

ClearMap/processors/generic_tab_processor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import sys
3+
import warnings
34
from concurrent.futures.process import BrokenProcessPool
45

56

@@ -33,6 +34,7 @@ def remove_next_steps_files(self, target_step_name):
3334
for step_name in self.get_next_steps(target_step_name):
3435
f_path = self.path_from_step_name(step_name)
3536
if os.path.exists(f_path):
37+
warnings.warn(f"WARNING: Remove previous step {step_name}, file {f_path}")
3638
os.remove(f_path)
3739

3840
def path(self, step, step_back=False, n_before=0):

ClearMap/processors/tube_map.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _binarize(self, n_processes, clip_range, deconvolve_threshold, channel):
205205
postfix = channel if channel == 'arteries' else None
206206
self.steps[channel].remove_next_steps_files(self.steps[channel].binary)
207207

208-
source = self.workspace.filename('stitched', postfix=postfix)
208+
source = self.workspace.source('stitched', postfix=postfix)
209209
sink = self.workspace.filename('binary', postfix=postfix)
210210

211211
binarization_parameter = copy.deepcopy(vasculature.default_binarization_parameter)
@@ -242,7 +242,7 @@ def smooth(self, channel):
242242

243243
self.steps[channel].remove_next_steps_files(self.steps[channel].postprocessed)
244244

245-
source = self.workspace.filename('binary', postfix=postfix)
245+
source = self.workspace.source('binary', postfix=postfix)
246246
sink_postfix = f'{postfix}_postprocessed' if postfix else 'postprocessed'
247247
sink = self.workspace.filename('binary', postfix=sink_postfix)
248248
sink = initialize_sink(sink, shape=source.shape, dtype=source.dtype, order=source.order,
@@ -340,7 +340,7 @@ def plot_combined(self, parent=None, arrange=False): # TODO: final or not optio
340340
def combine_binary(self):
341341
# MERGE
342342
sink = self.workspace.filename('binary', postfix='combined') # Temporary
343-
if not self.processing_config['binarization']['arteries']['binarization']['run']:
343+
if self.processing_config['binarization']['arteries']['binarization']['run']:
344344
source = self.workspace.filename('binary', postfix='filled')
345345
source_arteries = self.workspace.filename('binary', postfix='arteries_filled')
346346
block_processing.process(np.logical_or, [source, source_arteries], sink,
@@ -494,7 +494,7 @@ def skeletonize_and_build_graph(self):
494494
self.processing_config.reload()
495495
graph_cfg = self.processing_config['graph_construction']
496496
self.skeletonize(self.workspace.filename('skeleton'))# WARNING: main thread (prange)
497-
if graph_cfg['build'] or graph_cfg['skeletonize']:
497+
if graph_cfg['build']:
498498
self._build_graph_from_skeleton() # WARNING: main thread (prange)
499499

500500
def clean_graph(self):

ClearMapUi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies:
3737
- scikit-learn
3838
- graph-tool<=2.45 # Cannot remove self loops with later versions
3939
- pytorch<=1.11
40+
- mkl<2024.1 # Breaks pytorch (https://github.com/pytorch/pytorch/issues/123097)
4041
- cudatoolkit=11.6
4142
- configobj
4243
- natsort

ClearMapUi39.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies:
3737
- scikit-learn
3838
- graph-tool<=2.45 # Cannot remove self loops with later versions
3939
- pytorch<=1.11 # could probably upgrade
40+
- mkl<2024.1 # Breaks pytorch (https://github.com/pytorch/pytorch/issues/123097)
4041
- cudatoolkit=11.6
4142
- configobj
4243
- natsort

0 commit comments

Comments
 (0)