Skip to content

Running stitching with only 2 axes #155

@lauhei

Description

@lauhei

Hi,

We are trying to run rigid stitching on lightsheet data that is only 1 tile wide in the Y axis. Our workspace looks like

Workspace[CellMap]{.../S-L}
              raw: 240918_Brain-S_hemisphereL_10-07-06/10-07-06_Brain-S_hemisphereL_UltraII[00 x <X,2>]_C00_xyz-Table Z<Z,4>.ome.npy {8775 files, ('X', 'Z'): (0, 0) -> (2, 2924)}
                   240918_Brain-S_hemisphereL_10-07-06/10-07-06_Brain-S_hemisphereL_UltraII[00 x <X,2>]_C00_xyz-Table Z<Z,4>.ome.tif {8775 files, ('X', 'Z'): (0, 0) -> (2, 2924)}
 autofluorescence: 240918_Brain-S_hemisphereL_AF_19-11-36/19-11-36_Brain-S_hemisphereL_AF_UltraII[00 x <X,2>]_C00_xyz-Table Z<Z,4>.ome.tif {1952 files, ('X', 'Z'): (0, 0) -> (1, 975)}
         stitched: no file
           layout: no file
       background: no file
        resampled: no file
resampled_to_auto: no file
auto_to_reference: no file
            cells: no file
          density: no file
   tile_extension: no file
         arteries: 240918_Brain-S_hemisphereL_10-07-06/10-07-06_Brain-S_hemisphereL_UltraII[00 x <X,2>]_C02_xyz-Table Z<Z,4>.ome.npy {8775 files, ('X', 'Z'): (0, 0) -> (2, 2924)}
                   240918_Brain-S_hemisphereL_10-07-06/10-07-06_Brain-S_hemisphereL_UltraII[00 x <X,2>]_C02_xyz-Table Z<Z,4>.ome.tif {8775 files, ('X', 'Z'): (0, 0) -> (2, 2924)}

With the resulting traceback when we run rigid stitching preview or run stitching:

Traceback (most recent call last):
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/gui/tabs.py", line 436, in preview_stitching_smart
    self.wrap_step('Stitching', self.preprocessor.stitch_rigid, step_kw_args={'force': True},
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/gui/interfaces.py", line 297, in wrap_step
    self.main_window.wrap_in_thread(func, *step_args, **step_kw_args)
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/gui/run_gui.py", line 619, in wrap_in_thread
    return result.get()
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/Utils/utilities.py", line 171, in wraps
    return func(*args, **kwargs)
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/processors/sample_preparation.py", line 381, in stitch_rigid
    layout = self.get_wobbly_layout(overlaps)
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/Utils/utilities.py", line 171, in wraps
    return func(*args, **kwargs)
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/processors/sample_preparation.py", line 414, in get_wobbly_layout
    layout = stitching_wobbly.WobblyLayout(expression=raw_path, tile_axes=['X', 'Y'], overlaps=overlaps)
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/Alignment/Stitching/StitchingWobbly.py", line 729, in __init__
    strg.TiledLayout.__init__(self, sources = sources, expression = expression, tile_axes = tile_axes, tile_shape = tile_shape, tile_positions = tile_positions, positions = positions, overlaps = overlaps, alignments = alignments, position = position, shape = shape, dtype = dtype, order = order);
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/Alignment/Stitching/StitchingRigid.py", line 1910, in __init__
    sources, alignments, tile_positions = _initialize_tiles_from_expression(expression, tile_axes=tile_axes, tile_shape=tile_shape, tile_positions=tile_positions, overlaps=overlaps, positions=positions, alignments=alignments);
  File ".../miniconda3/envs/ClearMapUi39clean/lib/python3.9/site-packages/ClearMap2-2.1.4-py3.9-linux-x86_64.egg/ClearMap/Alignment/Stitching/StitchingRigid.py", line 2247, in _initialize_tiles_from_expression
    raise ValueError('The expression does not have the named pattern %s' % n);
ValueError: The expression does not have the named pattern Y

Is there a way to resolve this? Any advice would be greatly appreciated.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions