Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added src/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions src/data_objs/seg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ def __init__(self):
self.seg_name: str
self.seg_mask: np.ndarray
self.pixdim: List[float] # voxel spacing in mm
# Visualization defaults
self.clahe_clip_limit: float = 1.2
self.gamma: float = 1.5
self.width_scale_axial: float = 1.0
self.width_scale_sagittal: float = 1.0
self.width_scale_coronal: float = 1.0
self.use_philips_ceus: bool = False
Empty file.
2 changes: 2 additions & 0 deletions src/image_preprocessing/functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .image_preprocessors.enhance_clahe import enhance_clahe
from .image_preprocessors.enhance_gamma import enhance_gamma
Comment on lines +1 to +2

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/image_preprocessing/options.get_im_preproc_funcs() already discovers preprocessing functions dynamically from image_preprocessors/, but this new functions.py file hard-codes and re-exports only enhance_clahe and enhance_gamma. This creates two competing “sources of truth” for available preprocessors and is likely to drift as more plugins are added.

Consider either removing this module and relying on the existing plugin discovery, or updating it to expose all preprocessors in a single, consistent way (e.g., via get_im_preproc_funcs() or an explicit, complete __all__).

Suggested change
from .image_preprocessors.enhance_clahe import enhance_clahe
from .image_preprocessors.enhance_gamma import enhance_gamma
from .options import get_im_preproc_funcs
# Discover all available image preprocessing functions using the existing
# plugin mechanism and expose them as module-level attributes. This keeps
# a single source of truth for available preprocessors.
_PREPROCESSOR_FUNCS = get_im_preproc_funcs()
# Make each discovered preprocessor directly importable from this module,
# e.g. `from .functions import enhance_clahe`.
globals().update(_PREPROCESSOR_FUNCS)
# Export all discovered preprocessors.
__all__ = sorted(_PREPROCESSOR_FUNCS.keys())

Copilot uses AI. Check for mistakes.
Empty file.
Loading