pub trait PixelDataObject {
    fn rows(&self) -> Option<u16>;
    fn cols(&self) -> Option<u16>;
    fn samples_per_pixel(&self) -> Option<u16>;
    fn bits_allocated(&self) -> Option<u16>;
    fn number_of_frames(&self) -> Option<u16>;
    fn number_of_fragments(&self) -> Option<u32>;
    fn fragment(&self, fragment: usize) -> Option<Vec<u8>>;
    fn raw_pixel_data(&self) -> Option<RawPixelData>;
}
Expand description

A DICOM object trait to be interpreted as pixel data.

This trait extends the concept of DICOM object as defined in dicom_object, in order to retrieve important pieces of the object for pixel data decoding into images or multi-dimensional arrays.

It is defined in this crate so that transfer syntax implementers only have to depend on dicom_encoding.

Required Methods§

Return the Rows attribute or None if it is not found

Return the Columns attribute or None if it is not found

Return the SamplesPerPixel attribute or None if it is not found

Return the BitsAllocated attribute or None if it is not set

Return the NumberOfFrames attribute or None if it is not set

Returns the number of fragments or None for native pixel data

Return a specific encoded pixel fragment by index as Vec or None if no pixel data is found

Should return either a byte slice/vector if native pixel data or byte fragments if encapsulated. Returns None if no pixel data is found

Implementors§