|
PACS System 0.1.0
PACS DICOM system library
|
#include <ai_result_handler.h>

Classes | |
| class | impl |
Public Member Functions | |
| virtual | ~ai_result_handler () |
| Destructor. | |
| ai_result_handler (const ai_result_handler &)=delete | |
| auto | operator= (const ai_result_handler &) -> ai_result_handler &=delete |
| ai_result_handler (ai_result_handler &&) noexcept | |
| auto | operator= (ai_result_handler &&) noexcept -> ai_result_handler & |
| void | configure (const ai_handler_config &config) |
| Configure handler behavior. | |
| auto | get_config () const -> ai_handler_config |
| Get current configuration. | |
| void | set_received_callback (ai_result_received_callback callback) |
| Set callback for AI result reception notifications. | |
| void | set_pre_store_validator (pre_store_validator validator) |
| Set custom pre-storage validator. | |
| auto | receive_structured_report (const core::dicom_dataset &sr) -> VoidResult |
| Receive and store an AI-generated Structured Report. | |
| auto | validate_sr_template (const core::dicom_dataset &sr) -> validation_result |
| Validate SR template conformance. | |
| auto | get_cad_findings (std::string_view sr_sop_instance_uid) -> Result< std::vector< cad_finding > > |
| Extract CAD findings from a Structured Report. | |
| auto | receive_segmentation (const core::dicom_dataset &seg) -> VoidResult |
| Receive and store an AI-generated Segmentation object. | |
| auto | validate_segmentation (const core::dicom_dataset &seg) -> validation_result |
| Validate segmentation data integrity. | |
| auto | get_segment_info (std::string_view seg_sop_instance_uid) -> Result< std::vector< segment_info > > |
| Get segment information from a stored Segmentation. | |
| auto | receive_presentation_state (const core::dicom_dataset &pr) -> VoidResult |
| Receive and store an AI-generated Presentation State. | |
| auto | validate_presentation_state (const core::dicom_dataset &pr) -> validation_result |
| Validate Presentation State. | |
| auto | link_to_source (std::string_view result_uid, std::string_view source_study_uid) -> VoidResult |
| Link an AI result to its source study. | |
| auto | link_to_source (std::string_view result_uid, const source_reference &references) -> VoidResult |
| Link an AI result with detailed source references. | |
| auto | get_source_reference (std::string_view result_uid) -> Result< source_reference > |
| Get source references for an AI result. | |
| auto | find_ai_results_for_study (std::string_view study_instance_uid) -> Result< std::vector< ai_result_info > > |
| Find all AI results linked to a study. | |
| auto | find_ai_results_by_type (std::string_view study_instance_uid, ai_result_type type) -> Result< std::vector< ai_result_info > > |
| Find AI results by type. | |
| auto | get_ai_result_info (std::string_view sop_instance_uid) -> std::optional< ai_result_info > |
| Get AI result information by SOP Instance UID. | |
| auto | exists (std::string_view sop_instance_uid) const -> bool |
| Check if an AI result exists. | |
| auto | remove (std::string_view sop_instance_uid) -> VoidResult |
| Remove an AI result and its source links. | |
| auto | remove_ai_results_for_study (std::string_view study_instance_uid) -> Result< std::size_t > |
| Remove all AI results linked to a study. | |
Static Public Member Functions | |
| static auto | create (std::shared_ptr< storage::storage_interface > storage, std::shared_ptr< storage::index_database > database) -> std::unique_ptr< ai_result_handler > |
| Create an AI result handler. | |
Protected Member Functions | |
| ai_result_handler (std::shared_ptr< storage::storage_interface > storage, std::shared_ptr< storage::index_database > database) | |
| Protected constructor - use create() factory method. | |
Private Attributes | |
| std::unique_ptr< impl > | pimpl_ |
Definition at line 259 of file ai_result_handler.h.
|
virtualdefault |
Destructor.
|
delete |
|
defaultnoexcept |
|
protected |
Protected constructor - use create() factory method.
Definition at line 246 of file ai_result_handler.cpp.
| void kcenon::pacs::ai::ai_result_handler::configure | ( | const ai_handler_config & | config | ) |
Configure handler behavior.
| config | Configuration options |
Definition at line 262 of file ai_result_handler.cpp.
|
staticnodiscard |
Create an AI result handler.
| storage | Storage backend for persisting DICOM objects |
| database | Index database for metadata queries |
Definition at line 238 of file ai_result_handler.cpp.
|
nodiscard |
Check if an AI result exists.
| sop_instance_uid | SOP Instance UID to check |
Definition at line 701 of file ai_result_handler.cpp.
|
nodiscard |
Find AI results by type.
| study_instance_uid | Study Instance UID |
| type | Type of AI result to search for |
Definition at line 678 of file ai_result_handler.cpp.
References uid.
|
nodiscard |
Find all AI results linked to a study.
| study_instance_uid | Study Instance UID |
Definition at line 653 of file ai_result_handler.cpp.
References uid.
|
nodiscard |
Get AI result information by SOP Instance UID.
| sop_instance_uid | SOP Instance UID of the AI result |
Definition at line 692 of file ai_result_handler.cpp.
|
nodiscard |
Extract CAD findings from a Structured Report.
| sr_sop_instance_uid | SOP Instance UID of the SR |
Definition at line 375 of file ai_result_handler.cpp.
|
nodiscard |
Get current configuration.
Definition at line 266 of file ai_result_handler.cpp.
References kcenon::pacs::ai::ai_result_handler::impl::config_, and pimpl_.
|
nodiscard |
Get segment information from a stored Segmentation.
| seg_sop_instance_uid | SOP Instance UID of the SEG |
Definition at line 491 of file ai_result_handler.cpp.
|
nodiscard |
Get source references for an AI result.
| result_uid | SOP Instance UID of the AI result |
Definition at line 635 of file ai_result_handler.cpp.
|
nodiscard |
Link an AI result with detailed source references.
| result_uid | SOP Instance UID of the AI result |
| references | Source references (study, series, instances) |
Definition at line 607 of file ai_result_handler.cpp.
|
nodiscard |
Link an AI result to its source study.
Creates a reference association between the AI result and the original study/series/instances it was derived from.
| result_uid | SOP Instance UID of the AI result |
| source_study_uid | Study Instance UID of the source |
Definition at line 599 of file ai_result_handler.cpp.
References kcenon::pacs::ai::source_reference::study_instance_uid.
|
defaultnoexcept |
|
delete |
|
nodiscard |
Receive and store an AI-generated Presentation State.
Validates the PR dataset and stores it linked to source images.
| pr | The Presentation State dataset |
Definition at line 517 of file ai_result_handler.cpp.
References kcenon::pacs::ai::presentation_state, kcenon::pacs::core::tags::sop_class_uid, and kcenon::pacs::ai::valid.
|
nodiscard |
Receive and store an AI-generated Segmentation object.
Validates the SEG dataset for required tags and segment sequence, then stores it and links it to the source images.
| seg | The Segmentation dataset |
Definition at line 403 of file ai_result_handler.cpp.
References kcenon::pacs::ai::segmentation, kcenon::pacs::core::tags::sop_class_uid, and kcenon::pacs::ai::valid.
|
nodiscard |
Receive and store an AI-generated Structured Report.
Validates the SR dataset for required tags and template conformance, then stores it and links it to the source study.
| sr | The Structured Report dataset |
Definition at line 282 of file ai_result_handler.cpp.
References kcenon::pacs::core::tags::sop_class_uid, kcenon::pacs::ai::structured_report, and kcenon::pacs::ai::valid.
|
nodiscard |
Remove an AI result and its source links.
| sop_instance_uid | SOP Instance UID of the AI result to remove |
Definition at line 716 of file ai_result_handler.cpp.
|
nodiscard |
Remove all AI results linked to a study.
| study_instance_uid | Study Instance UID |
Definition at line 734 of file ai_result_handler.cpp.
References uid.
| void kcenon::pacs::ai::ai_result_handler::set_pre_store_validator | ( | pre_store_validator | validator | ) |
Set custom pre-storage validator.
| validator | Function to validate before storage |
Definition at line 274 of file ai_result_handler.cpp.
References pimpl_, and kcenon::pacs::ai::ai_result_handler::impl::pre_store_validator_.
| void kcenon::pacs::ai::ai_result_handler::set_received_callback | ( | ai_result_received_callback | callback | ) |
Set callback for AI result reception notifications.
| callback | Function to call when AI result is received |
Definition at line 270 of file ai_result_handler.cpp.
References pimpl_, and kcenon::pacs::ai::ai_result_handler::impl::received_callback_.
|
nodiscard |
Validate Presentation State.
| pr | The Presentation State dataset to validate |
Definition at line 577 of file ai_result_handler.cpp.
References kcenon::pacs::ai::missing_required_tags, kcenon::pacs::ai::validation_result::missing_tags, kcenon::pacs::core::tags::sop_class_uid, kcenon::pacs::ai::validation_result::status, and kcenon::pacs::ai::valid.
|
nodiscard |
Validate segmentation data integrity.
| seg | The Segmentation dataset to validate |
Definition at line 463 of file ai_result_handler.cpp.
References kcenon::pacs::ai::validation_result::error_message, kcenon::pacs::ai::invalid_segment_data, kcenon::pacs::ai::validation_result::status, and kcenon::pacs::ai::valid.
|
nodiscard |
Validate SR template conformance.
| sr | The Structured Report dataset to validate |
Definition at line 344 of file ai_result_handler.cpp.
References kcenon::pacs::ai::validation_result::error_message, kcenon::pacs::ai::invalid_template, kcenon::pacs::ai::validation_result::status, and kcenon::pacs::ai::valid.
|
private |
Definition at line 525 of file ai_result_handler.h.
Referenced by get_config(), set_pre_store_validator(), and set_received_callback().