[−][src]Enum dicom_core::value::PrimitiveValue
An enum representing a primitive value from a DICOM element. The result of decoding an element's data value may be one of the enumerated types depending on its content and value representation.
Variants
Empty
No data. Used for SQ (regardless of content) and any value of length 0.
Strs(C<String>)
A sequence of strings. Used for AE, AS, PN, SH, CS, LO, UI and UC. Can also be used for IS, SS, DS, DA, DT and TM when decoding with format preservation.
Str(String)
A single string. Used for ST, LT, UT and UR, which are never multi-valued.
Tags(C<Tag>)
A sequence of attribute tags. Used specifically for AT.
U8(C<u8>)
The value is a sequence of unsigned 16-bit integers. Used for OB and UN.
I16(C<i16>)
The value is a sequence of signed 16-bit integers. Used for SS.
U16(C<u16>)
A sequence of unsigned 168-bit integers. Used for US and OW.
I32(C<i32>)
A sequence of signed 32-bit integers. Used for SL and IS.
U32(C<u32>)
A sequence of unsigned 32-bit integers. Used for UL and OL.
I64(C<i64>)
A sequence of signed 64-bit integers. Used for SV.
U64(C<u64>)
A sequence of unsigned 64-bit integers. Used for UV and OV.
F32(C<f32>)
The value is a sequence of 32-bit floating point numbers. Used for OF and FL.
F64(C<f64>)
The value is a sequence of 64-bit floating point numbers. Used for OD and FD, DS.
Date(C<NaiveDate>)
A sequence of dates. Used for the DA representation.
DateTime(C<DateTime<FixedOffset>>)
A sequence of date-time values. Used for the DT representation.
Time(C<NaiveTime>)
A sequence of time values. Used for the TM representation.
Methods
impl PrimitiveValue
[src]
pub fn multiplicity(&self) -> u32
[src]
Obtain the number of individual elements. This number may not match the DICOM value multiplicity in some value representations.
pub fn string(&self) -> Option<&str>
[src]
Get a single string value. If it contains multiple strings, only the first one is returned.
pub fn strings(&self) -> Option<Vec<&str>>
[src]
Get a sequence of string values.
pub fn tag(&self) -> Option<Tag>
[src]
Get a single DICOM tag.
pub fn tags(&self) -> Option<&[Tag]>
[src]
Get a sequence of DICOM tags.
pub fn int64(&self) -> Option<i64>
[src]
Get a single 64-bit signed integer value.
pub fn uint64(&self) -> Option<u64>
[src]
Get a single 64-bit unsigned integer value.
pub fn int32(&self) -> Option<i32>
[src]
Get a single 32-bit signed integer value.
pub fn uint32(&self) -> Option<u32>
[src]
Get a single 32-bit unsigned integer value.
pub fn int16(&self) -> Option<i16>
[src]
Get a single 16-bit signed integer value.
pub fn uint16(&self) -> Option<u16>
[src]
Get a single 16-bit unsigned integer value.
pub fn uint8(&self) -> Option<u8>
[src]
Get a single 8-bit unsigned integer value.
pub fn float32(&self) -> Option<f32>
[src]
Get a single 32-bit floating point number value.
pub fn float64(&self) -> Option<f64>
[src]
Get a single 64-bit floating point number value.
pub fn calculate_byte_len(&self) -> usize
[src]
Determine the minimum number of bytes that this value would need to occupy in a DICOM file, without compression and without the header. As mandated by the standard, it is always even. The calculated number does not need to match the size of the original byte stream.
Trait Implementations
impl DicomValueType for PrimitiveValue
[src]
fn value_type(&self) -> ValueType
[src]
fn size(&self) -> Length
[src]
fn is_empty(&self) -> bool
[src]
Check whether the value is empty (0 length).
impl<I> From<PrimitiveValue> for Value<I>
[src]
fn from(v: PrimitiveValue) -> Self
[src]
impl PartialEq<PrimitiveValue> for PrimitiveValue
[src]
fn eq(&self, other: &PrimitiveValue) -> bool
[src]
fn ne(&self, other: &PrimitiveValue) -> bool
[src]
impl Clone for PrimitiveValue
[src]
fn clone(&self) -> PrimitiveValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for PrimitiveValue
[src]
Auto Trait Implementations
impl Send for PrimitiveValue
impl Unpin for PrimitiveValue
impl Sync for PrimitiveValue
impl UnwindSafe for PrimitiveValue
impl RefUnwindSafe for PrimitiveValue
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,