pub struct FrameMetadata {Show 20 fields
pub frame_index: u32,
pub rows: u16,
pub columns: u16,
pub number_of_frames: u32,
pub samples_per_pixel: u16,
pub bits_allocated: u16,
pub bits_stored: u16,
pub high_bit: u16,
pub pixel_representation: PixelRepresentation,
pub instance_number: i32,
pub pixel_spacing: Option<(f64, f64)>,
pub slice_thickness: Option<f64>,
pub image_position: Option<DVec3>,
pub image_orientation: Option<(DVec3, DVec3)>,
pub window_center: Option<f64>,
pub window_width: Option<f64>,
pub rescale_intercept: f64,
pub rescale_slope: f64,
pub sop_instance_uid: Option<String>,
pub transfer_syntax_uid: String,
}Expand description
Metadata extracted for one decoded image frame.
Fields§
§frame_index: u32Zero-based frame index inside the source DICOM object.
rows: u16Number of rows in the frame.
columns: u16Number of columns in the frame.
number_of_frames: u32Number of frames in the source DICOM object.
samples_per_pixel: u16Samples per pixel, usually 1 for grayscale volumes.
bits_allocated: u16Bits allocated per sample.
bits_stored: u16Bits stored per sample.
high_bit: u16Highest stored bit index.
pixel_representation: PixelRepresentationPixel sign convention.
instance_number: i32Instance Number (0020,0013) if present.
pixel_spacing: Option<(f64, f64)>Pixel spacing as (row_spacing, column_spacing).
slice_thickness: Option<f64>Slice thickness if present.
image_position: Option<DVec3>Image Position (Patient) if present.
image_orientation: Option<(DVec3, DVec3)>Image Orientation (Patient) as (row_direction, column_direction).
window_center: Option<f64>Optional display window center.
window_width: Option<f64>Optional display window width.
rescale_intercept: f64Modality LUT intercept.
rescale_slope: f64Modality LUT slope.
sop_instance_uid: Option<String>SOP Instance UID if present.
transfer_syntax_uid: StringTransfer Syntax UID from the file meta information.
Implementations§
Source§impl FrameMetadata
impl FrameMetadata
Sourcepub fn slice_normal(&self) -> Option<DVec3>
pub fn slice_normal(&self) -> Option<DVec3>
Returns the frame normal when orientation is available.
Sourcepub fn spacing_xy(&self) -> DVec3
pub fn spacing_xy(&self) -> DVec3
Returns in-plane spacing in (x, y) volume order.
Sourcepub fn voxel_count(&self) -> usize
pub fn voxel_count(&self) -> usize
Returns the expected pixel count for one decoded frame.
Trait Implementations§
Source§impl Clone for FrameMetadata
impl Clone for FrameMetadata
Source§fn clone(&self) -> FrameMetadata
fn clone(&self) -> FrameMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FrameMetadata
impl Debug for FrameMetadata
Source§impl PartialEq for FrameMetadata
impl PartialEq for FrameMetadata
impl StructuralPartialEq for FrameMetadata
Auto Trait Implementations§
impl Freeze for FrameMetadata
impl RefUnwindSafe for FrameMetadata
impl Send for FrameMetadata
impl Sync for FrameMetadata
impl Unpin for FrameMetadata
impl UnsafeUnpin for FrameMetadata
impl UnwindSafe for FrameMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more