Struct dicom_object::meta::FileMetaTable
source · 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: u32File Meta Information Group Length
information_version: [u8; 2]File Meta Information Version
media_storage_sop_class_uid: StringMedia Storage SOP Class UID
media_storage_sop_instance_uid: StringMedia Storage SOP Instance UID
transfer_syntax: StringTransfer Syntax UID
implementation_class_uid: StringImplementation 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, P>(&mut self, ts: &TransferSyntax<D, P>)
pub fn set_transfer_syntax<D, P>(&mut self, ts: &TransferSyntax<D, P>)
Set the file meta table’s transfer syntax according to the given transfer syntax descriptor.
Extra padding to even length is trimmed.
Note that the field information_group_length is not updated
to consider the length of the new transfer syntax.
Should you wish to keep the field up to date,
call update_information_group_length afterwards.
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.
§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
source§fn eq(&self, other: &FileMetaTable) -> bool
fn eq(&self, other: &FileMetaTable) -> bool
self and other values to be equal, and is used
by ==.