pub trait ImageCodec: Send + Sync {
// Required methods
fn transfer_syntax_uids(&self) -> &[&str];
fn decode(
&self,
encapsulated: &PixelData,
rows: u16,
columns: u16,
samples_per_pixel: u8,
bits_allocated: u8,
) -> DcmResult<Vec<u8>>;
fn encode(
&self,
pixels: &[u8],
rows: u16,
columns: u16,
samples_per_pixel: u8,
bits_allocated: u8,
) -> DcmResult<PixelData>;
}Expand description
Trait for DICOM image codecs.
Each codec handles one or more transfer syntaxes. The codec is responsible for decompressing/compressing pixel data items.
Required Methods§
Sourcefn transfer_syntax_uids(&self) -> &[&str]
fn transfer_syntax_uids(&self) -> &[&str]
UID(s) of the transfer syntax(es) this codec handles.