m-albert / MVRegFus

Python module for registering and fusing multi-view microscopy data
BSD 3-Clause "New" or "Revised" License
23 stars 4 forks source link

'Array' object has no attribute 'origin' #8

Closed WhoIsJack closed 12 months ago

WhoIsJack commented 2 years ago

Hi Marvin,

I wanted to try this out for some test data I've recently collected, but ran into some trouble.

First, as an aside, installation of the dependencies using conda (freshly installed and updated) on our instrument's Windows 10 Enterprise LTSC processing PC did not work using conda env create --file MVRegFus/mv_environment.yml (got stuck at solving environment, same with mv_environment_windows.yml). I had to manually make an empty env (conda create -n mvfusreg python=3.7) and then install the dependencies step by step for it to work. Could be because conda is now on python 3.9, but note that conda env create --file MVRegFus/mv_environment.yml python=3.7 also didn't work.

Second, and more importantly, now that the installation is complete I am trying to run it with the configurations as pasted below. Not sure if everything is correct; the input file is a single-timepoint, 3-color (1st channel DAPI), 3D stack with 3 views (each rotated by 120 degrees) acquired using ZEN 3.1 (Blue) version 3.1.0.00002. I'd like to register and fuse views 1 and 2 onto view 0.

Please let me know if there's something obviously wrong in the configurations. See below for the error I get when I run it.

Configurations ```python ########################## #### parameters to modify #### approx. in descending order of relevance ########################## # where elastix can be found (top folder) elastix_dir = r'D:\SWAP\Jonas\_software\elastix' # list of files to fuse filepaths = [r'D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi'] # where to save the output out_dir = os.path.dirname(filepaths[0]) # e.g. same folder as first file in filepaths # channels to fuse channels = [0,1,2] channelss = [channels]*len(filepaths) # channel to use for registration reg_channel = 0 reg_channels = [reg_channel] *len(filepaths) # reference view for final fusion ref_view = 0 ref_views = [ref_view] *len(filepaths) # list of pairwise view indices to perform registration on registration_pairs = [[0,1], [0,2]] #registration_pairs = None registration_pairss = [registration_pairs] *len(filepaths) # optionally, specify the meanings of the indices # occuring in the list of pairs # this can be used to fuse illuminations independently # using view_dict, which is a dictionary containing # the indices as keys and dictionaries defining the indices as items, such as: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : 1 # illumination 1 within that view # } # another example: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : None # like this, both ills of this view are fused using the average of ills # } # another example: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : 2 # like this, both ills of this view are fused using blending weights # } # in case of treating ills as independent views: # - illumination 0 comes from left # - illumination 1 comes from right # - rotating in positive direction (in angles) # brings left to the front # so it makes sense to define the registration pairs like this: (view, ill) # (0,1),(0,0) # (0,0),(1,1) # (1,1),(1,0) # (1,0),(2,1) # etc. # four view example: view_dict = {i:{'view':i, 'ill': 0} for i in [0, 1, 2]} # if ills of all views should be averaged, set view_dict to None: #view_dict = None # how to calculate final fusion volume # 'sample': takes best quality z plane of every view to define the volume # 'union': takes the union of all view volumes final_volume_mode = 'sample' # whether to perform an affine chromatic correction # and which channel to use as reference perform_chromatic_correction = False ref_channel_chrom = 0 # binning of raw input from views (x,y,z) # [1,1,1]: no binning # shapes of views to be registered should not significantly # exceed ~(400, 400, 400) raw_input_binning = [5,5,2] # background level to subtract background_level = 200 # which binning to use for registration #mv_registration_bin_factors = np.array([1,1,1]) mv_registration_bin_factors = np.array([4,4,4]) # registration mode for pairwise view registration # (default is 2) # -1: only preregistration (translation, no elastix) # 0: only translation # 1: translation + rotation # 2: translation + rotation + affine pairwise_registration_mode = 2 # final output spacing in um mv_final_spacing = np.array([1.]*3) # options for fusion # fusion_method # 'weighted_average': weighted average of views using the given weights # 'LR': Lucy-Richardson multi-view deconvolution fusion_method = 'LR' # fusion_method = 'weighted_average' # fusion weights # 'blending': uniform weights with blending at the stack borders # 'dct': weights derived from DCT image quality metric # fusion_weights = 'dct' fusion_weights = 'blending' # options for DCT image quality metric for fusion # setting None automatically calculates good values # size of the cubic volume blocks on which to calc quality dct_size = None # size of maximum filter kernel dct_max_kernel = None # size of gaussian kernel dct_gaussian_kernel = None # weight normalisation parameters # normalise such that approx. weight is # contained in the best views dct_how_many_best_views = 2 dct_cumulative_weight_best_views = 0.9 # options for weighted Lucy Richardson multi-view deconvolution # maximum number of iterations LR_niter = 25 # iters # convergence criterion LR_tol = 5e-5 # tol # gaussian PSF sigmas LR_sigma_z = 4 # sigma z LR_sigma_xy = 0.5 # sigma xy ########################## #### end of parameters to modify ########################## ```
Output and errors ``` (mvregfus) D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw>python mvregfus_run.py http://localhost:8787 D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\numpy\core\fromnumeric.py:86: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. return ufunc.reduce(obj, axis, dtype, out, **passkwargs) These pairs of keys will be registered: [[0, 1], [0, 2]] They refer to the keys in 'view_dict': {0: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 0}, 1: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 1}, 2: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 2}} INFO: setting registration degree to 2 (trans+rot+aff) Skipping groupwise registration! DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mv_input_view_000_000_v000_c02.zarr reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 0 ch 2 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 640 1920 1920 new shape: 320 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mv_input_view_000_000_v001_c02.zarr reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 1 ch 2 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 473 1920 1920 new shape: 236 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mv_input_view_000_000_v002_c02.zarr reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 2 ch 2 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 477 1920 1920 new shape: 238 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mv_input_view_000_000_v001_c01.zarr reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 1 ch 1 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 473 1920 1920 new shape: 236 384 384 DECORATOR local... bin_stack Traceback (most recent call last): File "mvregfus_run.py", line 235, in results.append(io_utils.get(graph, result_keys[i:i + N * len(channels)])) File "d:\swap\jonas\_software\mvregfus\mvregfus\io_utils.py", line 31, in get return dask.local.get_sync(cgraph,key) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 220, in execute_task result = _execute_task(task, data) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "d:\swap\jonas\_software\mvregfus\mvregfus\io_utils.py", line 514, in full_func result = func(*nargs, **kwargs) File "d:\swap\jonas\_software\mvregfus\mvregfus\multiview.py", line 444, in bin_stack origin = im.origin AttributeError: 'Array' object has no attribute 'origin' ```

Any ideas? 🙃

m-albert commented 2 years ago

Hi Jonas, thanks a lot for posting this issue!

It's very useful to know there seems to be a problem when installing using the conda yml files. Will have a look at this, thanks! Great you managed to install the dependencies yourself.

Concerning your fusion run, first of all the configuration file looks good to me. The error you see indicates that during processing, an intermediate file is read in as a generic array rather than an 'ImageArray' (which is a numpy array additionally equipped with some attributes such as origin and spacing).

I currently don't have access to my MVRegFus testbench until next week. However, I just went through the code and have a suggestion for you to try in the meantime. Namely, you could try by modifying a line in mvregfus/mv_graph.py: Uncomment line 31 and use the commented line 30 instead. It could be that saving intermediate images as zarr files is creating a problem in this configuration, and falling back to an ".imagear.h5" extension could prevent it. I'm hoping this could already help, otherwise I'll have a better look early next week.

WhoIsJack commented 2 years ago

Thanks for the swift and helpful response, Marvin!

I have applied the hotfix you suggested and - lo and behold - it runs!

Or at least it ran further than before. I then experienced another error during fusion, see below. After changing from fusion_method = 'LR' to fusion_method = 'weighted_average', it ran all the way through with no errors! 🎉

I gotta say you've done a great job with this thing! Installation issues and stability aside, and notwithstanding the somewhat arcane config file, this is a great piece of software! Loosely compared to Fiji's Multiview Reconstruction plugin, which I'm also currently trying out, your MVRegFus...

Anyway, I think more people should know about this piece of software; multi-view registration and fusion still seems to be a major bottleneck for ordinary users (esp. on the ZEISS Z1, where the built-in processing options are pretty much non-functional).

Anyway, would be cool to try the deconvolution. Here's the error I got:

Click to expand ``` DECORATOR local... fuse_blockwise fusion block overlap: 16.0 CuPy available, using single host thread for fusion fusing views... distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-7082fa2b-613a-451e-9f02-96621ebf9035, (, [array([[[[12, 13, 14, ..., 6, 8, 10], [13, 14, 16, ..., 7, 8, 10], [14, 16, 17, ..., 8, 9, 10], ..., [ 7, 9, 10, ..., 6, 7, 8], [ 7, 9, 10, ..., 6, 7, 8], [ 8, 9, 11, ..., 6, 7, 7]], [[12, 13, 14, ..., 6, 7, 9], [13, 14, 15, ..., 7, 8, 9], [14, 15, 16, ..., 8, 9, 10], ..., [ 7, 9, 10, ..., 6, 7, 8], [ 8, 9, 10, ..., 6, 7, 8], [ 8, 9, 10, ..., 6, 7, 7]], [[12, 13, 14, ..., 6, 7, 8], [13, 14, 15, ..., 7, 8, 9], [13, 15, 16, ..., 9, 9, 10], ..., [ 8, 9, 11, ..., 7, 7, 7], [ 8, 9, 11, ..., 7, 7, 7], [ 8, 9, 10, ..., 7, 7, 7]], ..., [[ 7, 8, 9, ..., 5, 6, 6], [ 8, 9, 10, ..., 5, 6, 6], [ 8, 9, 11, ..., kwargs: {} Exception: 'AssertionError()' distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-7082fa2b-613a-451e-9f02-96621ebf9035, (, [array([[[[ 2, 3, 4, ..., 1, 1, 2], [ 2, 3, 4, ..., 1, 1, 1], [ 2, 3, 4, ..., 0, 1, 1], ..., [ 2, 3, 4, ..., 1, 1, 2], [ 2, 3, 4, ..., 1, 2, 2], [ 1, 2, 3, ..., 1, 2, 3]], [[ 2, 3, 4, ..., 1, 2, 2], [ 2, 3, 4, ..., 1, 1, 2], [ 2, 3, 4, ..., 0, 1, 2], ..., [ 2, 3, 4, ..., 1, 2, 3], [ 2, 3, 3, ..., 1, 2, 3], [ 2, 2, 3, ..., 1, 2, 4]], [[ 2, 3, 4, ..., 1, 2, 3], [ 2, 4, 5, ..., 1, 2, 2], [ 2, 4, 5, ..., 1, 1, 2], ..., [ 2, 3, 4, ..., 1, 2, 3], [ 2, 3, 3, ..., 1, 3, 4], [ 2, 3, 3, ..., 2, 3, 4]], ..., [[ 2, 4, 5, ..., 1, 1, 1], [ 3, 4, 5, ..., 1, 1, 2], [ 3, 4, 6, ..., kwargs: {} Exception: 'AssertionError()' distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-7082fa2b-613a-451e-9f02-96621ebf9035, (, [array([[[[ 6, 6, 6, ..., 4, 4, 5], [ 6, 6, 6, ..., 4, 4, 4], [ 6, 6, 7, ..., 4, 4, 4], ..., [ 4, 3, 3, ..., 4, 4, 4], [ 4, 3, 3, ..., 4, 4, 4], [ 4, 3, 3, ..., 4, 3, 4]], [[ 7, 6, 6, ..., 4, 4, 5], [ 6, 6, 6, ..., 4, 4, 4], [ 6, 6, 7, ..., 4, 3, 4], ..., [ 4, 4, 3, ..., 4, 4, 4], [ 4, 3, 3, ..., 4, 4, 4], [ 4, 3, 3, ..., 4, 4, 4]], [[ 6, 6, 6, ..., 4, 4, 4], [ 6, 6, 7, ..., 4, 4, 4], [ 6, 6, 7, ..., 4, 4, 4], ..., [ 4, 4, 4, ..., 4, 4, 4], [ 4, 4, 4, ..., 4, 4, 4], [ 4, 4, 4, ..., 4, 3, 4]], ..., [[ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., kwargs: {} Exception: 'AssertionError()' distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-7082fa2b-613a-451e-9f02-96621ebf9035, (, [array([[[[ 6, 5, 4, ..., 0, 0, 0], [ 4, 3, 3, ..., 0, 0, 0], [ 4, 2, 2, ..., 0, 0, 0], ..., [ 5, 5, 4, ..., 0, 0, 0], [ 5, 5, 4, ..., 0, 0, 0], [ 4, 5, 4, ..., 0, 0, 0]], [[ 6, 5, 5, ..., 0, 0, 0], [ 5, 4, 3, ..., 0, 0, 0], [ 4, 3, 2, ..., 0, 0, 0], ..., [ 5, 5, 4, ..., 0, 0, 0], [ 5, 5, 4, ..., 0, 0, 0], [ 5, 5, 4, ..., 0, 0, 0]], [[ 6, 5, 5, ..., 0, 0, 0], [ 5, 4, 3, ..., 0, 0, 0], [ 4, 3, 3, ..., 0, 0, 0], ..., [ 5, 5, 5, ..., 0, 0, 0], [ 5, 5, 5, ..., 0, 0, 0], [ 5, 5, 5, ..., 0, 0, 0]], ..., [[ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., kwargs: {} Exception: 'AssertionError()' Traceback (most recent call last): File "mvregfus_run.py", line 236, in results.append(io_utils.get(graph, result_keys[i:i + N * len(channels)])) File "d:\swap\jonas\_software\mvregfus\mvregfus\io_utils.py", line 31, in get return dask.local.get_sync(cgraph,key) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 220, in execute_task result = _execute_task(task, data) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "d:\swap\jonas\_software\mvregfus\mvregfus\multiview.py", line 4453, in fuse_blockwise_and_write_out da.to_zarr(result, fn, overwrite=True)#, scheduler=dask_scheduler) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 3420, in to_zarr return arr.store(z, lock=False, compute=compute, return_stored=return_stored) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 1597, in store r = store([self], [target], **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 1076, in store compute_as_if_collection(Array, store_dsk, map_keys, **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\base.py", line 315, in compute_as_if_collection return schedule(dsk2, keys, **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 2693, in get results = self.gather(packed, asynchronous=asynchronous, direct=direct) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 1975, in gather asynchronous=asynchronous, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 866, in sync self.loop, func, *args, callback_timeout=callback_timeout, **kwargs File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\utils.py", line 327, in sync raise exc.with_traceback(tb) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\utils.py", line 310, in f result[0] = yield future File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\tornado\gen.py", line 769, in run value = future.result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 1834, in _gather raise exception.with_traceback(traceback) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\optimization.py", line 969, in __call__ return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args))) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 149, in get result = _execute_task(task, cache) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\dask\utils.py", line 35, in apply return func(*args, **kwargs) File "d:\swap\jonas\_software\mvregfus\mvregfus\multiview.py", line 5934, in fuse_LR_with_weights_np psfs = np.array([get_psf(params[ip], spacing, sz, sxy) for ip in range(len(params))]) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus\lib\site-packages\cupy\_creation\from_data.py", line 46, in array return _core.array(obj, dtype, copy, order, subok, ndmin) File "cupy\_core\core.pyx", line 2357, in cupy._core.core.array File "cupy\_core\core.pyx", line 2378, in cupy._core.core.array File "cupy\_core\core.pyx", line 2442, in cupy._core.core._array_from_nested_sequence AssertionError ```
m-albert commented 2 years ago

