# gdcm::FileMetaInformation Class Reference

Class to represent a File Meta Information. More...

`#include <gdcmFileMetaInformation.h>`

Inheritance diagram for gdcm::FileMetaInformation:
[legend]
Collaboration diagram for gdcm::FileMetaInformation:
[legend]

List of all members.

## Public Member Functions

| FileMetaInformation ()
| FileMetaInformation (FileMetaInformation const &fmi)
| ~FileMetaInformation ()
void | FillFromDataSet (DataSet const &ds)
| Construct a FileMetaInformation from an already existing DataSet:
const TransferSyntax & | GetDataSetTransferSyntax () const
VL | GetFullLength () const
MediaStorage | GetMediaStorage () const
TransferSyntax::NegociatedType | GetMetaInformationTS () const
const Preamble & | GetPreamble () const
| Get Preamble.
Preamble & | GetPreamble ()
void | Insert (const DataElement &de)
bool | IsValid () const
std::istream & | Read (std::istream &is)
| Read.
std::istream & | ReadCompat (std::istream &is)
void | Replace (const DataElement &de)
| Replace a dataelement with another one.
void | SetDataSetTransferSyntax (const TransferSyntax &ts)
void | SetPreamble (const Preamble &p)
std::ostream & | Write (std::ostream &os) const
| Write.

## Static Public Member Functions

static void | AppendImplementationClassUID (const char *imp)
static const char * | GetImplementationClassUID ()
static const char * | GetImplementationVersionName ()
static const char * | GetSourceApplicationEntityTitle ()
static void | SetImplementationClassUID (const char *imp)
| Override the GDCM default values:
static void | SetImplementationVersionName (const char *version)
static void | SetSourceApplicationEntityTitle (const char *title)

## Protected Member Functions

void | ComputeDataSetMediaStorageSOPClass ()
void | ComputeDataSetTransferSyntax ()
void | Default ()
template<typename TSwap >
std::istream & | ReadCompatInternal (std::istream &is)

## Static Protected Member Functions

static const char * | GetFileMetaInformationVersion ()
static const char * | GetGDCMImplementationClassUID ()
static const char * | GetGDCMImplementationVersionName ()
static const char * | GetGDCMSourceApplicationEntityTitle ()

## Protected Attributes

MediaStorage::MSType | DataSetMS
TransferSyntax | DataSetTS
TransferSyntax::NegociatedType | MetaInformationTS

## Friends

std::ostream & | operator<< (std::ostream &_os, const FileMetaInformation &_val)

## Detailed Description

Class to represent a File Meta Information.

FileMetaInformation is a Explicit Structured Set. Whenever the file contains an ImplicitDataElement DataSet, a conversion will take place.

Definition: The File Meta Information includes identifying information on the encapsulated Data Set. This header consists of a 128 byte File Preamble, followed by a 4 byte DICOM prefix, followed by the File Meta Elements shown in Table 7.1-1. This header shall be present in every DICOM file.

See also:
  Writer Reader

Examples:

  GenAllVR.cxx, GenFakeIdentifyFile.cxx, LargeVRDSExplicit.cxx, ReadAndDumpDICOMDIR.cxx, and TestReader.cxx.

## Constructor & Destructor Documentation

gdcm::FileMetaInformation::FileMetaInformation | ( |  | ) | `[inline]`

gdcm::FileMetaInformation::~FileMetaInformation | ( |  | ) | `[inline]`

gdcm::FileMetaInformation::FileMetaInformation | ( | FileMetaInformation const & | fmi | ) | `[inline]`

References DataSetMS, DataSetTS, and MetaInformationTS.

## Member Function Documentation

static void gdcm::FileMetaInformation::AppendImplementationClassUID | ( | const char * | imp | ) | `[static]`

void gdcm::FileMetaInformation::ComputeDataSetMediaStorageSOPClass | ( |  | ) | `[protected]`

void gdcm::FileMetaInformation::ComputeDataSetTransferSyntax | ( |  | ) | `[protected]`

void gdcm::FileMetaInformation::Default | ( |  | ) | `[protected]`

void gdcm::FileMetaInformation::FillFromDataSet | ( | DataSet const & | ds | ) |

Construct a FileMetaInformation from an already existing DataSet:

