Skip to content

Refactoring core library#9

Merged
lstachowicz merged 8 commits into
masterfrom
refactoring-core-library
May 5, 2026
Merged

Refactoring core library#9
lstachowicz merged 8 commits into
masterfrom
refactoring-core-library

Conversation

@lstachowicz

Copy link
Copy Markdown
Owner

No description provided.

Add MetadataImporter class for importing numerical data files (.txt, .dat, .meta)
as grayscale images with memory-optimized streaming processing. Includes comprehensive
error handling, range normalization, cropping functionality, and Qt integration.

Features:
- Memory-optimized streaming import for large datasets
- MetadataImportSettingsDialog with range and crop configuration
- 7 detailed error types with user-friendly messages
- Integration with MainWindow File menu
- Comprehensive GoogleTest unit tests (9 test cases)
- 50.6% code coverage for MetadataImporter module

Resolves metadata import requirements from specification.
Extract core image processing and annotation functionality into separate,
reusable library modules (imgproc, segcore) with proper separation from
UI/application code. This enables framework-agnostic library usage and
improves code organization.

Changes:
- Create imgproc library: header-only image processing components
  (Frame, Kernel, Convolution) with POLYSEG_IMGPROC_* header guards
- Create segcore library: annotation/project management core
  (AnnotationSet, Project, Segment, Geometry, Display, Serialization)
  with POLYSEG_SEGCORE_* header guards
- Standardize all intra-library includes to angle-bracket format
  (#include <segcore/...> instead of "segcore/...")
- Update all consumers (src/, tests/) to use angle-bracket includes
- Add target_include_directories to PolySeg_lib for proper CMake
  include path propagation
- Decouple core business logic from Qt/UI dependencies for
  independent library reusability

This enables downstream projects to link against segcore/imgproc
without pulling in Qt dependencies or UI code.
- Apply clang-format to all library headers and source files
  (reorganize includes to match IncludeBlocks: Regroup policy)
- Update .clang-tidy configuration:
  - Add C++17 standard flag for proper namespace syntax recognition
  - Add include path for libs to resolve module includes
  - Exclude CMakeLists.txt from analysis (not C++ code)
- Add .cppcheck configuration with C++17 standard and include paths
- Add .cppcheckignore to exclude CMakeLists.txt and external dependencies
- Ensures proper static analysis without false positives on build files
- Document cppcheck, clang-format, clang-tidy usage
- Provide IDE-specific instructions (CLion, VSCode)
- Important: cppcheck requires --language=c++ flag for C++17 code
- Include build, test, and commit message guidelines
- Enable cppcheck with C++17 standard and proper language setting
- Configure include paths for libs/ and src/ modules
- Exclude external dependencies and test directories
- Enable auto-format with clang-format on save
- Update .gitignore to track .vscode/settings.json
Fix compiler warnings by using static_cast<int>() instead of (int)
for type conversions in debug output.
@lstachowicz lstachowicz force-pushed the refactoring-core-library branch from fb666f2 to 26ee9a8 Compare May 4, 2026 19:52
@lstachowicz lstachowicz merged commit 3bfaf99 into master May 5, 2026
4 checks passed
@lstachowicz lstachowicz deleted the refactoring-core-library branch May 5, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant