Changelog#

Release 1.0.0#

Tags

Description

πŸ’₯ API-Break✏️ Changed🌱 Added
πŸ’₯ API-Break🧹 Removed

Removed imfusion.data.components.DataComponent, which was previously used as the base class for defining custom Python data components. Use the new imfusion.data.components.register() decorator together with imfusion.data.components.field() instead.

πŸ’₯ API-Break✏️ Changed

Path arguments such as imfusion.io.load(), imfusion.io.save(), imfusion.load_plugin(), and imfusion.is_compatible_imfusion_plugin() now accept os.PathLike | str | bytes (including pathlib.Path). imfusion.show() is split into a data overload and a path overload so that bytes means a filesystem path, not in-memory data. The former keyword data_or_file is replaced by data and path.

πŸ’₯ API-Break✏️ Changed
πŸ’₯ API-Break🧹 Removed

Removed imfusion.DataList. Use a regular Python list instead.

πŸ’₯ API-Break✏️ Changed🌱 Added

Introduced the imfusion.gui submodule. Moved Suite and GUI-related APIs from imfusion to imfusion.gui: ApplicationController, ConsoleController, DataModel, Display, View, ImageView2D, ImageView3D, LayoutMode, Annotation, AnnotationModel, SignalConnection, VisualizerHandle, imfusion.gui.open_in_suite(), imfusion.gui.close_viewers(), imfusion.gui.list_viewers(), and imfusion.gui.show(). These symbols are no longer available on the top-level imfusion module, except for imfusion.show(), which remains available as an alias of imfusion.gui.show(), and imfusion.app, which remains on the top-level module.

πŸ’₯ API-Break✏️ Changed🌱 Added

Introduced the imfusion.log submodule. Moved logging-related functions from imfusion and renamed them: log_trace to imfusion.log.trace(), log_debug to imfusion.log.debug(), log_info to imfusion.log.info(), log_warn to imfusion.log.warn(), log_error to imfusion.log.error(), set_log_level to imfusion.log.set_level(), log_level to imfusion.log.level(), and transfer_logging_to_python to imfusion.log.transfer_to_python(). These functions are no longer available on the top-level imfusion module.

✏️ Changed🌱 Added

Introduced the imfusion.data submodule. Moved Data and all Data-derived types from imfusion to imfusion.data: Data, DataGroup, Mesh, PointCloud, SharedImageSet, TrackedSharedImageSet, and TrackingSequence. All of these remain accessible from the top-level imfusion module.

πŸ”§ Fixed

Fixed imfusion.algorithm.PathType.SAVE_FILE having incorrect value OpenFile instead of SaveFile.

πŸ”§ Fixed
🌱 Added

show() in a Jupyter notebook cell now results in a displayed screenshot of the final state when the visualizer is closed interactively. Please note that the screenshot will not be displayed when the visualizer is closed programmatically via close() or via del handle.

🌱 Added

Added the imfusion.data.components.typing submodule, which provides the following types for static type checking:

🌱 Added

Added imfusion.data.components.register() and imfusion.data.components.field() for defining custom Python data components, replacing the previous approach based on subclassing imfusion.data.components.DataComponent.

🌱 Added

Release 0.12.0#

Tags

Description

πŸ’₯ API-Break🧹 Removed

Removed imfusion.ImageResamplingAlgorithm. Use imfusion.processing.resample_<..> instead.

πŸ’₯ API-Break🧹 Removed✏️ Changed

The following generic algorithm API classes and functions have been moved from imfusion to imfusion.algorithm.

πŸ’₯ API-Break🌱 Added

show() is now non-blocking only when the Python interpreter is in interactive mode, but it becomes blocking otherwise. This can be controlled by the added argument block, which enforces a blocking behaviour when set to True, or enforces a non-blocking behaviour when set to False. If the new default blocking behaviour in non-interactive mode is undesired, the show() calls need to be updated by passing the extra argument block=False.

πŸ’₯ API-Break🧹 Removed✏️ Changed

Algorithm.output has been removed from imfusion.algorithm.Algorithm. imfusion.algorithm.Algorithm.compute() now directly returns the respective output.

πŸ’₯ API-Break🧹 Removed

Removed imfusion.opencv_build_version without replacement.

πŸ’₯ API-Break🧹 Removed✏️ Changed

Removed imfusion.mesh namespace. Moved imfusion.mesh.create to imfusion.Mesh.create(). Moved imfusion.mesh.Primitive to imfusion.Mesh.Primitive. Moved imfusion.mesh.PointDistanceResult to imfusion.processing.PointDistanceResult. Moved and renamed imfusion.mesh.point_distance to imfusion.processing.compute_point_distance().

πŸ’₯ API-Break🧹 Removed

imfusion.algorithm_name was removed without replacement.

πŸ’₯ API-Break🧹 Removed

Removed the following imfusion.MemImage processing methods:

  • imfusion.MemImage.resize

  • imfusion.MemImage.crop

  • imfusion.MemImage.pad

  • imfusion.MemImage.downsample

  • imfusion.MemImage.resample

  • imfusion.MemImage.rotate

  • imfusion.MemImage.flip

  • imfusion.MemImage.threshold

  • imfusion.MemImage.range_threshold

  • imfusion.MemImage.invert

  • imfusion.MemImage.convert_to_gray

  • imfusion.MemImage.create_float

Use the corresponding functions in imfusion.processing instead.

πŸ’₯ API-BreakπŸ•°οΈ Deprecation🧹 Removed✏️ Changed

Removed imfusion.open, imfusion.io.open, imfusion.io.write, and imfusion.io.CompressionMode. Deprecated imfusion.load() and imfusion.save(). Added imfusion.io.load() and imfusion.io.save(). imfusion.load() and imfusion.save() now forward to imfusion.io.load and imfusion.io.save(), respectively.

