pub struct FileMetaTable {
pub information_group_length: u32,
pub information_version: [u8; 2],
pub media_storage_sop_class_uid: String,
pub media_storage_sop_instance_uid: String,
pub transfer_syntax: String,
pub implementation_class_uid: String,
pub implementation_version_name: Option<String>,
pub source_application_entity_title: Option<String>,
pub sending_application_entity_title: Option<String>,
pub receiving_application_entity_title: Option<String>,
pub private_information_creator_uid: Option<String>,
pub private_information: Option<Vec<u8>>,
}
Expand description
DICOM File Meta Information Table.
This data type contains the relevant parts of the file meta information table, as specified in part 6, chapter 7 of the standard.
Creating a new file meta table from scratch
is more easily done using a FileMetaTableBuilder
.
When modifying the struct’s public fields,
it is possible to update the information group length
through method update_information_group_length
.
Fields§
§information_group_length: u32
File Meta Information Group Length
information_version: [u8; 2]
File Meta Information Version
media_storage_sop_class_uid: String
Media Storage SOP Class UID
media_storage_sop_instance_uid: String
Media Storage SOP Instance UID
transfer_syntax: String
Transfer Syntax UID
implementation_class_uid: String
Implementation Class UID
implementation_version_name: Option<String>
Implementation Version Name
source_application_entity_title: Option<String>
Source Application Entity Title
sending_application_entity_title: Option<String>
Sending Application Entity Title
receiving_application_entity_title: Option<String>
Receiving Application Entity Title
private_information_creator_uid: Option<String>
Private Information Creator UID
private_information: Option<Vec<u8>>
Private Information
Implementations§
Source§impl FileMetaTable
impl FileMetaTable
Sourcepub fn from_reader<R: Read>(file: R) -> Result<Self, Error>
pub fn from_reader<R: Read>(file: R) -> Result<Self, Error>
Construct a file meta group table by parsing a DICOM data set from a reader.
Sourcepub fn transfer_syntax(&self) -> &str
pub fn transfer_syntax(&self) -> &str
Getter for the transfer syntax UID, with trailing characters already excluded.
Sourcepub fn media_storage_sop_instance_uid(&self) -> &str
pub fn media_storage_sop_instance_uid(&self) -> &str
Getter for the media storage SOP instance UID, with trailing characters already excluded.
Sourcepub fn media_storage_sop_class_uid(&self) -> &str
pub fn media_storage_sop_class_uid(&self) -> &str
Getter for the media storage SOP class UID, with trailing characters already excluded.
Sourcepub fn implementation_class_uid(&self) -> &str
pub fn implementation_class_uid(&self) -> &str
Getter for the implementation class UID, with trailing characters already excluded.
Sourcepub fn private_information_creator_uid(&self) -> Option<&str>
pub fn private_information_creator_uid(&self) -> Option<&str>
Getter for the private information creator UID, with trailing characters already excluded.
Sourcepub fn set_transfer_syntax<D, R, W>(&mut self, ts: &TransferSyntax<D, R, W>)
pub fn set_transfer_syntax<D, R, W>(&mut self, ts: &TransferSyntax<D, R, W>)
Set the file meta table’s transfer syntax according to the given transfer syntax descriptor.
This replaces the table’s transfer syntax UID to the given transfer syntax, without padding to even length. The information group length field is automatically recalculated.
Sourcepub fn update_information_group_length(&mut self)
pub fn update_information_group_length(&mut self)
Calculate the expected file meta group length
according to the file meta attributes currently set,
and assign it to the field information_group_length
.
Sourcepub fn into_element_iter(
self,
) -> impl Iterator<Item = DataElement<EmptyObject, [u8; 0]>>
pub fn into_element_iter( self, ) -> impl Iterator<Item = DataElement<EmptyObject, [u8; 0]>>
Create an iterator over the defined data elements of the file meta group, consuming the file meta table.
See to_element_iter
for a version which copies the element from the table.
Sourcepub fn to_element_iter(
&self,
) -> impl Iterator<Item = DataElement<EmptyObject, [u8; 0]>> + '_
pub fn to_element_iter( &self, ) -> impl Iterator<Item = DataElement<EmptyObject, [u8; 0]>> + '_
Create an iterator of data elements copied from the file meta group.
See into_element_iter
for a version which consumes the table.
pub fn write<W: Write>(&self, writer: W) -> Result<(), Error>
Trait Implementations§
Source§impl ApplyOp for FileMetaTable
impl ApplyOp for FileMetaTable
Source§fn apply(&mut self, op: AttributeOp) -> ApplyResult
fn apply(&mut self, op: AttributeOp) -> ApplyResult
Apply the given attribute operation on this file meta information table.
See the dicom_core::ops
module
for more information.
Source§type Err = ApplyError
type Err = ApplyError
Source§impl Clone for FileMetaTable
impl Clone for FileMetaTable
Source§fn clone(&self) -> FileMetaTable
fn clone(&self) -> FileMetaTable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FileMetaTable
impl Debug for FileMetaTable
Source§impl PartialEq for FileMetaTable
impl PartialEq for FileMetaTable
impl StructuralPartialEq for FileMetaTable
Auto Trait Implementations§
impl Freeze for FileMetaTable
impl RefUnwindSafe for FileMetaTable
impl Send for FileMetaTable
impl Sync for FileMetaTable
impl Unpin for FileMetaTable
impl UnwindSafe for FileMetaTable
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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