19#ifndef PACS_SERVICES_PRINT_SCU_HPP
20#define PACS_SERVICES_PRINT_SCU_HPP
70 return (
status & 0xF000) == 0xB000;
242 explicit print_scu(std::shared_ptr<di::ILogger> logger =
nullptr);
251 std::shared_ptr<di::ILogger> logger =
nullptr);
287 std::string_view session_uid);
318 std::string_view film_box_uid);
329 std::string_view film_box_uid);
349 std::string_view image_box_uid,
351 bool use_color =
false);
375 [[nodiscard]]
size_t images_set() const noexcept;
391 network::association& assoc,
392 std::string_view sop_class_uid) const;
DICOM Association management per PS3.8.
print_scu(std::shared_ptr< di::ILogger > logger=nullptr)
Construct Print SCU with default configuration.
size_t film_boxes_created() const noexcept
void reset_statistics() noexcept
network::Result< print_result > create_film_session(network::association &assoc, const print_session_data &data)
Create a new Film Session (N-CREATE)
network::Result< print_result > print_film_box(network::association &assoc, std::string_view film_box_uid)
Print a Film Box (N-ACTION)
network::Result< print_result > create_film_box(network::association &assoc, const print_film_box_data &data)
Create a new Film Box (N-CREATE)
print_scu & operator=(print_scu &&)=delete
size_t prints_executed() const noexcept
std::atomic< size_t > sessions_created_
Statistics.
size_t sessions_created() const noexcept
network::Result< print_result > delete_film_box(network::association &assoc, std::string_view film_box_uid)
Delete a Film Box (N-DELETE)
network::Result< print_result > delete_film_session(network::association &assoc, std::string_view session_uid)
Delete a Film Session (N-DELETE)
std::optional< uint8_t > find_print_context(network::association &assoc, std::string_view sop_class_uid) const
Find an accepted presentation context for a print SOP class.
print_scu & operator=(const print_scu &)=delete
network::Result< print_result > query_printer_status(network::association &assoc)
Query printer status (N-GET)
size_t printer_queries() const noexcept
std::atomic< uint16_t > message_id_counter_
Message ID counter.
std::atomic< size_t > printer_queries_
std::string generate_uid() const
Generate a unique SOP Instance UID.
print_scu_config config_
Configuration.
network::Result< print_result > set_image_box(network::association &assoc, std::string_view image_box_uid, const print_image_data &data, bool use_color=false)
Set Image Box pixel data (N-SET)
print_scu(print_scu &&)=delete
std::shared_ptr< di::ILogger > logger_
Logger instance.
size_t images_set() const noexcept
std::atomic< size_t > film_boxes_created_
std::atomic< size_t > prints_executed_
print_scu(const print_scu &)=delete
uint16_t next_message_id() noexcept
Get the next message ID for DIMSE operations.
std::atomic< size_t > images_set_
DICOM Dataset - ordered collection of Data Elements.
DIMSE message encoding and decoding.
Logger interface for dependency injection.
DICOM Print Management SCP service (PS3.4 Annex H)
Data for creating a Film Box via N-CREATE.
std::string magnification_type
Magnification type (REPLICATE, BILINEAR, CUBIC, NONE)
std::string film_orientation
Film orientation (PORTRAIT, LANDSCAPE)
std::string film_size_id
Film size ID (8INX10IN, 14INX17IN, etc.)
std::string image_display_format
Image display format (e.g., "STANDARD\\1,1")
std::string film_session_uid
Parent film session SOP Instance UID.
Data for setting an Image Box via N-SET.
core::dicom_dataset pixel_data
Pixel data to set on the image box.
uint16_t image_position
Image position within the film box (1-based)
Result of a Print DIMSE-N operation.
core::dicom_dataset response_data
Response dataset (e.g., printer status, referenced image box UIDs)
std::chrono::milliseconds elapsed
Time taken for the operation.
bool is_error() const noexcept
Check if this was an error status.
bool is_warning() const noexcept
Check if this was a warning status.
std::string error_comment
Error comment from the SCP (if any)
uint16_t status
DIMSE status code (0x0000 = success)
std::string sop_instance_uid
SOP Instance UID (session, film box, image box, or printer)
bool is_success() const noexcept
Check if the operation was successful.
Configuration for Print SCU service.
bool auto_generate_uid
Auto-generate SOP Instance UIDs if not provided.
std::chrono::milliseconds timeout
Timeout for receiving DIMSE response.
Data for creating a Film Session via N-CREATE.
std::string medium_type
Medium type (PAPER, CLEAR FILM, BLUE FILM)
std::string film_session_label
Film session label.
std::string film_destination
Film destination (MAGAZINE, PROCESSOR)
std::string sop_instance_uid
SOP Instance UID (generated if empty)
uint32_t number_of_copies
Number of copies to print.
std::string print_priority
Print priority (HIGH, MED, LOW)