πŸ’₯ API-BreakπŸ•°οΈ Deprecation✏️ Changed

The following generic algorithm API functions have been deprecated in imfusion and moved to imfusion.algorithm.

πŸ’₯ API-Break✏️ Changed

Enums in the imfusion base module now use Python’s standard library enum types via pybind11’s py::native_enum. As a result, enum values are now native Python enum instances. The behavior of type(...), isinstance(...), identity checks, and the output of repr(...) and str(...) may differ from previous releases. Previously, enum values were wrapper objects rather than native Python enum instances. They had to be compared using == because identity checks (is) were not reliable. Enum values now follow standard Python enum semantics, so expressions such as value is MyEnum.MEMBER behave as expected. Likewise, enum values are now instances of their corresponding Python enum class, so checks such as isinstance(value, MyEnum) and type(value) is MyEnum also behave as expected.

PaddingMode can no longer be constructed from a member name using imfusion.PaddingMode("ZERO"). Use standard enum member lookup instead: imfusion.PaddingMode["ZERO"].

πŸ’₯ API-Break✏️ Changed

Python algorithms can now be registered in the ImFusion Suite using the imfusion.algorithm.register() decorator instead of subclassing imfusion.Algorithm. Input compatibility is declared with class attributes of type imfusion.algorithm.Input (replacing convert_input), Parameters are declared with class attributes such as imfusion.algorithm.ParamInt (replacing self.add_param). The main execution method is now __call__ instead of compute.

πŸ•°οΈ Deprecation
✏️ Changed

Registering a new Python algorithm in the ImFusionSuite now automatically unregisters any existing Python algorithm with the same class name or display name. Previously, only algorithms with the same display name were unregistered, which could lead to an error when the same class name was registered again.

✏️ Changed

Changed return type of imfusion.imagedescriptor.spacing from numpy.ndarray to imfusion.typing.spacing.

✏️ Changed🌱 Added
πŸ”§ Fixed

Corrected mismatched property names from imfusion.ImageDescriptorWorld.pixel_to_texture_matrix / imfusion.ImageDescriptorWorld.texture_to_pixel_matrix to imfusion.ImageDescriptorWorld.image_to_texture_matrix / imfusion.ImageDescriptorWorld.texture_to_image_matrix. The previous names were misleading and did not reflect the actual behavior. The underlying functionality remains unchanged.

πŸ”§ Fixed

Fixed a bug where changing imfusion.SharedImage.shift, imfusion.SharedImage.scale or imfusion.SharedImage.metric and then retrieving them again would show no change if the GPU representation was the most up-to-date one.

πŸ”§ Fixed

Fixed imfusion.ImageDescriptorWorld.has_index(), which previously called imfusion.ImageDescriptorWorld.index() and thus returned an index instead of checking for validity. It now correctly returns a boolean that indicates whether a pixel at (x, y, z) exists.

🌱 Added
🌱 Added

Added logic to automatically use the dedicated GPU on Laptops upon importing imfusion.

🌱 Added
🌱 Added

The Visualizer, invoked by show(), now supports Data other than SharedImageSet.

🌱 Added
🌱 Added

Added imfusion.typing module for additional type hints and improved type safety.

Release 0.11.0#

Tags

Description

✏️ ChangedπŸ”§ Fixed

Changed ImageDescriptor bindings to support round-trip construction via eval(repr(obj)).

✏️ Changed

Changed return type of imfusion.SharedImage.spacing() from numpy.ndarray to collections.namedtuple.

🌱 Added

Added __repr__ to imfusion.Properties

🌱 Added
🌱 Added

Added more informative error message when loading of our extension module fails due to missing libpython shared library on Linux.

🌱 Added

Algorithms can now be unregistered without prepending the PYTHON. prefix.

Release 0.10.0#

Tags

Description

πŸ’₯ API-Break✏️ Changed

Changed add_algorithm() to raise an exception if the algorithm could not be constructed.

πŸ’₯ API-Break✏️ Changed

Changed the handling of annotation’s partial modification from the python console. Partial annotations are no longer allowed.

πŸ’₯ API-Break✏️ Changed

Changed the import of bindings to remove the _bindings module from the reprs of all classes.

✏️ Changed

show() now applies prettier view animations.

πŸ”§ Fixed

Fixed the visualizer unsynced scrolling in multi-frame 2D+t image or 3D volume sets.

πŸ”§ Fixed

Fixed MacOS / Windows possible missing display update, until the next β€œmouse move” event, when selecting different data using the data selection button.

πŸ”§ Fixed

Fixed the handling of annotations after they have been deleted in the ImFusionSuite.

πŸ”§ Fixed

Fixed existing parameter attributes being overwritten in configuration()

πŸ”§ Fixed

Fixed some visualization glitches caused by numerical cancellation when loading images using only a small subset of the intensity range of the image data type.

πŸ”§ Fixed

Fixed delayed GUI update when modifying annotations or data names in the python console integrated within the ImFusionSuite.

πŸ”§ Fixed

Fixed show() not being launched correctly after importing opencv-python with import cv2.

🌱 Added
🌱 Added

Added overload of show() taking as a parameter the file path to be loaded and displayed.

🌱 Added

Added a scrollbar, when the input data allows for scrolling, to the visualizer launched by show().

🌱 Added
🌱 Added

Added the BOX annotation type.

🌱 Added

Added python bindings for the recently introduced DataSourceComponent.

🌱 Added

Added Python bindings for Mask and all derived classes.

🌱 Added

Added support to interchangeably pass os.PathLike or str as function arguments that expects paths, such as save(), load().