PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::storage::instance_record Struct Reference

Instance record from the database. More...

#include <instance_record.h>

Collaboration diagram for kcenon::pacs::storage::instance_record:
Collaboration graph

Public Member Functions

auto is_valid () const noexcept -> bool
 Check if this record has valid data.
 

Public Attributes

int64_t pk {0}
 Primary key (auto-generated)
 
int64_t series_pk {0}
 Foreign key to series table.
 
std::string sop_uid
 SOP Instance UID - DICOM tag (0008,0018)
 
std::string sop_class_uid
 SOP Class UID - DICOM tag (0008,0016)
 
std::optional< int > instance_number
 Instance Number - DICOM tag (0020,0013)
 
std::string transfer_syntax
 Transfer Syntax UID - DICOM tag (0002,0010)
 
std::string content_date
 Content Date - DICOM tag (0008,0023) format: YYYYMMDD.
 
std::string content_time
 Content Time - DICOM tag (0008,0033) format: HHMMSS.
 
std::optional< int > rows
 Image Rows - DICOM tag (0028,0010)
 
std::optional< int > columns
 Image Columns - DICOM tag (0028,0011)
 
std::optional< int > bits_allocated
 Bits Allocated - DICOM tag (0028,0100)
 
std::optional< int > number_of_frames
 Number of Frames - DICOM tag (0028,0008)
 
std::string file_path
 File path where the instance is stored.
 
int64_t file_size {0}
 File size in bytes.
 
std::string file_hash
 File hash (e.g., MD5 or SHA-256) for integrity verification.
 
std::chrono::system_clock::time_point created_at
 Record creation timestamp.
 

Detailed Description

Instance record from the database.

Represents a single DICOM instance (SOP Instance) record with all instance-level information. Maps directly to the instances table.

Definition at line 32 of file instance_record.h.

Member Function Documentation

◆ is_valid()

auto kcenon::pacs::storage::instance_record::is_valid ( ) const -> bool
inlinenodiscardnoexcept

Check if this record has valid data.

Returns
true if sop_uid and file_path are not empty
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 86 of file instance_record.h.

86 {
87 return !sop_uid.empty() && !file_path.empty();
88 }
std::string sop_uid
SOP Instance UID - DICOM tag (0008,0018)
std::string file_path
File path where the instance is stored.

References file_path, and sop_uid.

Member Data Documentation

◆ bits_allocated

std::optional<int> kcenon::pacs::storage::instance_record::bits_allocated

Bits Allocated - DICOM tag (0028,0100)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 64 of file instance_record.h.

◆ columns

std::optional<int> kcenon::pacs::storage::instance_record::columns

Image Columns - DICOM tag (0028,0011)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 61 of file instance_record.h.

◆ content_date

std::string kcenon::pacs::storage::instance_record::content_date

Content Date - DICOM tag (0008,0023) format: YYYYMMDD.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 52 of file instance_record.h.

◆ content_time

std::string kcenon::pacs::storage::instance_record::content_time

Content Time - DICOM tag (0008,0033) format: HHMMSS.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 55 of file instance_record.h.

◆ created_at

std::chrono::system_clock::time_point kcenon::pacs::storage::instance_record::created_at

◆ file_hash

std::string kcenon::pacs::storage::instance_record::file_hash

File hash (e.g., MD5 or SHA-256) for integrity verification.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 76 of file instance_record.h.

◆ file_path

std::string kcenon::pacs::storage::instance_record::file_path

File path where the instance is stored.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 70 of file instance_record.h.

Referenced by is_valid().

◆ file_size

int64_t kcenon::pacs::storage::instance_record::file_size {0}

◆ instance_number

std::optional<int> kcenon::pacs::storage::instance_record::instance_number

Instance Number - DICOM tag (0020,0013)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 46 of file instance_record.h.

◆ number_of_frames

std::optional<int> kcenon::pacs::storage::instance_record::number_of_frames

Number of Frames - DICOM tag (0028,0008)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 67 of file instance_record.h.

◆ pk

int64_t kcenon::pacs::storage::instance_record::pk {0}

Primary key (auto-generated)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 34 of file instance_record.h.

34{0};

◆ rows

std::optional<int> kcenon::pacs::storage::instance_record::rows

Image Rows - DICOM tag (0028,0010)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 58 of file instance_record.h.

◆ series_pk

int64_t kcenon::pacs::storage::instance_record::series_pk {0}

Foreign key to series table.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 37 of file instance_record.h.

37{0};

◆ sop_class_uid

std::string kcenon::pacs::storage::instance_record::sop_class_uid

SOP Class UID - DICOM tag (0008,0016)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 43 of file instance_record.h.

◆ sop_uid

std::string kcenon::pacs::storage::instance_record::sop_uid

SOP Instance UID - DICOM tag (0008,0018)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 40 of file instance_record.h.

Referenced by is_valid().

◆ transfer_syntax

std::string kcenon::pacs::storage::instance_record::transfer_syntax

Transfer Syntax UID - DICOM tag (0002,0010)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/instance_record.h.

Definition at line 49 of file instance_record.h.


The documentation for this struct was generated from the following file: