|
PACS System 0.1.0
PACS DICOM system library
|
Service for selective metadata retrieval and series navigation. More...
#include <metadata_service.h>

Public Member Functions | |
| metadata_service (std::shared_ptr< storage::index_database > database) | |
| Construct metadata service with database. | |
| ~metadata_service () | |
| Destructor. | |
| metadata_service (const metadata_service &)=delete | |
| Non-copyable, non-movable. | |
| metadata_service & | operator= (const metadata_service &)=delete |
| metadata_service (metadata_service &&)=delete | |
| metadata_service & | operator= (metadata_service &&)=delete |
| metadata_response | get_metadata (std::string_view sop_instance_uid, const metadata_request &request) |
| Get selective metadata for an instance. | |
| sorted_instances_response | get_sorted_instances (std::string_view series_uid, sort_order order=sort_order::position, bool ascending=true) |
| Get sorted instances for a series. | |
| navigation_info | get_navigation (std::string_view sop_instance_uid) |
| Get navigation info for an instance. | |
| voi_lut_info | get_voi_lut (std::string_view sop_instance_uid) |
| Get VOI LUT info from an instance. | |
| frame_info | get_frame_info (std::string_view sop_instance_uid) |
| Get frame information for an instance. | |
Static Public Member Functions | |
| static std::unordered_set< std::string > | get_preset_tags (metadata_preset preset) |
| Get tags for a specific preset. | |
| static std::vector< window_level_preset > | get_window_level_presets (std::string_view modality) |
| Get window/level presets for a modality. | |
Private Member Functions | |
| std::unordered_map< std::string, std::string > | read_dicom_tags (std::string_view file_path, const std::unordered_set< std::string > &requested_tags, bool include_private) |
| Read DICOM dataset from file. | |
| std::optional< std::string > | get_series_uid (std::string_view sop_instance_uid) |
| Get series UID for an instance. | |
Private Attributes | |
| std::shared_ptr< storage::index_database > | database_ |
| Database for instance lookups. | |
Service for selective metadata retrieval and series navigation.
Provides APIs for:
Definition at line 344 of file metadata_service.h.
|
explicit |
Construct metadata service with database.
| database | Index database for instance lookups |
Definition at line 172 of file metadata_service.cpp.
|
default |
Destructor.
|
delete |
Non-copyable, non-movable.
|
delete |
|
nodiscard |
Get frame information for an instance.
| sop_instance_uid | SOP Instance UID |
Definition at line 641 of file metadata_service.cpp.
References kcenon::pacs::core::tags::columns, database_, kcenon::pacs::web::frame_info::error(), kcenon::pacs::web::frame_info::ok(), kcenon::pacs::core::dicom_file::open(), and kcenon::pacs::core::tags::rows.

|
nodiscard |
Get selective metadata for an instance.
| sop_instance_uid | SOP Instance UID |
| request | Metadata request parameters |
Definition at line 259 of file metadata_service.cpp.
References database_, kcenon::pacs::web::metadata_response::error(), get_preset_tags(), kcenon::pacs::web::metadata_request::include_private, kcenon::pacs::web::metadata_response::ok(), kcenon::pacs::web::metadata_request::preset, read_dicom_tags(), and kcenon::pacs::web::metadata_request::tags.

|
nodiscard |
Get navigation info for an instance.
| sop_instance_uid | SOP Instance UID |
Definition at line 480 of file metadata_service.cpp.
References database_, kcenon::pacs::web::navigation_info::error(), kcenon::pacs::web::navigation_info::first, get_series_uid(), get_sorted_instances(), kcenon::pacs::web::navigation_info::index, kcenon::pacs::web::navigation_info::last, kcenon::pacs::web::navigation_info::next, kcenon::pacs::web::navigation_info::ok(), kcenon::pacs::web::position, kcenon::pacs::web::navigation_info::previous, and kcenon::pacs::web::navigation_info::total.

|
staticnodiscard |
Get tags for a specific preset.
| preset | The metadata preset |
Definition at line 182 of file metadata_service.cpp.
References kcenon::pacs::web::acquisition, kcenon::pacs::web::image_display, kcenon::pacs::web::multiframe, kcenon::pacs::web::patient_info, kcenon::pacs::web::positioning, and kcenon::pacs::web::window_level.
Referenced by get_metadata().

|
nodiscardprivate |
Get series UID for an instance.
| sop_instance_uid | SOP Instance UID |
Definition at line 348 of file metadata_service.cpp.
References database_.
Referenced by get_navigation().

|
nodiscard |
Get sorted instances for a series.
| series_uid | Series Instance UID |
| order | Sort order |
| ascending | Sort direction |
Definition at line 368 of file metadata_service.cpp.
References kcenon::pacs::core::tags::acquisition_time, kcenon::pacs::web::acquisition_time, kcenon::pacs::web::sorted_instance::acquisition_time, database_, kcenon::pacs::web::sorted_instances_response::error(), kcenon::pacs::core::tags::image_position_patient, kcenon::pacs::web::sorted_instance::image_position_patient, kcenon::pacs::web::instance_number, kcenon::pacs::web::sorted_instance::instance_number, kcenon::pacs::web::sorted_instances_response::ok(), kcenon::pacs::core::dicom_file::open(), kcenon::pacs::web::position, kcenon::pacs::core::tags::slice_location, kcenon::pacs::web::sorted_instance::slice_location, and kcenon::pacs::web::sorted_instance::sop_instance_uid.
Referenced by get_navigation().


|
nodiscard |
Get VOI LUT info from an instance.
| sop_instance_uid | SOP Instance UID |
Definition at line 570 of file metadata_service.cpp.
References database_, kcenon::pacs::web::voi_lut_info::error(), kcenon::pacs::web::voi_lut_info::ok(), kcenon::pacs::core::dicom_file::open(), kcenon::pacs::core::tags::rescale_intercept, kcenon::pacs::core::tags::rescale_slope, kcenon::pacs::core::tags::window_center, and kcenon::pacs::core::tags::window_width.

|
staticnodiscard |
Get window/level presets for a modality.
| modality | Modality code (CT, MR, etc.) |
Definition at line 541 of file metadata_service.cpp.
Referenced by kcenon::pacs::web::endpoints::register_metadata_endpoints_impl().

|
delete |
|
delete |
|
nodiscardprivate |
Read DICOM dataset from file.
| file_path | Path to DICOM file |
Definition at line 303 of file metadata_service.cpp.
References kcenon::pacs::core::dicom_tag::is_private(), and kcenon::pacs::core::dicom_file::open().
Referenced by get_metadata().


|
private |
Database for instance lookups.
Definition at line 440 of file metadata_service.h.
Referenced by get_frame_info(), get_metadata(), get_navigation(), get_series_uid(), get_sorted_instances(), and get_voi_lut().