Great that we're on to the next step! And that the full processing pipeline ran through at least for the (non-deconvolution) additive fusion.

I'm glad to hear that so far the code seems useful to you. Indeed there are some stability and installation issues. Regarding the configuration file I also agree that it's suboptimal and not entirely straight forward to get used to. But as you say, the idea is that after setting some basic parameters the processing is relatively automatised, at least for a "classical" Z1/Z7 multi-view dataset. In the near future I'm planning to write a napari plugin that builds upon this code (including some refactoring, clean-up and testing), hoping to make its functionality more accessible.

Yes, as you mention the fusion doesn't require beads to be present in the sample. For registration, making use of the .czi metadata plus performing a sequential registration works well. And for the reconstruction, a simple gaussian-shaped psf is used. There's a default value for its extension along the xy and z dimensions (LR_sigma_z=4 and LR_sigma_xy = 0.5 in the configuration file) which one could vary, and generally this seems to work relatively well. One could argue that precisely measuring the PSF for thick multi-view specimens has only limited utility, as 1) this is typically done outside of the specimen and the psf deteriorates quickly within the sample and 2) the psf also varies along the light-sheet. Preibisch et al. also mention in their publication that they don't see precise psf estimation to play an important role in obtaining sharper reconstructions.

Regarding the error you're experiencing: Unfortunately it's not clear to me what is happening (also it could be that traceback is obfuscated by dask). The problem obviously seems to be occurring within cupy. That could mean there's a bug in the code that calls cupy wrongly, or it could mean there's a problem downstream of the way cupy is used in the code. So until I can test the code with a fresh install on a windows machine, a suggestion could be the following: Uninstall cupy from the mvregfus environment and try again. There'd be no GPU acceleration, but there's a chance it runs through.

A quick note regarding the 'blending' vs 'dct' settings for fusion_weights: 'blending' creates additive weights for each view that simply take care of smoothly blending views into each other at their boundaries. 'dct' also performs blending, but in addition to that weighs each view according to its relative image quality. In my experience this improves final reconstruction quality (in some cases substantially). However on the flip side using 'dct' also increases processing time significantly.

WhoIsJack commented 2 years ago

Thanks for the additional info! Definitely agree that a napari plugin would be a great way of making this tool more accessible. 👍

Regarding the error, running it without cupy does indeed work! It does take very long indeed, though, and whilst the output looks pretty good, I'd like to try a few optimizations, which is gonna be rough without the GPU speed gains, so hoping that you might be able to figure out a solution.

On that note, I should also mention that I've had further conda problems when uninstalling cupy, so maybe this error is related to my installation issues earlier on? I'm using a fresh install of the latest version of miniconda on this machine, which seems to have stability issues. Maybe I should try reinstalling everything with an older version of conda?

Side note: When running without cupy, the message CuPy NOT available, using multiple threads for fusion is printed many many times. Probably not intended behavior. 🙃

WhoIsJack commented 1 year ago

Hi Marvin, and a belated Happy New Year!

So I've given this a fresh start, hoping to get it to work with cupy, as otherwise it's just too slow. Unfortunately, I ran into the same error again (though context is a bit different). Giving you a detailed report here in case that helps with potentially resolving this!

