Coverage for openhcs/processing/__init__.py: 100.0%

4 statements  

« prev     ^ index     » next       coverage.py v7.10.3, created at 2025-08-14 05:57 +0000

1""" 

2Image processing module for openhcs. 

3 

4This module provides image processing functionality for openhcs, 

5including image normalization, sharpening, and other operations. 

6 

7It also includes a function registry system that automatically registers 

8functions decorated with memory type decorators (@numpy, @cupy, etc.) for 

9runtime discovery and inspection. 

10 

11Doctrinal Clauses: 

12- Clause 3 — Declarative Primacy: All functions are pure and stateless 

13- Clause 88 — No Inferred Capabilities: Explicit backend requirements 

14- Clause 106-A — Declared Memory Types: All methods specify memory types 

15- Clause 273 — Memory Backend Restrictions: GPU-only implementations are marked 

16""" 

17 

18 

19# Import backend subpackages 

20from openhcs.processing.backends import (analysis, assemblers, enhance, 

21 pos_gen, processors) 

22# Import function registry components 

23from openhcs.processing.func_registry import (FUNC_REGISTRY, 

24 get_function_info, 

25 get_functions_by_memory_type, 

26 get_function_by_name, 

27 get_all_function_names, 

28 get_valid_memory_types, 

29 is_registry_initialized) 

30# Import decorators directly from core module (function_registry.py is deprecated) 

31from openhcs.core.memory.decorators import (cupy, jax, numpy, 

32 pyclesperanto, tensorflow, torch) 

33 

34__all__ = [ 

35 # Image processor components 

36 

37 # Function registry components 

38 "numpy", "cupy", "torch", "tensorflow", "jax", 

39 "FUNC_REGISTRY", "get_functions_by_memory_type", "get_function_info", 

40 "get_valid_memory_types", "is_registry_initialized", 

41 

42 # Backend subpackages 

43 "processors", 

44 "enhance", 

45 "pos_gen", 

46 "assemblers", 

47 "analysis", 

48]