pub struct ImageMetaElement {
pub name: String,
pub id: String,
pub modality: String,
pub patient_name: String,
pub patient_id: String,
pub timestamp: u64,
pub size: [u16; 3],
pub scalar_type: u8,
}
Expand description
Image metadata element
Fields§
§name: String
Name or description of the image (max 64 chars)
id: String
ID to query the IMAGE (max 20 chars)
modality: String
Modality (e.g., “CT”, “MRI”) (max 32 chars)
patient_name: String
Patient name (max 64 chars)
patient_id: String
Patient ID (max 64 chars)
timestamp: u64
Scan timestamp
size: [u16; 3]
Number of pixels in each direction (RI, RJ, RK)
scalar_type: u8
Scalar type (same as IMAGE: 3=uint8, 5=uint16, etc.)
Implementations§
Source§impl ImageMetaElement
impl ImageMetaElement
Sourcepub fn new(
name: impl Into<String>,
id: impl Into<String>,
modality: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, id: impl Into<String>, modality: impl Into<String>, ) -> Self
Create a new image metadata element
Sourcepub fn with_patient(
self,
patient_name: impl Into<String>,
patient_id: impl Into<String>,
) -> Self
pub fn with_patient( self, patient_name: impl Into<String>, patient_id: impl Into<String>, ) -> Self
Set patient information
Sourcepub fn with_timestamp(self, timestamp: u64) -> Self
pub fn with_timestamp(self, timestamp: u64) -> Self
Set timestamp
Sourcepub fn with_scalar_type(self, scalar_type: u8) -> Self
pub fn with_scalar_type(self, scalar_type: u8) -> Self
Set scalar type
Trait Implementations§
Source§impl Clone for ImageMetaElement
impl Clone for ImageMetaElement
Source§fn clone(&self) -> ImageMetaElement
fn clone(&self) -> ImageMetaElement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ImageMetaElement
impl Debug for ImageMetaElement
Source§impl PartialEq for ImageMetaElement
impl PartialEq for ImageMetaElement
impl StructuralPartialEq for ImageMetaElement
Auto Trait Implementations§
impl Freeze for ImageMetaElement
impl RefUnwindSafe for ImageMetaElement
impl Send for ImageMetaElement
impl Sync for ImageMetaElement
impl Unpin for ImageMetaElement
impl UnwindSafe for ImageMetaElement
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
Mutably borrows from an owned value. Read more