Installation details - Grabbed a new copy of the repo on 28.01.2023 - `conda env create --file MVRegFus/mv_environment_windows.yml` still gets conda stuck indefinitely at solving the environment - Instead, I did the following, which worked without any notable hick-ups: - `conda create -n mvregfus2 python=3.7` - `conda activate mvregfus2` - `conda install [...]` [in batches:] - `numpy scipy scikit-learn pandas dask cupy` - `distributed bcolz scikit-image tifffile dipy h5py h5pickle` - `matplotlib bokeh ipython jupyter` - `pip install SimpleITK` - Ensure elastix is placed as the installation guide says - `pip install -e ./MVRegFus` - However, trying to run mvregfus afterwards got me this error: ```python File "h5py\h5.pyx", line 1, in init h5py.h5 ImportError: DLL load failed while importing defs: The specified procedure could not be found. ``` - I was able to resolve this (based on StackOverflow) advice by doing: - `conda install h5py=3.6.0 -c pkgs/main` - This leaves me with the following `conda list`: ``` (mvregfus2) C:\Users\zeiss>conda list # packages in environment at D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2: # # Name Version Build Channel aicspylibczi 3.0.5 pypi_0 pypi argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py37hcc03f2d_2 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge bcolz 1.2.1 py37he350917_1001 conda-forge beautifulsoup4 4.11.1 pyha770c72_0 conda-forge bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.0 h0e60522_0 conda-forge bokeh 2.4.3 pyhd8ed1ab_3 conda-forge bottleneck 1.3.5 py37h3a130e4_0 conda-forge brotli 1.0.9 hcfcfb64_8 conda-forge brotli-bin 1.0.9 hcfcfb64_8 conda-forge bzip2 1.0.8 h8ffe710_4 conda-forge ca-certificates 2023.01.10 haa95532_0 cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cachetools 5.3.0 pyhd8ed1ab_0 conda-forge certifi 2022.12.7 py37haa95532_0 cffi 1.15.1 py37ha95fbe2_1 conda-forge click 8.1.3 py37h03978a9_0 conda-forge cloudpickle 2.2.1 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge cudatoolkit 11.8.0 h09e9e62_11 conda-forge cupy 11.2.0 py37h72a7169_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge cytoolz 0.12.0 py37hcc03f2d_0 conda-forge czifile 2019.7.2 pypi_0 pypi dask 2021.10.0 pyhd8ed1ab_0 conda-forge dask-core 2021.10.0 pyhd3eb1b0_0 anaconda debugpy 1.5.1 py37hd77b12b_0 anaconda decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge dipy 1.3.0 py37hda4c797_0 conda-forge distributed 2021.10.0 py37haa95532_0 anaconda entrypoints 0.4 pyhd8ed1ab_0 conda-forge fastrlock 0.8 py37hf2a7229_2 conda-forge flit-core 3.8.0 pyhd8ed1ab_0 conda-forge fonttools 4.38.0 py37h51bd9d9_0 conda-forge freetype 2.10.4 h546665d_1 conda-forge fsspec 2023.1.0 pyhd8ed1ab_0 conda-forge h5pickle 0.4.2 pyh9f0ad1d_0 conda-forge h5py 3.6.0 py37h3de5c98_0 anaconda hdf5 1.10.6 nompi_he0bbb20_101 conda-forge heapdict 1.0.1 py_0 conda-forge icu 58.2 vc14hc45fdbb_0 [vc14] anaconda imagecodecs 2021.11.20 pypi_0 pypi imagecodecs-lite 2019.12.3 py37h0b711f8_5 conda-forge imageio 2.25.0 pyh24c5eb1_0 conda-forge importlib-metadata 4.11.4 py37h03978a9_0 conda-forge intel-openmp 2023.0.0 h57928b3_25922 conda-forge ipykernel 6.15.0 pyh025b116_0 conda-forge ipympl 0.9.2 pypi_0 pypi ipython 7.33.0 py37h03978a9_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 8.0.4 pyhd8ed1ab_0 conda-forge jedi 0.18.2 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.2.0 pyhd8ed1ab_0 conda-forge jpeg 9b vc14h4d7706e_1 [vc14] anaconda jsonschema 2.6.0 py37_1002 conda-forge jupyter 1.0.0 py37h03978a9_7 conda-forge jupyter_client 7.0.6 pyhd8ed1ab_0 conda-forge jupyter_console 6.4.4 pyhd8ed1ab_0 conda-forge jupyter_core 4.10.0 py37haa95532_0 anaconda jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_widgets 3.0.5 pyhd8ed1ab_0 conda-forge kiwisolver 1.4.4 py37h8c56517_0 conda-forge libblas 3.9.0 16_win64_mkl conda-forge libbrotlicommon 1.0.9 hcfcfb64_8 conda-forge libbrotlidec 1.0.9 hcfcfb64_8 conda-forge libbrotlienc 1.0.9 hcfcfb64_8 conda-forge libcblas 3.9.0 16_win64_mkl conda-forge liblapack 3.9.0 16_win64_mkl conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libsqlite 3.40.0 hcfcfb64_0 conda-forge libtiff 4.0.8 vc14h04e2a1e_10 [vc14] anaconda libwebp 1.2.4 hcfcfb64_1 conda-forge libwebp-base 1.2.4 h8ffe710_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge markupsafe 2.1.1 py37hcc03f2d_1 conda-forge matplotlib 3.5.3 py37h03978a9_2 conda-forge matplotlib-base 3.5.3 py37h54234da_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mistune 2.0.4 pyhd8ed1ab_0 conda-forge mkl 2022.1.0 h6a75c08_874 conda-forge mock 5.0.1 pyhd8ed1ab_0 conda-forge msgpack-python 1.0.4 py37h8c56517_0 conda-forge msys2-conda-epoch 20160418 1 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mvregfus 0.1 dev_0 nbclient 0.6.8 pyhd8ed1ab_0 conda-forge nbconvert 7.2.9 pyhd8ed1ab_0 conda-forge nbconvert-core 7.2.9 pyhd8ed1ab_0 conda-forge nbconvert-pandoc 7.2.9 pyhd8ed1ab_0 conda-forge nbformat 5.7.3 pyhd8ed1ab_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge networkx 2.6.3 pyhd8ed1ab_1 conda-forge nibabel 4.0.2 pyhd8ed1ab_0 conda-forge notebook 6.3.0 py37h03978a9_0 conda-forge numexpr 2.7.3 py37h9386db6_2 conda-forge numpy 1.21.6 py37h2830a78_0 conda-forge openssl 1.1.1s h2bbff1b_0 packaging 23.0 pyhd8ed1ab_0 conda-forge pandas 1.3.5 py37h6214cd6_0 anaconda pandoc 2.19.2 h57928b3_1 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge partd 1.3.0 pyhd8ed1ab_0 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 9.3.0 py37hdc2b20a_1 pip 22.3.1 pyhd8ed1ab_0 conda-forge ply 3.11 py_1 conda-forge prometheus_client 0.16.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.36 pyha770c72_0 conda-forge prompt_toolkit 3.0.36 hd8ed1ab_0 conda-forge psutil 5.9.3 py37h51bd9d9_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pydicom 2.3.1 pyh1a96a4e_0 conda-forge pygments 2.14.0 pyhd8ed1ab_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyqt 5.9.2 py37ha878b3d_0 anaconda pyreadline 2.1 py37h03978a9_1006 conda-forge pytables 3.6.1 py37hdc91d43_3 conda-forge python 3.7.12 h7840368_100_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.16.2 pyhd8ed1ab_0 conda-forge python_abi 3.7 3_cp37m conda-forge pytz 2022.7.1 pyhd8ed1ab_0 conda-forge pywavelets 1.3.0 py37h3a130e4_1 conda-forge pywin32 227 py37hcc03f2d_1 conda-forge pywinpty 2.0.2 py37h5da7b33_0 anaconda pyyaml 5.1.2 py37hfa6e2cd_0 conda-forge pyzmq 22.3.0 py37hd77b12b_2 anaconda qt 5.9.7 vc14h73c81de_0 [vc14] anaconda qtconsole 5.4.0 pyhd8ed1ab_0 conda-forge qtconsole-base 5.4.0 pyha770c72_0 conda-forge qtpy 2.3.0 pyhd8ed1ab_0 conda-forge scikit-image 0.19.3 py37h3182a2c_1 conda-forge scikit-learn 1.0.2 py37hcabfae0_0 conda-forge scipy 1.7.3 py37hb6553fb_0 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 66.1.1 pyhd8ed1ab_0 conda-forge simpleitk 2.2.1 pypi_0 pypi sip 6.6.2 py37hf2a7229_0 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sqlite 3.40.0 hcfcfb64_0 conda-forge tbb 2021.7.0 h91493d7_0 conda-forge tblib 1.7.0 pyhd8ed1ab_0 conda-forge terminado 0.15.0 py37h03978a9_0 conda-forge threadpoolctl 3.1.0 pyh8a188c0_0 conda-forge tifffile 2020.6.3 py_0 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.7 vc14hb68737d_1 [vc14] anaconda toml 0.10.2 pyhd8ed1ab_0 conda-forge toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.2 py37hcc03f2d_0 conda-forge traitlets 5.8.1 pyhd8ed1ab_0 conda-forge typing-extensions 4.4.0 hd8ed1ab_0 conda-forge typing_extensions 4.4.0 pyha770c72_0 conda-forge ucrt 10.0.22621.0 h57928b3_0 conda-forge unicodedata2 14.0.0 py37hcc03f2d_1 conda-forge vc 14.3 hb6edc58_10 conda-forge vs2015_runtime 14.34.31931 h4c5c07a_10 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.38.4 pyhd8ed1ab_0 conda-forge widgetsnbextension 4.0.5 pyhd8ed1ab_0 conda-forge winpty 0.4.3 4 conda-forge yaml 0.1.7 vc14h4cb57cf_1 [vc14] anaconda zict 2.2.0 pyhd8ed1ab_0 conda-forge zipp 3.12.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 vc14h1cdd9ab_1 [vc14] anaconda ```
Config file ```python from __future__ import absolute_import """ This file both - contains the configuration of the mvregfus run - and starts the run Therefore create a copy of this file for each run. Soon configuration file handling will be added. """ import logging import os import numpy as np from mvregfus import mv_graph, io_utils logging.basicConfig(level=logging.WARN) ########################## #### parameters to modify #### approx. in descending order of relevance ########################## # where elastix can be found (top folder) elastix_dir = r'D:\SWAP\Jonas\_software\MVRegFus2\elastix' # list of files to fuse filepaths = [r'D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi'] # where to save the output #out_dir = os.path.dirname(filepaths[0]) # e.g. same folder as first file in filepaths out_dir = r'D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out' # channels to fuse channels = [0,1,2] channelss = [channels]*len(filepaths) # channel to use for registration reg_channel = 0 reg_channels = [reg_channel] *len(filepaths) # reference view for final fusion ref_view = 0 ref_views = [ref_view] *len(filepaths) # list of pairwise view indices to perform registration on registration_pairs = [[0,1], [0,2]] #registration_pairs = None registration_pairss = [registration_pairs] *len(filepaths) # optionally, specify the meanings of the indices # occuring in the list of pairs # this can be used to fuse illuminations independently # using view_dict, which is a dictionary containing # the indices as keys and dictionaries defining the indices as items, such as: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : 1 # illumination 1 within that view # } # another example: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : None # like this, both ills of this view are fused using the average of ills # } # another example: # >>> view_dict[0] = {'view': 0 # view 0 within the file # 'ill' : 2 # like this, both ills of this view are fused using blending weights # } # in case of treating ills as independent views: # - illumination 0 comes from left # - illumination 1 comes from right # - rotating in positive direction (in angles) # brings left to the front # so it makes sense to define the registration pairs like this: (view, ill) # (0,1),(0,0) # (0,0),(1,1) # (1,1),(1,0) # (1,0),(2,1) # etc. # four view example: view_dict = {i:{'view':i, 'ill': 0} for i in [0, 1, 2]} # if ills of all views should be averaged, set view_dict to None: #view_dict = None # how to calculate final fusion volume # 'sample': takes best quality z plane of every view to define the volume # 'union': takes the union of all view volumes final_volume_mode = 'sample' # whether to perform an affine chromatic correction # and which channel to use as reference perform_chromatic_correction = False ref_channel_chrom = 0 # binning of raw input from views (x,y,z) # [1,1,1]: no binning # shapes of views to be registered should not significantly # exceed ~(400, 400, 400) raw_input_binning = [5,5,2] # background level to subtract background_level = 200 # which binning to use for registration #mv_registration_bin_factors = np.array([1,1,1]) mv_registration_bin_factors = np.array([4,4,4]) # registration mode for pairwise view registration # (default is 2) # -1: only preregistration (translation, no elastix) # 0: only translation # 1: translation + rotation # 2: translation + rotation + affine pairwise_registration_mode = 2 # final output spacing in um mv_final_spacing = np.array([1.]*3) # options for fusion # fusion_method # 'weighted_average': weighted average of views using the given weights # 'LR': Lucy-Richardson multi-view deconvolution fusion_method = 'LR' # fusion_method = 'weighted_average' # fusion weights # 'blending': uniform weights with blending at the stack borders # 'dct': weights derived from DCT image quality metric fusion_weights = 'dct' # fusion_weights = 'blending' # options for DCT image quality metric for fusion # setting None automatically calculates good values # size of the cubic volume blocks on which to calc quality dct_size = None # size of maximum filter kernel dct_max_kernel = None # size of gaussian kernel dct_gaussian_kernel = None # weight normalisation parameters # normalise such that approx. weight is # contained in the best views dct_how_many_best_views = 2 dct_cumulative_weight_best_views = 0.9 # options for weighted Lucy Richardson multi-view deconvolution # maximum number of iterations LR_niter = 25 # iters # convergence criterion LR_tol = 5e-5 # tol # gaussian PSF sigmas LR_sigma_z = 4 # sigma z LR_sigma_xy = 0.5 # sigma xy ########################## #### end of parameters to modify ########################## # graph_multiview.multiview_fused_label = graph_multiview.multiview_fused_label[:-2] + 'mhd' # graph_multiview.transformed_view_label = graph_multiview.transformed_view_label[:-2] + 'mhd' graph = dict() result_keys = [] for ifile,filepath in enumerate(filepaths): channels = channelss[ifile] # pairs = pairss[ifile] graph.update( mv_graph.build_multiview_graph( filepath = filepath, pairs = registration_pairss[ifile], view_dict = view_dict, ref_view = ref_views[ifile], # mv_registration_bin_factors = np.array([8,8,2]), mv_registration_bin_factors = mv_registration_bin_factors, # x,y,z mv_final_spacing = mv_final_spacing, # orig resolution reg_channel = reg_channel, channels = channels, ds = 0, sample = ifile, out_dir = out_dir, perform_chromatic_correction = perform_chromatic_correction, ref_channel_chrom = ref_channel_chrom, final_volume_mode = final_volume_mode, elastix_dir = elastix_dir, raw_input_binning = raw_input_binning, # x,y,z background_level = background_level, dct_size = dct_size, dct_max_kernel = dct_max_kernel, dct_gaussian_kernel = dct_gaussian_kernel, LR_niter = LR_niter, # iters LR_sigma_z = LR_sigma_z, # sigma z LR_sigma_xy = LR_sigma_xy, # sigma xy LR_tol = LR_tol, # tol fusion_method = fusion_method, fusion_weights = fusion_weights, dct_how_many_best_views=dct_how_many_best_views, dct_cumulative_weight_best_views=dct_cumulative_weight_best_views, pairwise_registration_mode = pairwise_registration_mode, debug_pairwise_registration=True, ) ) # choose same reference coordinate system # if ifile: # graph[graph_multiview.stack_properties_label %(0,ifile)] = graph_multiview.stack_properties_label %(0,0) # out_file = os.path.join(os.path.dirname(filepath),graph_multiview.multiview_fused_label %(0,ifile,0)) # if os.path.exists(out_file): # print('WARNING: skipping %s because %s already exists' %(filepath,out_file)) # continue multiview_fused_labels = [mv_graph.multiview_fused_label % (0, ifile, ch) for ch in channels] # fusion_params_label = 'mv_params_%03d_%03d.prealignment.h5' %(ikey,s) result_keys += multiview_fused_labels # p = threaded.get(graph,fusion_params_label) # run if __name__ == '__main__': # Number of files to fuse in parallel. # Bottleneck here is GPU memory (if used): # Each parallel file requires approx. 8GB of GPU memory N = 1 results = [] for i in range(0, len(result_keys), N * len(channels)): results.append(io_utils.get(graph, result_keys[i:i + N * len(channels)])) ```
Full output including error trace ```python (mvregfus2) D:\SWAP\Jonas\_software\MVRegFus2\MVRegFus>python "D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mvregfus_run_deconv-dct.py" http://localhost:8787 D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\numpy\core\fromnumeric.py:86: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. return ufunc.reduce(obj, axis, dtype, out, **passkwargs) These pairs of keys will be registered: [[0, 1], [0, 2]] They refer to the keys in 'view_dict': {0: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 0}, 1: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 1}, 2: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 2}} Skipping groupwise registration! DECORATOR local... readStackFromMultiviewMultiChannelCzi reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 0 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 640 1920 1920 new shape: 320 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 1 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 473 1920 1920 new shape: 236 384 384 DECORATOR local... register_linear_elastix producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out\mv_params_000_000_vfix000_vmov001.prealignment.h5 compute clahe with kernel size 10 compute clahe with kernel size 10 DECORATOR local... calc_stack_properties_from_views_and_params [0.5021875892401721, 0.5113691542813907, -1, -1, 0.5021875892401721, 0.5113691542813907, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.5061656720748681, 0.5137373165091198, -1, -1, 0.5061656720748681, 0.5137373165091198, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] elastix is started at Sun Jan 29 01:18:25 2023. which elastix: D:\SWAP\Jonas\_software\MVRegFus2\elastix\elastix.exe elastix runs at: S259xxxxxxx Windows Professional (x64), (Build 9200) with 196497 MB memory, and 12 cores @ 2400 MHz. ------------------------------------------------------------------------- Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_0.txt". Current time: Sun Jan 29 01:18:25 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Installing all components. InstallingComponents was successful. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\ -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_initial_transform.txt Reading images... Reading images took 39 ms. Reading the elastix parameters from file ... Transform parameters are initialized as: [0, 0, 0] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 17 ms. Preparation of the image pyramids took: 133 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 12 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 127 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.869382 5.000000 0.001228 1.000000 -0.001210 Main true true WolfeSatisfied 128.7 1 1 0 -0.875162 1.000000 0.000482 8.310252 -0.000473 Main true true WolfeSatisfied 10.1 2 2 0 -0.876495 1.000000 0.000217 3.420573 -0.000312 Main true true WolfeSatisfied 9.7 3 3 0 -0.876692 1.000000 0.000058 1.563869 -0.000065 Main true true WolfeSatisfied 10.0 4 4 0 -0.876693 1.000000 0.000023 0.612307 0.000011 Main true true WolfeSatisfied 10.4 5 5 0 -0.876705 1.000000 0.000002 0.195218 -0.000000 Main true true WolfeSatisfied 9.6 6 6 0 -0.876705 1.000000 0.000000 0.010357 0.000000 Main true true WolfeSatisfied 17.6 7 7 0 -0.876705 1.000000 0.000000 0.001533 0.000000 Main true true WolfeSatisfied 10.1 Time spent in resolution 0 (ITK initialization and iterating): 0.218 s. Stopping condition: The gradient magnitude has (nearly) vanished. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 123 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.838697 5.000000 0.002770 1.000000 -0.002765 Main true true WolfeSatisfied 193.1 1 1 0 -0.849555 1.000000 0.001369 12.686457 0.015523 Main true true WolfeSatisfied 30.2 2 2 0 -0.851921 1.000000 0.000138 3.797745 0.000215 Main true true WolfeSatisfied 31.5 3 3 0 -0.851953 1.000000 0.000087 0.372769 -0.000029 Main true true WolfeSatisfied 31.8 4 4 1 -0.851963 0.121312 0.000072 0.936443 -0.000067 Main true true WolfeSatisfied 47.2 5 5 1 -0.851965 0.064616 0.000062 0.578709 -0.000035 Main true true WolfeSatisfied 48.6 6 6 4 -0.851971 0.456049 0.000038 0.260038 -0.000010 Main true true WolfeSatisfied 89.5 7 7 19 -0.851972 0.058372 0.000035 0.200856 -0.000007 Main true false MaxNrIterations 326.5 Time spent in resolution 1 (ITK initialization and iterating): 0.811 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 2283942529 Skipping applying final transform, no resulting output image generated. Final metric value = -0.851972 Time spent on saving the results, applying the final transform etc.: 114 ms. Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_0.txt", has finished. Current time: Sun Jan 29 01:18:27 2023. Time used for running elastix with this parameter file: 2.3s. ------------------------------------------------------------------------- Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_1.txt". Current time: Sun Jan 29 01:18:27 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\ -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_initial_transform.txt Reading images... Reading images took 1 ms. Transform parameters are initialized as: [0, 0, 0, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [230183.4321472788, 205066.66507998324, 208992.68984490575, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 42 ms. Preparation of the image pyramids took: 101 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.869927 5.000000 0.001657 1.000000 -0.001626 Main true true WolfeSatisfied 136.0 1 1 0 -0.878345 1.000000 0.000367 9.635462 0.000362 Main true true WolfeSatisfied 13.8 2 2 0 -0.878809 1.000000 0.000232 1.543137 -0.000343 Main true true WolfeSatisfied 14.2 3 3 1 -0.878880 0.290014 0.000177 4.039615 -0.000669 Main true true WolfeSatisfied 23.7 4 4 1 -0.879206 0.389350 0.000134 5.469585 -0.000567 Main true true WolfeSatisfied 14.2 5 5 7 -0.879243 0.083976 0.000124 4.957596 -0.000531 Main true true WolfeSatisfied 41.1 6 6 19 -0.879249 0.011713 0.000122 4.323721 -0.000495 Main true false MaxNrIterations 91.0 Time spent in resolution 0 (ITK initialization and iterating): 0.350 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.842401 5.000000 0.002880 1.000000 -0.002816 Main true true WolfeSatisfied 198.9 1 1 0 -0.852775 1.000000 0.001937 13.804276 0.020774 Main true true WolfeSatisfied 35.6 2 2 0 -0.857114 1.000000 0.000608 4.528860 -0.000566 Main true true WolfeSatisfied 35.3 3 3 0 -0.857782 1.000000 0.000253 1.745827 -0.000267 Main true true WolfeSatisfied 36.2 4 4 0 -0.857991 1.000000 0.000152 1.208189 -0.000082 Main true true WolfeSatisfied 37.5 5 5 0 -0.858100 1.000000 0.000086 1.098450 -0.000065 Main true true WolfeSatisfied 34.1 6 6 0 -0.858114 1.000000 0.000053 0.940816 -0.000001 Main true true WolfeSatisfied 34.3 7 7 1 -0.858115 0.299680 0.000027 0.453186 -0.000009 Main true true WolfeSatisfied 49.6 8 8 1 -0.858116 0.202551 0.000019 0.144562 -0.000002 Main true true WolfeSatisfied 51.7 9 9 19 -0.858116 0.011934 0.000019 0.137293 -0.000002 Main true false MaxNrIterations 354.3 Time spent in resolution 1 (ITK initialization and iterating): 0.884 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 4232863717 Skipping applying final transform, no resulting output image generated. Final metric value = -0.858116 Time spent on saving the results, applying the final transform etc.: 112 ms. Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_1.txt", has finished. Current time: Sun Jan 29 01:18:29 2023. Time used for running elastix with this parameter file: 2.1s. ------------------------------------------------------------------------- Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_2.txt". Current time: Sun Jan 29 01:18:30 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\ -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_initial_transform.txt Reading images... Reading images took 0 ms. Transform parameters are initialized as: [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [91981.62057996604, 117038.7410854186, 118242.3427484832, 91981.62057996604, 117038.7410854186, 118242.3427484832, 91981.62057996604, 117038.7410854186, 118242.3427484832, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 61 ms. Preparation of the image pyramids took: 4 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 126 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.858747 1.000000 0.000555 1.000000 -0.000532 Main true true WolfeSatisfied 186.6 1 1 0 -0.859426 1.000000 0.000473 3.606071 0.000562 Main true true WolfeSatisfied 38.4 2 2 0 -0.859533 1.000000 0.000484 1.267208 0.000348 Main true true WolfeSatisfied 37.3 3 3 0 -0.859682 1.000000 0.000198 0.583272 -0.000059 Main true true WolfeSatisfied 34.7 4 4 0 -0.859757 1.000000 0.000132 0.447809 -0.000051 Main true true WolfeSatisfied 37.3 5 5 0 -0.859889 1.000000 0.000157 1.426521 -0.000046 Main true true WolfeSatisfied 31.6 6 6 0 -0.859956 1.000000 0.000112 1.181174 -0.000042 Main true true WolfeSatisfied 28.4 7 7 0 -0.860018 1.000000 0.000130 1.905324 -0.000009 Main true true WolfeSatisfied 33.6 8 8 0 -0.860054 1.000000 0.000132 1.387306 0.000016 Main true true WolfeSatisfied 30.8 9 9 0 -0.860074 1.000000 0.000071 0.398009 -0.000018 Main true true WolfeSatisfied 30.7 10 10 0 -0.860076 1.000000 0.000048 0.697304 -0.000008 Main true true WolfeSatisfied 31.6 11 11 0 -0.860078 1.000000 0.000040 0.684101 -0.000004 Main true true WolfeSatisfied 31.3 12 12 1 -0.860081 0.446406 0.000029 0.611765 -0.000000 Main true true WolfeSatisfied 46.8 13 13 0 -0.860082 1.000000 0.000013 0.146281 -0.000000 Main true true WolfeSatisfied 28.6 14 14 0 -0.860083 1.000000 0.000014 0.084536 -0.000000 Main true true WolfeSatisfied 29.3 15 15 0 -0.860085 1.000000 0.000023 0.202602 -0.000001 Main true true WolfeSatisfied 30.8 16 16 0 -0.860091 1.000000 0.000028 0.346335 -0.000001 Main true true WolfeSatisfied 33.9 17 17 0 -0.860113 1.000000 0.000048 0.868192 0.000005 Main true true WolfeSatisfied 33.3 18 18 2 -0.860114 0.201831 0.000045 0.153054 -0.000004 Main true true WolfeSatisfied 61.2 19 19 1 -0.860115 0.085617 0.000029 0.604397 -0.000008 Main true true WolfeSatisfied 43.0 20 20 2 -0.860116 0.678927 0.000016 0.119897 -0.000001 Main true true WolfeSatisfied 64.5 21 21 19 -0.860116 0.000706 0.000016 0.115287 -0.000002 Main true false MaxNrIterations 288.4 Time spent in resolution 0 (ITK initialization and iterating): 1.244 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 4167074012 Skipping applying final transform, no resulting output image generated. Final metric value = -0.860116 Time spent on saving the results, applying the final transform etc.: 113 ms. Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_\elx_params_2.txt", has finished. Current time: Sun Jan 29 01:18:31 2023. Time used for running elastix with this parameter file: 1.9s. ------------------------------------------------------------------------- Total time elapsed: 6.8s. (CenterOfRotationPoint -31.2889976037 17294.2124249160 -1006.4333312043) (CenterOfRotationPoint -28.3797237846 17295.5157008990 -1035.0514847268) C:\Users\zeiss\AppData\Local\Temp\tmpe46ronh_ DECORATOR local... readStackFromMultiviewMultiChannelCzi reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 2 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 477 1920 1920 new shape: 238 384 384 DECORATOR local... register_linear_elastix producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out\mv_params_000_000_vfix000_vmov002.prealignment.h5 compute clahe with kernel size 10 compute clahe with kernel size 10 DECORATOR local... calc_stack_properties_from_views_and_params [0.5063746269631022, 0.5145578341992755, -1, -1, 0.5166844666564397, 0.516399955014403, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0.5015610732366913, 0.5116251663950087, -1, -1, 0.5065917211840081, 0.5044828275794132, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] elastix is started at Sun Jan 29 01:18:54 2023. which elastix: D:\SWAP\Jonas\_software\MVRegFus2\elastix\elastix.exe elastix runs at: S259xxxxxxx Windows Professional (x64), (Build 9200) with 196497 MB memory, and 12 cores @ 2400 MHz. ------------------------------------------------------------------------- Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_0.txt". Current time: Sun Jan 29 01:18:54 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Installing all components. InstallingComponents was successful. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\ -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_initial_transform.txt Reading images... Reading images took 30 ms. Reading the elastix parameters from file ... Transform parameters are initialized as: [0, 0, 0] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 11 ms. Preparation of the image pyramids took: 98 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 10 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 2 -0.834532 21.000000 0.003175 1.000000 -0.003006 Main true true WolfeSatisfied 131.6 1 1 1 -0.900943 0.243348 0.001391 122.494709 -0.088284 Main true true WolfeSatisfied 14.7 2 2 0 -0.906887 1.000000 0.000787 16.760377 0.008006 Main true true WolfeSatisfied 11.8 3 3 0 -0.909636 1.000000 0.000249 5.596184 -0.000580 Main true true WolfeSatisfied 10.3 4 4 0 -0.909669 1.000000 0.000186 2.399239 0.000344 Main true true WolfeSatisfied 9.9 5 5 0 -0.909789 1.000000 0.000050 1.110941 -0.000055 Main true true WolfeSatisfied 10.8 6 6 1 -0.909791 0.094076 0.000044 0.405938 -0.000018 Main true true WolfeSatisfied 14.5 7 7 7 -0.909792 0.102196 0.000040 0.308420 -0.000012 Main true true WolfeSatisfied 39.4 8 8 19 -0.909792 0.007543 0.000040 0.276856 -0.000011 Main true false MaxNrIterations 92.2 Time spent in resolution 0 (ITK initialization and iterating): 0.351 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 10 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 123 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.875834 1.000000 0.002309 1.000000 -0.002307 Main true true WolfeSatisfied 179.6 1 1 0 -0.884927 1.000000 0.000543 10.054417 0.005007 Main true true WolfeSatisfied 33.5 2 2 0 -0.885410 1.000000 0.000067 1.953580 0.000119 Main true true WolfeSatisfied 33.7 3 3 0 -0.885417 1.000000 0.000013 0.218978 0.000001 Main true true WolfeSatisfied 35.3 4 4 0 -0.885417 1.000000 0.000002 0.035604 -0.000000 Main true true WolfeSatisfied 32.9 5 5 0 -0.885417 1.000000 0.000000 0.007772 -0.000000 Main true true WolfeSatisfied 32.7 Time spent in resolution 1 (ITK initialization and iterating): 0.358 s. Stopping condition: The gradient magnitude has (nearly) vanished. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 3935541839 Skipping applying final transform, no resulting output image generated. Final metric value = -0.885417 Time spent on saving the results, applying the final transform etc.: 113 ms. Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_0.txt", has finished. Current time: Sun Jan 29 01:18:55 2023. Time used for running elastix with this parameter file: 1.6s. ------------------------------------------------------------------------- Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_1.txt". Current time: Sun Jan 29 01:18:55 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\ -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_initial_transform.txt Reading images... Reading images took 1 ms. Transform parameters are initialized as: [0, 0, 0, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [225153.26423667383, 205066.66507998478, 214022.85775551287, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 39 ms. Preparation of the image pyramids took: 94 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 123 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.905823 1.000000 0.001547 1.000000 -0.001545 Main true true WolfeSatisfied 124.8 1 1 0 -0.912775 1.000000 0.000238 9.147290 -0.000640 Main true true WolfeSatisfied 9.9 2 2 1 -0.913634 5.000000 0.000334 1.526301 0.000025 Main true true WolfeSatisfied 15.0 3 3 0 -0.914075 1.000000 0.000214 4.292419 -0.000029 Main true true WolfeSatisfied 11.2 4 4 0 -0.914352 1.000000 0.000132 2.319683 -0.000081 Main true true WolfeSatisfied 11.8 5 5 0 -0.914469 1.000000 0.000116 1.573571 -0.000094 Main true true WolfeSatisfied 10.7 6 6 1 -0.914533 0.467562 0.000088 3.242089 -0.000014 Main true true WolfeSatisfied 15.2 7 7 0 -0.914565 1.000000 0.000024 1.366158 0.000013 Main true true WolfeSatisfied 12.7 8 8 0 -0.914567 1.000000 0.000030 0.511055 0.000006 Main true true WolfeSatisfied 11.5 9 9 0 -0.914571 1.000000 0.000009 0.170373 -0.000001 Main true true WolfeSatisfied 10.8 10 10 1 -0.914571 0.178136 0.000005 0.343233 -0.000001 Main true true WolfeSatisfied 15.4 11 11 19 -0.914571 0.074708 0.000005 0.068239 -0.000000 Main true false MaxNrIterations 114.2 Time spent in resolution 0 (ITK initialization and iterating): 0.384 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 122 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.880015 1.000000 0.002478 1.000000 -0.002476 Main true true WolfeSatisfied 182.8 1 1 0 -0.890416 1.000000 0.000640 10.075639 0.005057 Main true true WolfeSatisfied 36.2 2 2 0 -0.890896 1.000000 0.000123 1.664116 0.000008 Main true true WolfeSatisfied 35.3 3 3 0 -0.890928 1.000000 0.000087 0.349253 -0.000027 Main true true WolfeSatisfied 36.1 4 4 0 -0.890964 1.000000 0.000052 1.037955 0.000013 Main true true WolfeSatisfied 35.7 5 5 0 -0.890974 1.000000 0.000015 0.368117 0.000004 Main true true WolfeSatisfied 36.1 6 6 0 -0.890975 1.000000 0.000010 0.081912 -0.000001 Main true true WolfeSatisfied 36.1 7 7 1 -0.890975 0.268976 0.000006 0.195128 0.000000 Main true true WolfeSatisfied 52.4 8 8 0 -0.890975 1.000000 0.000003 0.015681 -0.000000 Main true true WolfeSatisfied 35.1 9 9 0 -0.890975 1.000000 0.000003 0.018437 0.000000 Main true true WolfeSatisfied 37.1 10 10 2 -0.890975 0.676056 0.000002 0.006577 -0.000000 Main true true WolfeSatisfied 73.6 11 11 4 -0.890975 0.452694 0.000001 0.005402 -0.000000 Main true true WolfeSatisfied 101.0 12 12 1 -0.890975 0.024076 0.000001 0.007575 -0.000000 Main true true WolfeSatisfied 56.9 13 13 2 -0.890975 0.379917 0.000001 0.002500 -0.000000 Main true true WolfeSatisfied 76.2 14 14 19 -0.890975 0.000004 0.000001 0.006149 -0.000000 Main true false MaxNrIterations 377.9 Time spent in resolution 1 (ITK initialization and iterating): 1.234 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 1912561772 Skipping applying final transform, no resulting output image generated. Final metric value = -0.890975 Time spent on saving the results, applying the final transform etc.: 116 ms. Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_1.txt", has finished. Current time: Sun Jan 29 01:18:58 2023. Time used for running elastix with this parameter file: 2.5s. ------------------------------------------------------------------------- Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_2.txt". Current time: Sun Jan 29 01:18:58 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\ -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_initial_transform.txt Reading images... Reading images took 0 ms. Transform parameters are initialized as: [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [102084.71545369699, 117032.82997475029, 108145.1589854208, 102084.71545369699, 117032.82997475029, 108145.1589854208, 102084.71545369699, 117032.82997475029, 108145.1589854208, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 58 ms. Preparation of the image pyramids took: 4 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.891957 1.000000 0.000819 1.000000 -0.000814 Main true true WolfeSatisfied 187.8 1 1 0 -0.893242 1.000000 0.000200 2.924193 -0.000155 Main true true WolfeSatisfied 41.5 2 2 0 -0.893351 1.000000 0.000162 0.823185 -0.000062 Main true true WolfeSatisfied 36.8 3 3 0 -0.893521 1.000000 0.000154 1.411881 -0.000146 Main true true WolfeSatisfied 37.9 4 4 1 -0.893673 0.267951 0.000272 10.832020 0.000377 Main true true WolfeSatisfied 54.3 5 5 0 -0.893874 1.000000 0.000196 1.168258 -0.000168 Main true true WolfeSatisfied 37.0 6 6 0 -0.894431 1.000000 0.000158 7.226876 -0.000146 Main true true WolfeSatisfied 35.2 7 7 0 -0.894584 1.000000 0.000143 4.355703 -0.000050 Main true true WolfeSatisfied 35.3 8 8 1 -0.894644 0.468075 0.000107 4.507607 0.000026 Main true true WolfeSatisfied 54.7 9 9 0 -0.894667 1.000000 0.000041 0.464548 -0.000005 Main true true WolfeSatisfied 35.0 10 10 0 -0.894672 1.000000 0.000027 0.238810 -0.000003 Main true true WolfeSatisfied 34.4 11 11 0 -0.894675 1.000000 0.000036 0.312769 0.000001 Main true true WolfeSatisfied 37.6 12 12 0 -0.894676 1.000000 0.000014 0.178982 0.000000 Main true true WolfeSatisfied 36.5 13 13 0 -0.894677 1.000000 0.000011 0.072678 -0.000000 Main true true WolfeSatisfied 35.7 14 14 19 -0.894677 0.005430 0.000011 0.050083 -0.000000 Main true false MaxNrIterations 364.0 Time spent in resolution 0 (ITK initialization and iterating): 1.088 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 1588794843 Skipping applying final transform, no resulting output image generated. Final metric value = -0.894677 Time spent on saving the results, applying the final transform etc.: 113 ms. Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n\elx_params_2.txt", has finished. Current time: Sun Jan 29 01:19:00 2023. Time used for running elastix with this parameter file: 1.7s. ------------------------------------------------------------------------- Total time elapsed: 6.2s. (CenterOfRotationPoint -1377.1202628548 17293.4088992547 -126.6176857017) (CenterOfRotationPoint -1403.4106607144 17294.5209977261 -112.4274526240) C:\Users\zeiss\AppData\Local\Temp\tmp_x4eji8n DECORATOR local... get_params_from_pairs producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out\mv_params0_000_000.prealignment.h5 weights: [0, 1] 4.235821820867241 [-4.95795582e-01 -7.38781560e-03 -8.68517767e-01 1.02504029e-02 1.00427850e+00 4.69810005e-04 8.71403238e-01 -1.78470884e-03 -4.69956121e-01 -5.20214992e+02 -7.73732338e+01 -4.79961578e+02] weights: [0, 2] 4.320184640068021 [-5.26060663e-01 4.28142702e-02 8.94169976e-01 -9.88512135e-03 1.01700390e+00 -2.70867797e-03 -8.63402135e-01 -2.66300272e-02 -5.25671899e-01 -6.20411150e+02 -2.87643916e+02 -3.63915177e+02] DECORATOR local... concatenate_view_and_time_params processing PATH for view 1: [0, 1] DECORATOR local... concatenate_view_and_time_params processing PATH for view 2: [0, 2] DECORATOR local... concatenate_view_and_time_params [array([1., 0., 0., 0., 1., 0., 0., 0., 1., 0., 0., 0.]), array([-4.95795582e-01, -7.38781560e-03, -8.68517767e-01, 1.02504029e-02, 1.00427850e+00, 4.69810005e-04, 8.71403238e-01, -1.78470884e-03, -4.69956121e-01, -5.20214992e+02, -7.73732338e+01, -4.79961578e+02]), array([-5.26060663e-01, 4.28142702e-02, 8.94169976e-01, -9.88512135e-03, 1.01700390e+00, -2.70867797e-03, -8.63402135e-01, -2.66300272e-02, -5.25671899e-01, -6.20411150e+02, -2.87643916e+02, -3.63915177e+02])] DECORATOR local... calc_stack_properties_from_views_and_params producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out\mv_stack_props_000_000.dict.h5 GPU acceleration for transformation GPU acceleration for transformation GPU acceleration for transformation fusion block overlap: 16.0 calculating DCT weights [########################################] | 100% Completed | 51.2s weight filter size: 1 D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\scipy\ndimage\filters.py:1602: RuntimeWarning: All-NaN slice encountered cval, origins, extra_arguments, extra_keywords) adapting weights to 3 views [########################################] | 100% Completed | 40.5s CuPy available, using single host thread for fusion fusing views... Writing into D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus2_out\mv_000_000_c00.ims [ ] | 0% Completed | 2.8s Traceback (most recent call last): File "D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mvregfus_run_deconv-dct.py", line 236, in results.append(io_utils.get(graph, result_keys[i:i + N * len(channels)])) File "d:\swap\jonas\_software\mvregfus2\mvregfus\mvregfus\io_utils.py", line 31, in get return dask.local.get_sync(cgraph,key) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 220, in execute_task result = _execute_task(task, data) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "d:\swap\jonas\_software\mvregfus2\mvregfus\mvregfus\multiview.py", line 3804, in fuse_blockwise da_to_ims(result, fn, scheduler=dask_scheduler) File "d:\swap\jonas\_software\mvregfus2\mvregfus\mvregfus\imaris.py", line 205, in da_to_ims dask.compute(delayed_chunks, scheduler=scheduler) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\base.py", line 570, in compute results = schedule(dsk, keys, **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 220, in execute_task result = _execute_task(task, data) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\utils.py", line 35, in apply return func(*args, **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\local.py", line 220, in execute_task result = _execute_task(task, data) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\optimization.py", line 969, in __call__ return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args))) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\core.py", line 149, in get result = _execute_task(task, cache) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\utils.py", line 35, in apply return func(*args, **kwargs) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\dask\array\core.py", line 456, in _pass_extra_kwargs return func(*args[len(keys) :], **kwargs) File "d:\swap\jonas\_software\mvregfus2\mvregfus\mvregfus\multiview.py", line 3912, in fuse_block **fusion_kwargs) File "d:\swap\jonas\_software\mvregfus2\mvregfus\mvregfus\multiview.py", line 5614, in fuse_LR_with_weights_np psfs = np.array([get_psf(params[ip], stack_properties, sz, sxy) for ip in range(len(params))]) File "D:\SWAP\Jonas\_software\Miniconda3\envs\mvregfus2\lib\site-packages\cupy\_creation\from_data.py", line 46, in array return _core.array(obj, dtype, copy, order, subok, ndmin) File "cupy\_core\core.pyx", line 2357, in cupy._core.core.array File "cupy\_core\core.pyx", line 2378, in cupy._core.core.array File "cupy\_core\core.pyx", line 2442, in cupy._core.core._array_from_nested_sequence AssertionError ```
m-albert commented 1 year ago

