Skip to content

Registration fails for 2D SpatialImages #16

@supersubscript

Description

@supersubscript
>>> images[0].shape
Out[455]: (673, 673)

>>> type(images[1])
Out[456]: timagetk.components.spatial_image.SpatialImage

>>> images[1].shape
Out[457]: (713, 713)

>>> type(images[1])
Out[458]: timagetk.components.spatial_image.SpatialImage

>>> ii = 1
>>> _, outp = registration(
>>>     images[ii],
>>>     images[ii-1], method='rigid_registration')
Exception AttributeError: "'BalImage' object has no attribute '_c_bal_image'" in <bound method BalImage.__del__ of <timagetk.wrapping.bal_image.BalImage object at 0x7f81b661f9d0>> ignored

Traceback (most recent call last):

  File "<ipython-input-458-33cb7d9ad4ac>", line 4, in <module>
    images[ii-1], method='rigid_registration')

  File "/home//.local/timagetk/timagetk/plugins/registration.py", line 77, in registration
    trsf_out, res_image = rigid_registration(floating_img, reference_img)

  File "/home//.local/timagetk/timagetk/plugins/registration.py", line 94, in rigid_registration
    trsf_rig, res_rig = blockmatching(floating_img, reference_img)

  File "/home//.local/timagetk/timagetk/algorithms/blockmatching.py", line 88, in blockmatching
    bal_floating_image, bal_reference_image = BalImage(floating_image), BalImage(reference_image)

  File "/home//.local/timagetk/timagetk/wrapping/bal_image.py", line 307, in __init__
    self._c_bal_image = spatial_image_to_bal_image(self._spatial_image, **kwds)

  File "/home//.local/timagetk/timagetk/wrapping/bal_image.py", line 245, in spatial_image_to_bal_image
    spatial_image_kwds = spatial_image_to_bal_image_fields(spatial_image)

  File "/home//.local/timagetk/timagetk/wrapping/bal_image.py", line 120, in spatial_image_to_bal_image_fields
    _vx, _vy, _vz = spatial_image.voxelsize + (1.,)

TypeError: can only concatenate list (not "tuple") to list

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