[−][src]Trait dicom_object::pixeldata::PixelData
Implemented by DICOM pixel data blocks retrieved from objects.
- Pixel data elements typically represent 2D images. This trait provides
- access to Pixel Data (7FE0,0010), Overlay Data (60xx,3000), or Waveform Data (5400,1010)
- in a similar fashion to a two-dimensional array.
Associated Types
type Pixel
The representation of an individual pixel.
Required methods
fn rows(&self) -> u32
Get the number of rows (height) of the slice.
fn columns(&self) -> u32
Get the number of columns (width) of the slice.
fn bits_per_pixel(&self) -> u32
Get the number of bits used to represent each pixel.
fn samples_per_pixel(&self) -> u16
Retrieve the number of samples (channels) per pixel.
fn pixel_at(&self, width: u32, height: u32) -> Result<Self::Pixel>
Obtain the pixel value in the given position. Can return PixelDataOutOfBounds error when the given coordinates are out of the slice's boundaries.