Hi Jonas, a belated Happy New Year to you too!

Thanks for the detailed info regarding the installation, run and error traceback. Great that you found a way to install everything in multiple conda calls, and the documentation of it is super useful.

I booked a session on our Windows workstation for tomorrow evening. I'll troubleshoot running the fusion using cupy and post the result here.

m-albert commented 1 year ago

Heyho, so I could reproduce the cupy error you were getting. It's fixed by passing cupy a numpy array instead of an instance of mvregfus.image_array.ImageArray in the deconvolution function (which is a numpy subclass). I cannot remember that error occurring before but well, this fixes it. I pushed the fix to the main branch (together with the change we discussed above that switches a line in mv_graph.py), so I'd suggest you to try again.

Curious to know whether it runs through! And if so, whether you're getting a performance increase by using cupy. Speaking of performance, using "blending" weights instead of "dct" weights should gain you some time also. Btw, if you have bokeh>2.4.2<3 installed, you can observe the progress in more detail looking at the dask dashboard in your browser at "https://localhost:8787".

WhoIsJack commented 1 year ago

Nice! I've tried it and the error is indeed gone!

Unfortunately, it subsequently runs into a cupy.cuda.memory.OutOfMemoryError (full output below).

According to the Task Manager, the GPU's Dedicated GPU memory usage gradually fills up, and the error occurs soon after it's completely full. Note that Shared GPU memory usage remains almost empty (I have no experience with GPUs, so not sure if that's relevant).

I think the problem here is likely that the GPU on this machine just isn't good enough. It only has 8GB of dedicated memory (96GB of shared). If the dedicated memory is what matters, I'm not surprised there is a problem, since my input data is ~33GB in total (3 channels, 3 angles; so ~3.7GB per z-stack).

To be honest, I had just assumed that the GPU would be good enough, since this is a dedicated light sheet processing PC, but 8GB does not sound like much and some quick googling of the model (NVIDIA Quadro P4000) shows that it's like 6 years old...

I think we have some meatier GPUs available on our cluster. I'll see if I can run it on there one of these days. Will get back to you!

Thanks again for your help in sorting this stuff out! 👍

Full output ```python (mvregfus) C:\Users\zeiss>python "D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mvregfus_run_deconv-dct.py" http://localhost:8787 C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\numpy\core\fromnumeric.py:86: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. return ufunc.reduce(obj, axis, dtype, out, **passkwargs) These pairs of keys will be registered: [[0, 1], [0, 2]] They refer to the keys in 'view_dict': {0: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 0}, 1: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 1}, 2: {'filename': 'D:\\SWAP\\Jonas\\20221013 - LS_Z1 test - ' 'DAPI-Sox10nRmG-mitfaHCR\\tp3_e1-1\\raw\\tp3_e1-1.czi', 'ill': 0, 'view': 2}} INFO: setting registration degree to 2 (trans+rot+aff) Skipping groupwise registration! DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v000_c01.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 0 ch 1 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 640 1920 1920 new shape: 320 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v001_c01.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 1 ch 1 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 473 1920 1920 new shape: 236 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v002_c01.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 2 ch 1 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 477 1920 1920 new shape: 238 384 384 DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v001_c00.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 1 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 473 1920 1920 new shape: 236 384 384 DECORATOR local... bin_stack DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v000_c00.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 0 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 640 1920 1920 new shape: 320 384 384 DECORATOR local... bin_stack DECORATOR local... register_linear_elastix producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_params_000_000_vfix000_vmov001.prealignment.h5 compute clahe with kernel size 10 compute clahe with kernel size 10 DECORATOR local... calc_stack_properties_from_views_and_params stack size in FFT translation registration: [113, 96, 100] elastix is started at Thu Feb 2 10:15:47 2023. which elastix: D:\SWAP\Jonas\_software\MVRegFus_WD\elastix\elastix.exe elastix runs at: S259xxxxxxx Windows Professional (x64), (Build 9200) with 196497 MB memory, and 12 cores @ 2400 MHz. ------------------------------------------------------------------------- Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_0.txt". Current time: Thu Feb 2 10:15:47 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Installing all components. InstallingComponents was successful. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\ -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_initial_transform.txt Reading images... Reading images took 38 ms. Reading the elastix parameters from file ... Transform parameters are initialized as: [0, 0, 0] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 4 ms. Preparation of the image pyramids took: 96 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 10 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 125 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.859957 5.000000 0.002064 1.000000 -0.002050 Main true true WolfeSatisfied 130.2 1 1 0 -0.875376 1.000000 0.000767 18.882011 0.012136 Main true true WolfeSatisfied 9.7 2 2 0 -0.876968 1.000000 0.000106 4.366634 -0.000037 Main true true WolfeSatisfied 10.1 3 3 0 -0.877015 1.000000 0.000058 0.614047 -0.000035 Main true true WolfeSatisfied 9.9 4 4 0 -0.877022 1.000000 0.000036 0.870694 0.000026 Main true true WolfeSatisfied 10.6 5 5 0 -0.877027 1.000000 0.000002 0.300889 0.000000 Main true true WolfeSatisfied 10.4 6 6 0 -0.877027 1.000000 0.000001 0.015715 0.000000 Main true true WolfeSatisfied 10.5 7 7 0 -0.877027 1.000000 0.000000 0.003713 0.000000 Main true true WolfeSatisfied 10.0 Time spent in resolution 0 (ITK initialization and iterating): 0.216 s. Stopping condition: The gradient magnitude has (nearly) vanished. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 127 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.834542 5.000000 0.003292 1.000000 -0.003266 Main true true WolfeSatisfied 186.6 1 1 0 -0.843974 1.000000 0.002417 16.490709 0.038187 Main true true WolfeSatisfied 27.7 2 2 0 -0.851857 1.000000 0.000223 6.927809 0.000562 Main true true WolfeSatisfied 27.2 3 3 0 -0.851942 1.000000 0.000073 0.610163 -0.000040 Main true true WolfeSatisfied 27.2 4 4 0 -0.851963 1.000000 0.000079 0.336257 -0.000019 Main true true WolfeSatisfied 25.8 5 5 11 -0.851966 0.011027 0.000070 4.321694 -0.000253 Main true true WolfeSatisfied 178.4 6 6 11 -0.851967 0.038092 0.000065 0.406952 -0.000020 Main true true WolfeSatisfied 170.4 7 7 19 -0.851967 0.000120 0.000065 0.120036 -0.000008 Main true false MaxNrIterations 282.0 Time spent in resolution 1 (ITK initialization and iterating): 0.938 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 2408376096 Skipping applying final transform, no resulting output image generated. Final metric value = -0.851967 Time spent on saving the results, applying the final transform etc.: 114 ms. Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_0.txt", has finished. Current time: Thu Feb 2 10:15:49 2023. Time used for running elastix with this parameter file: 2.0s. ------------------------------------------------------------------------- Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_1.txt". Current time: Thu Feb 2 10:15:49 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\ -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_initial_transform.txt Reading images... Reading images took 0 ms. Transform parameters are initialized as: [0, 0, 0, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [230158.7260537327, 205022.64262158357, 209006.69183759205, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 43 ms. Preparation of the image pyramids took: 103 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 10 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 126 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.868767 5.000000 0.001974 1.000000 -0.001962 Main true true WolfeSatisfied 130.6 1 1 0 -0.879207 1.000000 0.000450 10.169774 0.001132 Main true true WolfeSatisfied 12.9 2 2 0 -0.879756 1.000000 0.000293 1.564533 -0.000433 Main true true WolfeSatisfied 10.5 3 3 0 -0.880250 1.000000 0.000212 4.511913 0.000011 Main true true WolfeSatisfied 11.1 4 4 19 -0.880263 0.137344 0.000192 1.427516 -0.000204 Main true false MaxNrIterations 103.4 Time spent in resolution 0 (ITK initialization and iterating): 0.276 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 125 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.840431 5.000000 0.003228 1.000000 -0.003165 Main true true WolfeSatisfied 204.9 1 1 0 -0.850952 1.000000 0.002151 13.615113 0.024733 Main true true WolfeSatisfied 32.1 2 2 0 -0.856087 1.000000 0.000550 4.839188 -0.000263 Main true true WolfeSatisfied 34.8 3 3 2 -0.857609 2.849594 0.000549 1.397765 -0.000058 Main true true WolfeSatisfied 73.9 4 4 1 -0.857813 0.501049 0.000319 2.205585 -0.000028 Main true true WolfeSatisfied 52.3 5 5 0 -0.858005 1.000000 0.000143 1.039890 -0.000040 Main true true WolfeSatisfied 34.3 6 6 0 -0.858090 1.000000 0.000105 0.570409 -0.000026 Main true true WolfeSatisfied 41.8 7 7 0 -0.858125 1.000000 0.000047 0.643841 -0.000020 Main true true WolfeSatisfied 38.2 8 8 1 -0.858126 0.151126 0.000041 0.541302 -0.000017 Main true true WolfeSatisfied 51.6 9 9 6 -0.858127 0.047503 0.000037 0.745257 -0.000021 Main true true WolfeSatisfied 133.6 10 10 19 -0.858127 0.010273 0.000037 0.389926 -0.000011 Main true false MaxNrIterations 343.1 Time spent in resolution 1 (ITK initialization and iterating): 1.058 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 3724998536 Skipping applying final transform, no resulting output image generated. Final metric value = -0.858127 Time spent on saving the results, applying the final transform etc.: 114 ms. Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_1.txt", has finished. Current time: Thu Feb 2 10:15:51 2023. Time used for running elastix with this parameter file: 2.2s. ------------------------------------------------------------------------- Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_2.txt". Current time: Thu Feb 2 10:15:52 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\ -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_initial_transform.txt Reading images... Reading images took 0 ms. Transform parameters are initialized as: [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [91974.93345721118, 117038.9707797493, 118248.80017691747, 91974.93345721118, 117038.9707797493, 118248.80017691747, 91974.93345721118, 117038.9707797493, 118248.80017691747, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 62 ms. Preparation of the image pyramids took: 3 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 126 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.858766 1.000000 0.000565 1.000000 -0.000542 Main true true WolfeSatisfied 195.3 1 1 0 -0.859465 1.000000 0.000449 3.577244 0.000525 Main true true WolfeSatisfied 42.1 2 2 0 -0.859555 1.000000 0.000475 1.242116 0.000342 Main true true WolfeSatisfied 39.7 3 3 0 -0.859702 1.000000 0.000188 0.582740 -0.000056 Main true true WolfeSatisfied 40.5 4 4 0 -0.859769 1.000000 0.000126 0.413473 -0.000045 Main true true WolfeSatisfied 40.4 5 5 0 -0.859889 1.000000 0.000151 1.379590 -0.000042 Main true true WolfeSatisfied 43.5 6 6 0 -0.859954 1.000000 0.000116 1.150855 -0.000040 Main true true WolfeSatisfied 42.6 7 7 0 -0.860013 1.000000 0.000167 2.136484 0.000019 Main true true WolfeSatisfied 50.9 8 8 0 -0.860054 1.000000 0.000105 1.029490 0.000005 Main true true WolfeSatisfied 41.9 9 9 0 -0.860072 1.000000 0.000070 0.362622 -0.000015 Main true true WolfeSatisfied 41.0 10 10 0 -0.860077 1.000000 0.000055 0.946536 -0.000007 Main true true WolfeSatisfied 40.5 11 11 19 -0.860077 0.005565 0.000055 0.649600 -0.000019 Main true false MaxNrIterations 416.9 Time spent in resolution 0 (ITK initialization and iterating): 1.054 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 740039433 Skipping applying final transform, no resulting output image generated. Final metric value = -0.860077 Time spent on saving the results, applying the final transform etc.: 114 ms. Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv\elx_params_2.txt", has finished. Current time: Thu Feb 2 10:15:53 2023. Time used for running elastix with this parameter file: 1.7s. ------------------------------------------------------------------------- Total time elapsed: 6.4s. C:\Users\zeiss\AppData\Local\Temp\tmp7tswugvv DECORATOR local... readStackFromMultiviewMultiChannelCzi producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_input_view_000_000_v002_c00.imagear.h5 reading D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\tp3_e1-1.czi view 2 ch 0 ill 0 Binning down raw input by xyz factors [5, 5, 2] old shape: 477 1920 1920 new shape: 238 384 384 DECORATOR local... bin_stack DECORATOR local... register_linear_elastix producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_params_000_000_vfix000_vmov002.prealignment.h5 compute clahe with kernel size 10 compute clahe with kernel size 10 DECORATOR local... calc_stack_properties_from_views_and_params stack size in FFT translation registration: [113, 96, 100] elastix is started at Thu Feb 2 10:16:08 2023. which elastix: D:\SWAP\Jonas\_software\MVRegFus_WD\elastix\elastix.exe elastix runs at: S259xxxxxxx Windows Professional (x64), (Build 9200) with 196497 MB memory, and 12 cores @ 2400 MHz. ------------------------------------------------------------------------- Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_0.txt". Current time: Thu Feb 2 10:16:08 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Installing all components. InstallingComponents was successful. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\ -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_initial_transform.txt Reading images... Reading images took 37 ms. Reading the elastix parameters from file ... Transform parameters are initialized as: [0, 0, 0] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 4 ms. Preparation of the image pyramids took: 108 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 125 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.908731 5.000000 0.000686 1.000000 -0.000672 Main true true WolfeSatisfied 129.3 1 1 0 -0.910619 1.000000 0.000209 6.724186 0.001210 Main true true WolfeSatisfied 9.8 2 2 1 -0.910683 0.366781 0.000069 1.586319 -0.000099 Main true true WolfeSatisfied 15.3 3 3 2 -0.910689 0.678879 0.000035 0.319626 -0.000011 Main true true WolfeSatisfied 25.7 4 4 10 -0.910690 0.152918 0.000030 0.218131 -0.000006 Main true true WolfeSatisfied 53.0 5 5 19 -0.910691 0.095316 0.000027 0.186809 -0.000005 Main true false MaxNrIterations 89.4 Time spent in resolution 0 (ITK initialization and iterating): 0.332 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.878932 5.000000 0.002052 1.000000 -0.002028 Main true true WolfeSatisfied 198.6 1 1 0 -0.885240 1.000000 0.000353 6.733995 0.001098 Main true true WolfeSatisfied 33.3 2 2 0 -0.885402 1.000000 0.000094 0.770433 -0.000067 Main true true WolfeSatisfied 32.2 3 3 0 -0.885415 1.000000 0.000031 0.358226 0.000009 Main true true WolfeSatisfied 33.1 4 4 0 -0.885417 1.000000 0.000005 0.092170 -0.000000 Main true true WolfeSatisfied 32.7 5 5 0 -0.885417 1.000000 0.000001 0.014410 -0.000000 Main true true WolfeSatisfied 35.8 6 6 0 -0.885417 1.000000 0.000000 0.003635 -0.000000 Main true true WolfeSatisfied 33.4 Time spent in resolution 1 (ITK initialization and iterating): 0.410 s. Stopping condition: The gradient magnitude has (nearly) vanished. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 2951137383 Skipping applying final transform, no resulting output image generated. Final metric value = -0.885417 Time spent on saving the results, applying the final transform etc.: 113 ms. Running elastix with parameter file 0: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_0.txt", has finished. Current time: Thu Feb 2 10:16:10 2023. Time used for running elastix with this parameter file: 1.6s. ------------------------------------------------------------------------- Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_1.txt". Current time: Thu Feb 2 10:16:10 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\ -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_initial_transform.txt Reading images... Reading images took 1 ms. Transform parameters are initialized as: [0, 0, 0, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [225169.989947576, 205022.6426215748, 213995.42794374286, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 43 ms. Preparation of the image pyramids took: 93 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 123 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.909886 5.000000 0.001338 1.000000 -0.001320 Main true true WolfeSatisfied 129.7 1 1 0 -0.913802 1.000000 0.000380 7.231361 0.000367 Main true true WolfeSatisfied 10.0 2 2 0 -0.914327 1.000000 0.000235 1.467332 -0.000323 Main true true WolfeSatisfied 10.8 3 3 0 -0.914634 1.000000 0.000088 3.298426 -0.000104 Main true true WolfeSatisfied 10.4 4 4 0 -0.914677 1.000000 0.000036 1.217742 0.000000 Main true true WolfeSatisfied 10.5 5 5 3 -0.914677 0.076980 0.000032 0.213948 -0.000006 Main true true WolfeSatisfied 24.1 6 6 2 -0.914677 0.265748 0.000024 0.166863 -0.000003 Main true true WolfeSatisfied 18.8 7 7 6 -0.914678 0.309571 0.000015 0.123993 -0.000002 Main true true WolfeSatisfied 36.2 8 8 19 -0.914678 0.063480 0.000014 0.112902 -0.000001 Main true false MaxNrIterations 90.7 Time spent in resolution 0 (ITK initialization and iterating): 0.356 s. Stopping condition: Wolfe conditions are not satisfied. Resolution: 1 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 1, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 1, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 1, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 1, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 1, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 1, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 1, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 1, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 1, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 124 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 1 -0.884349 5.000000 0.002189 1.000000 -0.002165 Main true true WolfeSatisfied 199.8 1 1 0 -0.890138 1.000000 0.000592 6.353991 0.001897 Main true true WolfeSatisfied 35.0 2 2 0 -0.890572 1.000000 0.000277 1.036505 -0.000263 Main true true WolfeSatisfied 32.3 3 3 0 -0.890776 1.000000 0.000166 1.232267 -0.000069 Main true true WolfeSatisfied 35.0 4 4 0 -0.890877 1.000000 0.000168 0.911059 -0.000077 Main true true WolfeSatisfied 31.4 5 5 0 -0.890897 1.000000 0.000104 2.941481 0.000257 Main true true WolfeSatisfied 34.7 6 6 0 -0.890967 1.000000 0.000064 1.306030 -0.000014 Main true true WolfeSatisfied 32.2 7 7 1 -0.890973 0.388073 0.000029 0.774962 -0.000001 Main true true WolfeSatisfied 51.8 8 8 0 -0.890975 1.000000 0.000010 0.119044 -0.000001 Main true true WolfeSatisfied 32.4 9 9 0 -0.890975 1.000000 0.000008 0.060882 0.000000 Main true true WolfeSatisfied 29.5 10 10 0 -0.890975 1.000000 0.000002 0.019865 -0.000000 Main true true WolfeSatisfied 27.0 11 11 0 -0.890975 1.000000 0.000002 0.007183 -0.000000 Main true true WolfeSatisfied 29.0 12 12 1 -0.890975 0.469604 0.000001 0.020936 0.000000 Main true true WolfeSatisfied 41.0 13 13 2 -0.890975 0.328391 0.000001 0.005828 -0.000000 Main true true WolfeSatisfied 58.1 14 14 1 -0.890975 0.513180 0.000001 0.019353 0.000000 Main true true WolfeSatisfied 44.8 15 15 0 -0.890975 1.000000 0.000001 0.004473 -0.000000 Main true true WolfeSatisfied 28.2 16 16 0 -0.890975 1.000000 0.000001 0.006842 0.000000 Main true true WolfeSatisfied 31.0 17 17 0 -0.890975 1.000000 0.000001 0.001969 -0.000000 Main true true WolfeSatisfied 27.8 18 18 0 -0.890975 1.000000 0.000000 0.001295 -0.000000 Main true true WolfeSatisfied 30.7 19 19 0 -0.890975 1.000000 0.000000 0.003503 -0.000000 Main true true WolfeSatisfied 31.6 20 20 1 -0.890975 0.392436 0.000001 0.005391 -0.000000 Main true true WolfeSatisfied 40.9 21 21 1 -0.890975 0.073544 0.000001 0.010547 0.000000 Main true true WolfeSatisfied 44.4 22 22 0 -0.890975 1.000000 0.000000 0.001015 -0.000000 Main true true WolfeSatisfied 28.9 23 23 0 -0.890975 1.000000 0.000000 0.001374 -0.000000 Main true true WolfeSatisfied 27.2 24 24 0 -0.890975 1.000000 0.000000 0.000832 -0.000000 Main true true WolfeSatisfied 28.1 25 25 1 -0.890975 0.278303 0.000000 0.000260 -0.000000 Main true true WolfeSatisfied 43.6 26 26 19 -0.890975 0.004796 0.000000 0.000655 0.000000 Main true false MaxNrIterations 297.0 Time spent in resolution 1 (ITK initialization and iterating): 1.416 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 909828410 Skipping applying final transform, no resulting output image generated. Final metric value = -0.890975 Time spent on saving the results, applying the final transform etc.: 112 ms. Running elastix with parameter file 1: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_1.txt", has finished. Current time: Thu Feb 2 10:16:13 2023. Time used for running elastix with this parameter file: 2.6s. ------------------------------------------------------------------------- Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_2.txt". Current time: Thu Feb 2 10:16:13 2023. Reading the elastix parameters from file ... WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. ELASTIX version: 4.900 Command line options from ElastixBase: -f C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed.mhd -m C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\moving.mhd -fMask C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\fixed_mask.mhd -mMask unspecified, so no moving mask used -out C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\ -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_0.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_1.txt -p C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_2.txt -priority unspecified, so NORMAL process priority -threads unspecified, so all available threads are used WARNING: The parameter "UseDirectionCosines", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The option "UseDirectionCosines" was not found in your parameter file. From elastix 4.8 it defaults to true! This may change the behavior of your registrations considerably. Command line options from TransformBase: -t0 C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_initial_transform.txt Reading images... Reading images took 1 ms. Transform parameters are initialized as: [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0] Scales are estimated automatically. Scales for transform parameters are: [102085.67032730652, 117032.8572421521, 108144.1768444199, 102085.67032730652, 117032.8572421521, 108144.1768444199, 102085.67032730652, 117032.8572421521, 108144.1768444199, 1, 1, 1] WARNING: The parameter "GenerateLineSearchIterations", requested at entry number 0, does not exist at all. The default value "false" is used instead. Initialization of all components (before registration) took: 62 ms. Preparation of the image pyramids took: 4 ms. Resolution: 0 WARNING: You want to select new samples every iteration, but the selected ImageSampler is not suited for that. WARNING: The parameter "ShowExactMetricValue", requested at entry number 0, does not exist at all. The default value "false" is used instead. WARNING: The parameter "UseMultiThreadingForMetrics", requested at entry number 0, does not exist at all. The default value "true" is used instead. WARNING: The parameter "ErodeFixedMask", requested at entry number 0, does not exist at all. The default value "true" is used instead. Setting the fixed masks took: 9 ms. Setting the moving masks took: 0 ms. WARNING: The parameter "MaximumNumberOfLineSearchIterations", requested at entry number 0, does not exist at all. The default value "20" is used instead. WARNING: The parameter "StepLength", requested at entry number 0, does not exist at all. The default value "1" is used instead. WARNING: The parameter "LineSearchValueTolerance", requested at entry number 0, does not exist at all. The default value "0.0001" is used instead. WARNING: The parameter "LineSearchGradientTolerance", requested at entry number 0, does not exist at all. The default value "0.9" is used instead. WARNING: The parameter "LBFGSUpdateAccuracy", requested at entry number 0, does not exist at all. The default value "5" is used instead. WARNING: The parameter "StopIfWolfeNotSatisfied", requested at entry number 0, does not exist at all. The default value "true" is used instead. Elastix initialization of all components (for this resolution) took: 125 ms. Initialization of AdvancedNormalizedCorrelation metric took: 0 ms. 1:ItNr 1a:SrchDirNr 1b:LineItNr 2:Metric 3:StepLength 4a:||Gradient|| 4b:||SearchDir|| 4c:DirGradient 5:Phase 6a:Wolfe1 6b:Wolfe2 7:LinSrchStopCondition Time[ms] 0 0 0 -0.891956 1.000000 0.000822 1.000000 -0.000816 Main true true WolfeSatisfied 195.3 1 1 0 -0.893252 1.000000 0.000197 3.000655 -0.000104 Main true true WolfeSatisfied 43.1 2 2 0 -0.893351 1.000000 0.000165 0.766636 -0.000058 Main true true WolfeSatisfied 41.1 3 3 0 -0.893516 1.000000 0.000159 1.388243 -0.000146 Main true true WolfeSatisfied 42.3 4 4 1 -0.893671 0.247012 0.000279 11.659088 0.000379 Main true true WolfeSatisfied 57.5 5 5 0 -0.893877 1.000000 0.000204 1.206776 -0.000175 Main true true WolfeSatisfied 39.7 6 6 0 -0.894475 1.000000 0.000153 8.689829 -0.000060 Main true true WolfeSatisfied 40.6 7 7 0 -0.894589 1.000000 0.000154 3.084578 -0.000035 Main true true WolfeSatisfied 38.2 8 8 0 -0.894660 1.000000 0.000090 2.956048 0.000065 Main true true WolfeSatisfied 38.2 9 9 0 -0.894669 1.000000 0.000055 0.877430 0.000005 Main true true WolfeSatisfied 39.8 10 10 0 -0.894673 1.000000 0.000020 0.223991 0.000001 Main true true WolfeSatisfied 37.8 11 11 0 -0.894674 1.000000 0.000014 0.126747 -0.000001 Main true true WolfeSatisfied 42.6 12 12 0 -0.894675 1.000000 0.000012 0.175626 -0.000001 Main true true WolfeSatisfied 40.5 13 13 1 -0.894676 0.417077 0.000014 0.609974 0.000001 Main true true WolfeSatisfied 60.7 14 14 0 -0.894676 1.000000 0.000014 0.094462 0.000000 Main true true WolfeSatisfied 41.2 15 15 0 -0.894677 1.000000 0.000009 0.047145 -0.000000 Main true true WolfeSatisfied 40.1 16 16 0 -0.894678 1.000000 0.000012 0.126445 -0.000000 Main true true WolfeSatisfied 39.2 17 17 2 -0.894678 0.684985 0.000015 0.240219 -0.000001 Main true true WolfeSatisfied 79.5 18 18 2 -0.894678 0.017593 0.000017 2.513458 -0.000008 Main true true WolfeSatisfied 80.5 19 19 19 -0.894678 0.023115 0.000017 0.679653 -0.000003 Main true false MaxNrIterations 408.3 Time spent in resolution 0 (ITK initialization and iterating): 1.478 s. Stopping condition: Wolfe conditions are not satisfied. WARNING: The parameter "FixedInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. WARNING: The parameter "MovingInternalImagePixelType", requested at entry number 0, does not exist at all. The default value "float" is used instead. Creating the TransformParameterFile took 0.00s Registration result checksum: 2667069407 Skipping applying final transform, no resulting output image generated. Final metric value = -0.894678 Time spent on saving the results, applying the final transform etc.: 114 ms. Running elastix with parameter file 2: "C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u\elx_params_2.txt", has finished. Current time: Thu Feb 2 10:16:15 2023. Time used for running elastix with this parameter file: 2.1s. ------------------------------------------------------------------------- Total time elapsed: 6.8s. C:\Users\zeiss\AppData\Local\Temp\tmpbcifps_u DECORATOR local... get_params_from_pairs producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_params0_000_000.prealignment.h5 DECORATOR local... concatenate_view_and_time_params [[0, 1]] [[-4.96327639e-01 -5.47470493e-03 -8.66754508e-01 -5.53086996e+02] [ 1.15130008e-02 1.00384013e+00 8.16827322e-04 -7.04121107e+01] [ 8.73472363e-01 -5.39887390e-03 -4.73907471e-01 -4.18583340e+02] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] DECORATOR local... concatenate_view_and_time_params [[0, 2]] [[-5.25589918e-01 4.21639329e-02 8.93720794e-01 -6.09366357e+02] [-9.97025421e-03 1.01716807e+00 -2.65692127e-03 -2.90450440e+02] [-8.62870828e-01 -2.74190015e-02 -5.26137184e-01 -3.50550505e+02] [ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]] DECORATOR local... concatenate_view_and_time_params DECORATOR local... calc_stack_properties_from_views_and_params producing D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\mvregfus_out-deconv-dct\mv_stack_props_000_000.dict.h5 DECORATOR local... fuse_blockwise fusion block overlap: 16.0 size b 64 2 weight filter size: 1 CuPy available, using single host thread for fusion fusing views... distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-f2085ae2-17b4-4b42-b702-80c9d246f02c, (, [array([[[[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 6, 7, ..., 1, 1, 1], [4, 6, 7, ..., 1, 1, 1], [5, 6, 7, ..., 2, 2, 1]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 6, 7, ..., 0, 0, 0], [4, 5, 7, ..., 1, 1, 0], [5, 6, 7, ..., 1, 1, 1]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 6, 7, ..., 0, 0, 0], [4, 5, 7, ..., 0, 0, 0], [4, 6, 7, ..., 1, 1, 0]], ..., [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 2, 2, 2], [4, 6, 7, ..., 2, 2, 2], [6, 7, 7, ..., 3, 3, 3 kwargs: {} Exception: "OutOfMemoryError('Out of memory allocating 98,304,000 bytes (allocated so far: 7,435,760,128 bytes).')" distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-f2085ae2-17b4-4b42-b702-80c9d246f02c, (, [array([[[[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 0, 0, 0], [4, 5, 7, ..., 1, 1, 0], [5, 6, 7, ..., 2, 2, 1]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 1, 1, 0], [4, 5, 7, ..., 1, 1, 1], [5, 6, 7, ..., 1, 1, 1]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [3, 5, 7, ..., 1, 1, 0], [3, 5, 7, ..., 1, 1, 1], [4, 6, 7, ..., 1, 1, 1]], ..., [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [3, 5, 7, ..., 0, 0, 0], [3, 5, 7, ..., 0, 1, 1], [4, 6, 7, ..., 1, 2, 1 kwargs: {} Exception: "OutOfMemoryError('Out of memory allocating 98,304,000 bytes (allocated so far: 7,561,417,728 bytes).')" distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-f2085ae2-17b4-4b42-b702-80c9d246f02c, (, [array([[[[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 3, 2, 2], [4, 6, 8, ..., 3, 3, 2], [5, 6, 8, ..., 3, 3, 2]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 3, 2, 2], [4, 6, 7, ..., 3, 3, 2], [5, 6, 8, ..., 4, 3, 2]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 7, ..., 3, 3, 2], [4, 5, 7, ..., 3, 3, 2], [5, 6, 7, ..., 4, 4, 3]], ..., [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [4, 5, 6, ..., 1, 1, 0], [4, 5, 6, ..., 1, 1, 1], [5, 6, 6, ..., 2, 2, 1 kwargs: {} Exception: "OutOfMemoryError('Out of memory allocating 49,152,000 bytes (allocated so far: 7,483,168,256 bytes).')" Traceback (most recent call last): File "D:\SWAP\Jonas\20221013 - LS_Z1 test - DAPI-Sox10nRmG-mitfaHCR\tp3_e1-1\raw\mvregfus_run_deconv-dct.py", line 236, in results.append(io_utils.get(graph, result_keys[i:i + N * len(channels)])) File "d:\swap\jonas\_software\mvregfus_wd\mvregfus\mvregfus\io_utils.py", line 31, in get return dask.local.get_sync(cgraph,key) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 558, in get_sync **kwargs, File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 496, in get_async for key, res_info, failed in queue_get(queue).result(): File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 428, in result return self.__get_result() File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 538, in submit fut.set_result(fn(*args, **kwargs)) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in batch_execute_tasks return [execute_task(*a) for a in it] File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 234, in return [execute_task(*a) for a in it] File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 225, in execute_task result = pack_exception(e, dumps) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\local.py", line 220, in execute_task distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-f2085ae2-17b4-4b42-b702-80c9d246f02c, (, [array([[[[ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], ..., [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], [[ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], ..., [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], [[ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], ..., [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], ..., [[17, 18, 18, ..., 5, 6, 6], [18, 18, 19, ..., 5, 6, 6], [18, 19, 19, ..., kwargs: {} Exception: "OutOfMemoryError('Out of memory allocating 49,152,000 bytes (allocated so far: 7,574,464,512 bytes).')" result = _execute_task(task, data) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "d:\swap\jonas\_software\mvregfus_wd\mvregfus\mvregfus\multiview.py", line 4453, in fuse_blockwise_and_write_out distributed.worker - WARNING - Compute Failed Function: execute_task args: ((subgraph_callable-f2085ae2-17b4-4b42-b702-80c9d246f02c, (, [array([[[[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [1, 0, 0, ..., 3, 4, 4], [0, 0, 0, ..., 3, 4, 5], [0, 0, 0, ..., 3, 4, 5]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [1, 1, 1, ..., 4, 4, 5], [1, 1, 0, ..., 4, 4, 5], [0, 0, 0, ..., 4, 4, 5]], [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [2, 1, 1, ..., 4, 4, 5], [1, 1, 1, ..., 4, 5, 5], [1, 1, 0, ..., 5, 5, 6]], ..., [[0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], ..., [0, 0, 0, ..., 2, 2, 2], [0, 0, 0, ..., 2, 2, 3], [0, 0, 0, ..., 3, 3, 3 kwargs: {} Exception: "OutOfMemoryError('Out of memory allocating 49,152,000 bytes (allocated so far: 7,624,100,864 bytes).')" da.to_zarr(result, fn, overwrite=True)#, scheduler=dask_scheduler) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 3420, in to_zarr return arr.store(z, lock=False, compute=compute, return_stored=return_stored) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 1597, in store r = store([self], [target], **kwargs) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\array\core.py", line 1076, in store compute_as_if_collection(Array, store_dsk, map_keys, **kwargs) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\base.py", line 315, in compute_as_if_collection return schedule(dsk2, keys, **kwargs) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 2693, in get results = self.gather(packed, asynchronous=asynchronous, direct=direct) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 1975, in gather asynchronous=asynchronous, File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 866, in sync self.loop, func, *args, callback_timeout=callback_timeout, **kwargs File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\utils.py", line 327, in sync raise exc.with_traceback(tb) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\utils.py", line 310, in f result[0] = yield future File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\tornado\gen.py", line 769, in run value = future.result() File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\distributed\client.py", line 1834, in _gather raise exception.with_traceback(traceback) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\optimization.py", line 969, in __call__ return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args))) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 149, in get result = _execute_task(task, cache) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\core.py", line 119, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\dask\utils.py", line 35, in apply return func(*args, **kwargs) File "d:\swap\jonas\_software\mvregfus_wd\mvregfus\mvregfus\multiview.py", line 5946, in fuse_LR_with_weights_np weights = np.asarray(weights) File "C:\Users\zeiss\anaconda3\envs\mvregfus\lib\site-packages\cupy\_creation\from_data.py", line 66, in asarray return core.array(a, dtype, False, order) File "cupy/core/core.pyx", line 2004, in cupy.core.core.array File "cupy/core/core.pyx", line 2083, in cupy.core.core.array File "cupy/core/core.pyx", line 2157, in cupy.core.core._send_object_to_gpu File "cupy/core/core.pyx", line 138, in cupy.core.core.ndarray.__init__ File "cupy/cuda/memory.pyx", line 578, in cupy.cuda.memory.alloc File "cupy/cuda/memory.pyx", line 1250, in cupy.cuda.memory.MemoryPool.malloc File "cupy/cuda/memory.pyx", line 1271, in cupy.cuda.memory.MemoryPool.malloc File "cupy/cuda/memory.pyx", line 939, in cupy.cuda.memory.SingleDeviceMemoryPool.malloc File "cupy/cuda/memory.pyx", line 959, in cupy.cuda.memory.SingleDeviceMemoryPool._malloc File "cupy/cuda/memory.pyx", line 1210, in cupy.cuda.memory.SingleDeviceMemoryPool._try_malloc cupy.cuda.memory.OutOfMemoryError: Out of memory allocating 98,304,000 bytes (allocated so far: 7,435,760,128 bytes). ```
m-albert commented 1 year ago

Ok, good that the error is gone 👌.

In this case we can limit how many threads are trying to access the GPU at the same time. At the top of mv_graph.py, try uncommenting the second part of the line creating the dask cluster, limiting it to a single thread as such:

client = Client(processes=False, threads_per_worker=1)
WhoIsJack commented 1 year ago

It works! 🎉

I could even increase it to threads_per_worker=3 to make use of most of the GPU's memory without overloading it! It now takes ~1h to get everything done (with deconvolution and dct enabled), down from >30h without cupy. Nice! 🚀

Now I should be able to optimize parameters a bit to improve the quality (it doesn't look quite as good as the ImageJ result yet). I reckon lowering mv_final_spacing might be a good start? I'll try some things next week and let you know how it goes.

Might still try it on the cluster at one point, just to see how much faster it could be on a good GPU.

Thanks a bunch for the support! 🥇

m-albert commented 1 year ago

Great :)

Now I should be able to optimize parameters a bit to improve the quality (it doesn't look quite as good as the ImageJ result yet). I reckon lowering mv_final_spacing might be a good start? I'll try some things next week and let you know how it goes.

Yes, with mv_final_spacing you can lower the pixel spacing of the output. Also, make sure to set raw_input_binning to [1,1,1] or at least [2,2,1].

m-albert commented 12 months ago

Solved after discussion in #10 .