pub struct PatientImagePlane<'a> { /* private fields */ }Expand description
Validated immutable image plane. +X is patient Left, +Y Posterior, +Z Superior; all positions/distances are millimeters. An absent frame UID stays absent; neither equal nor absent UIDs establish a registration transform.
Implementations§
Source§impl<'a> PatientImagePlane<'a>
impl<'a> PatientImagePlane<'a>
Sourcepub fn from_metadata(meta: &'a DicomMetadata) -> Result<Self, GeometryError>
pub fn from_metadata(meta: &'a DicomMetadata) -> Result<Self, GeometryError>
Interpret only the metadata provided for a single frame; no enhanced-frame extraction or missing-position/orientation/spacing fallback is performed.
pub fn from_frame_geometry( input: FrameGeometryInput<'a>, ) -> Result<Self, GeometryError>
pub fn origin_lps_mm(&self) -> [f64; 3]
Sourcepub fn first_direction_lps(&self) -> [f64; 3]
pub fn first_direction_lps(&self) -> [f64; 3]
First orientation vector (DICOM row direction), advanced by COLUMN index.
Sourcepub fn second_direction_lps(&self) -> [f64; 3]
pub fn second_direction_lps(&self) -> [f64; 3]
Second orientation vector (DICOM column direction), advanced by ROW index.
pub fn pixel_spacing_mm(&self) -> [f64; 2]
pub fn frame_of_reference_uid(&self) -> Option<&'a str>
Sourcepub fn normal_lps(&self) -> [f64; 3]
pub fn normal_lps(&self) -> [f64; 3]
Cross product of the two supplied orientation vectors; no slice spacing is inferred from this normal, SliceThickness or SliceLocation.
Sourcepub fn pixel_center_lps_mm(
&self,
column_index: u32,
row_index: u32,
) -> Result<[f64; 3], GeometryError>
pub fn pixel_center_lps_mm( &self, column_index: u32, row_index: u32, ) -> Result<[f64; 3], GeometryError>
Zero-based integer pixel CENTER mapping from C.7.6.2.1-1: origin + column * first_direction * column_spacing + row * second_direction * row_spacing. The plane has no raster extent: caller checks row/column bounds separately. This is not the edge-based sub-pixel convention or a registration API.
Trait Implementations§
Source§impl<'a> Clone for PatientImagePlane<'a>
impl<'a> Clone for PatientImagePlane<'a>
impl<'a> Copy for PatientImagePlane<'a>
Auto Trait Implementations§
impl<'a> Freeze for PatientImagePlane<'a>
impl<'a> RefUnwindSafe for PatientImagePlane<'a>
impl<'a> Send for PatientImagePlane<'a>
impl<'a> Sync for PatientImagePlane<'a>
impl<'a> Unpin for PatientImagePlane<'a>
impl<'a> UnsafeUnpin for PatientImagePlane<'a>
impl<'a> UnwindSafe for PatientImagePlane<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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