const TransferSyntax& gdcm::FileMetaInformation::GetDataSetTransferSyntax | ( |  | ) | const`[inline]`

static const char* gdcm::FileMetaInformation::GetFileMetaInformationVersion | ( |  | ) | `[static, protected]`

VL gdcm::FileMetaInformation::GetFullLength | ( |  | ) | const`[inline]`

References gdcm::VL::GetLength().

static const char* gdcm::FileMetaInformation::GetGDCMImplementationClassUID | ( |  | ) | `[static, protected]`

static const char* gdcm::FileMetaInformation::GetGDCMImplementationVersionName | ( |  | ) | `[static, protected]`

static const char* gdcm::FileMetaInformation::GetGDCMSourceApplicationEntityTitle | ( |  | ) | `[static, protected]`

static const char* gdcm::FileMetaInformation::GetImplementationClassUID | ( |  | ) | `[static]`

static const char* gdcm::FileMetaInformation::GetImplementationVersionName | ( |  | ) | `[static]`

MediaStorage gdcm::FileMetaInformation::GetMediaStorage | ( |  | ) | const

TransferSyntax::NegociatedType gdcm::FileMetaInformation::GetMetaInformationTS | ( |  | ) | const`[inline]`

Preamble& gdcm::FileMetaInformation::GetPreamble | ( |  | ) | `[inline]`

const Preamble& gdcm::FileMetaInformation::GetPreamble | ( |  | ) | const`[inline]`

Get Preamble.

Referenced by gdcm::operator<<().

static const char* gdcm::FileMetaInformation::GetSourceApplicationEntityTitle | ( |  | ) | `[static]`

void gdcm::FileMetaInformation::Insert | ( | const DataElement & | de | ) | `[inline]`

Insert a DataElement in the DataSet.

Warning:
  : Tag need to be >= 0x8 to be considered valid data element

Reimplemented from gdcm::DataSet.

References gdcmErrorMacro, gdcm::Tag::GetGroup(), and gdcm::DataElement::GetTag().

bool gdcm::FileMetaInformation::IsValid | ( |  | ) | const`[inline]`

std::istream& gdcm::FileMetaInformation::Read | ( | std::istream & | is | ) |

Read.

Reimplemented from gdcm::DataSet.

std::istream& gdcm::FileMetaInformation::ReadCompat | ( | std::istream & | is | ) |

template<typename TSwap >

std::istream& gdcm::FileMetaInformation::ReadCompatInternal | ( | std::istream & | is | ) | `[protected]`

void gdcm::FileMetaInformation::Replace | ( | const DataElement & | de | ) | `[inline]`

Replace a dataelement with another one.

Reimplemented from gdcm::DataSet.

Examples:
  LargeVRDSExplicit.cxx.

References gdcm::DataElement::GetTag().

void gdcm::FileMetaInformation::SetDataSetTransferSyntax | ( | const TransferSyntax & | ts | ) |

Examples:
  GenAllVR.cxx, GenFakeIdentifyFile.cxx, and LargeVRDSExplicit.cxx.

static void gdcm::FileMetaInformation::SetImplementationClassUID | ( | const char * | imp | ) | `[static]`

Override the GDCM default values:

static void gdcm::FileMetaInformation::SetImplementationVersionName | ( | const char * | version | ) | `[static]`

void gdcm::FileMetaInformation::SetPreamble | ( | const Preamble & | p | ) | `[inline]`

static void gdcm::FileMetaInformation::SetSourceApplicationEntityTitle | ( | const char * | title | ) | `[static]`

std::ostream& gdcm::FileMetaInformation::Write | ( | std::ostream & | os | ) | const

Write.

Reimplemented from gdcm::DataSet.

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | _os,
|  | const FileMetaInformation & | _val
| ) |  | `[friend]`

## Member Data Documentation

MediaStorage::MSType gdcm::FileMetaInformation::DataSetMS `[protected]`

Referenced by FileMetaInformation().

TransferSyntax gdcm::FileMetaInformation::DataSetTS `[protected]`

Referenced by FileMetaInformation().

TransferSyntax::NegociatedType gdcm::FileMetaInformation::MetaInformationTS `[protected]`

Referenced by FileMetaInformation().

The documentation for this class was generated from the following file:

- gdcmFileMetaInformation.h