PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::encoding::compression Namespace Reference

Classes

class  codec_factory
 Factory class for creating compression codec instances. More...
 
class  compression_codec
 Abstract base class for image compression codecs. More...
 
struct  compression_options
 Compression quality settings for lossy codecs. More...
 
struct  compression_result
 Successful result of a compression/decompression operation. More...
 
class  frame_deflate_codec
 Frame-level Deflate codec implementation (Supplement 244). More...
 
class  hevc_codec
 HEVC/H.265 codec implementation for video-encoded multi-frame DICOM. More...
 
class  htj2k_codec
 High-Throughput JPEG 2000 (HTJ2K) codec implementation. More...
 
struct  image_params
 Parameters describing image pixel data. More...
 
class  jpeg2000_codec
 JPEG 2000 codec implementation supporting both lossless and lossy modes. More...
 
class  jpeg_baseline_codec
 JPEG Baseline (Process 1) codec implementation. More...
 
class  jpeg_lossless_codec
 JPEG Lossless (Process 14, Selection Value 1) codec implementation. More...
 
class  jpeg_ls_codec
 JPEG-LS codec implementation supporting both lossless and near-lossless modes. More...
 
class  jpegxl_codec
 JPEG XL codec implementation (Supplement 232). More...
 
class  rle_codec
 DICOM RLE Lossless codec implementation. More...
 

Typedefs

using codec_result = kcenon::pacs::Result<compression_result>
 Result type alias for compression operations using kcenon::pacs::Result<T> pattern.
 

Enumerations

enum class  photometric_interpretation {
  monochrome1 , monochrome2 , rgb , ycbcr_full ,
  ycbcr_full_422 , palette_color , unknown
}
 Photometric interpretation of pixel data. More...
 

Functions

std::string to_string (photometric_interpretation pi)
 Converts photometric interpretation to DICOM string value.
 
photometric_interpretation parse_photometric_interpretation (const std::string &str)
 Parses a DICOM photometric interpretation string.
 

Typedef Documentation

◆ codec_result

Result type alias for compression operations using kcenon::pacs::Result<T> pattern.

Definition at line 67 of file compression_codec.h.

Enumeration Type Documentation

◆ photometric_interpretation

Photometric interpretation of pixel data.

Defines how pixel values should be interpreted for display.

See also
DICOM PS3.3 Section C.7.6.3.1.2
Enumerator
monochrome1 

Minimum pixel value displayed as white.

monochrome2 

Minimum pixel value displayed as black.

rgb 

Red, Green, Blue color model.

ycbcr_full 

YCbCr full range (JPEG standard)

ycbcr_full_422 

YCbCr 4:2:2 subsampling.

palette_color 

Palette color lookup table.

unknown 

Unknown or unsupported interpretation.

Definition at line 25 of file image_params.h.

Function Documentation

◆ parse_photometric_interpretation()

photometric_interpretation kcenon::pacs::encoding::compression::parse_photometric_interpretation ( const std::string & str)
inlinenodiscard

Parses a DICOM photometric interpretation string.

Parameters
strThe DICOM string value
Returns
The corresponding enum value

Definition at line 64 of file image_params.h.

65 {
66 if (str == "MONOCHROME1") return photometric_interpretation::monochrome1;
67 if (str == "MONOCHROME2") return photometric_interpretation::monochrome2;
68 if (str == "RGB") return photometric_interpretation::rgb;
69 if (str == "YBR_FULL") return photometric_interpretation::ycbcr_full;
70 if (str == "YBR_FULL_422") return photometric_interpretation::ycbcr_full_422;
71 if (str == "PALETTE COLOR") return photometric_interpretation::palette_color;
72 return photometric_interpretation::unknown;
73}

References monochrome1, monochrome2, palette_color, rgb, unknown, ycbcr_full, and ycbcr_full_422.

◆ to_string()

std::string kcenon::pacs::encoding::compression::to_string ( photometric_interpretation pi)
inlinenodiscard

Converts photometric interpretation to DICOM string value.

Parameters
piThe photometric interpretation enum value
Returns
DICOM-compliant string representation

Definition at line 40 of file image_params.h.

40 {
41 switch (pi) {
42 case photometric_interpretation::monochrome1:
43 return "MONOCHROME1";
44 case photometric_interpretation::monochrome2:
45 return "MONOCHROME2";
46 case photometric_interpretation::rgb:
47 return "RGB";
48 case photometric_interpretation::ycbcr_full:
49 return "YBR_FULL";
50 case photometric_interpretation::ycbcr_full_422:
51 return "YBR_FULL_422";
52 case photometric_interpretation::palette_color:
53 return "PALETTE COLOR";
54 default:
55 return "UNKNOWN";
56 }
57}

References monochrome1, monochrome2, palette_color, rgb, ycbcr_full, and ycbcr_full_422.