# gdcm::MediaStorage Class Reference

MediaStorage. More...

`#include <gdcmMediaStorage.h>`

List of all members.

## Public Types
enum | MSType { MediaStorageDirectoryStorage = 0, ComputedRadiographyImageStorage, DigitalXRayImageStorageForPresentation, DigitalXRayImageStorageForProcessing, DigitalMammographyImageStorageForPresentation, DigitalMammographyImageStorageForProcessing, DigitalIntraoralXrayImageStorageForPresentation, DigitalIntraoralXRayImageStorageForProcessing, CTImageStorage, EnhancedCTImageStorage, UltrasoundImageStorageRetired, UltrasoundImageStorage, UltrasoundMultiFrameImageStorageRetired, UltrasoundMultiFrameImageStorage, MRImageStorage, EnhancedMRImageStorage, MRSpectroscopyStorage, NuclearMedicineImageStorageRetired, SecondaryCaptureImageStorage, MultiframeSingleBitSecondaryCaptureImageStorage, MultiframeGrayscaleByteSecondaryCaptureImageStorage, MultiframeGrayscaleWordSecondaryCaptureImageStorage, MultiframeTrueColorSecondaryCaptureImageStorage, StandaloneOverlayStorage, StandaloneCurveStorage, LeadECGWaveformStorage, GeneralECGWaveformStorage, AmbulatoryECGWaveformStorage, HemodynamicWaveformStorage, CardiacElectrophysiologyWaveformStorage, BasicVoiceAudioWaveformStorage, StandaloneModalityLUTStorage, StandaloneVOILUTStorage, GrayscaleSoftcopyPresentationStateStorageSOPClass, XRayAngiographicImageStorage, XRayRadiofluoroscopingImageStorage, XRayAngiographicBiPlaneImageStorageRetired, NuclearMedicineImageStorage, RawDataStorage, SpacialRegistrationStorage, SpacialFiducialsStorage, PETImageStorage, RTImageStorage, RTDoseStorage, RTStructureSetStorage, RTPlanStorage, CSANonImageStorage, Philips3D, EnhancedSR, BasicTextSR, HardcopyGrayscaleImageStorage, ComprehensiveSR, DetachedStudyManagementSOPClass, EncapsulatedPDFStorage, StudyComponentManagementSOPClass, DetachedVisitManagementSOPClass, DetachedPatientManagementSOPClass, VideoEndoscopicImageStorage, GeneralElectricMagneticResonanceImageStorage, GEPrivate3DModelStorage, ToshibaPrivateDataStorage, MammographyCADSR, KeyObjectSelectionDocument, HangingProtocolStorage, ModalityPerformedProcedureStepSOPClass, PhilipsPrivateMRSyntheticImageStorage, MS_END }
enum | ObjectType { NoObject = 0, Video, Waveform, Audio, PDF, URI, Segmentation, ObjectEnd }
## Public Member Functions
| MediaStorage (MSType type=MS_END)
const char * | GetModality () const
const char * | GetString () const
void | GuessFromModality (const char *modality, unsigned int dimension=2)
bool | IsUndefined () const
| operator MSType () const
bool | SetFromDataSet (DataSet const &ds)
bool | SetFromFile (File const &file)
bool | SetFromHeader (FileMetaInformation const &fmi)
bool | SetFromModality (DataSet const &ds)
## Static Public Member Functions
static const char * | GetMSString (MSType ts)
static MSType | GetMSType (const char *str)
static bool | IsImage (MSType ts)
## Protected Member Functions
void | SetFromSourceImageSequence (DataSet const &ds)
## Friends
std::ostream & | operator<< (std::ostream &os, const MediaStorage &ms)

## Detailed Description

MediaStorage.

Note:
  FIXME There should not be any notion of Image and/or PDF at that point Only the codec can answer yes I support this Media Storage or not... For instance an ImageCodec will answer yes to most of them while a PDFCodec will answer only for the Encapsulated PDF

Examples:

  EncapsulateFileInRawData.cxx, and TestReader.cxx.

## Member Enumeration Documentation

enum gdcm::MediaStorage::MSType

Enumerator:

  MediaStorageDirectoryStorage |
  ComputedRadiographyImageStorage |
  DigitalXRayImageStorageForPresentation |
  DigitalXRayImageStorageForProcessing |
  DigitalMammographyImageStorageForPresentation |
  DigitalMammographyImageStorageForProcessing |
  DigitalIntraoralXrayImageStorageForPresentation |
  DigitalIntraoralXRayImageStorageForProcessing |
  CTImageStorage |
  EnhancedCTImageStorage |
  UltrasoundImageStorageRetired |
  UltrasoundImageStorage |
  UltrasoundMultiFrameImageStorageRetired |
  UltrasoundMultiFrameImageStorage |
  MRImageStorage |
  EnhancedMRImageStorage |
  MRSpectroscopyStorage |
  NuclearMedicineImageStorageRetired |
  SecondaryCaptureImageStorage |
  MultiframeSingleBitSecondaryCaptureImageStorage |
  MultiframeGrayscaleByteSecondaryCaptureImageStorage |
  MultiframeGrayscaleWordSecondaryCaptureImageStorage |
  MultiframeTrueColorSecondaryCaptureImageStorage |
  StandaloneOverlayStorage |
  StandaloneCurveStorage |
  LeadECGWaveformStorage |
  GeneralECGWaveformStorage |
  AmbulatoryECGWaveformStorage |
  HemodynamicWaveformStorage |
  CardiacElectrophysiologyWaveformStorage |
  BasicVoiceAudioWaveformStorage |
  StandaloneModalityLUTStorage |
  StandaloneVOILUTStorage |
  GrayscaleSoftcopyPresentationStateStorageSOPClass |
  XRayAngiographicImageStorage |
  XRayRadiofluoroscopingImageStorage |
  XRayAngiographicBiPlaneImageStorageRetired |
  NuclearMedicineImageStorage |
  RawDataStorage |
  SpacialRegistrationStorage |
  SpacialFiducialsStorage |
  PETImageStorage |
  RTImageStorage |
  RTDoseStorage |
  RTStructureSetStorage |
  RTPlanStorage |
  CSANonImageStorage |
  Philips3D |
  EnhancedSR |
  BasicTextSR |
  HardcopyGrayscaleImageStorage |
  ComprehensiveSR |
  DetachedStudyManagementSOPClass |
  EncapsulatedPDFStorage |
  StudyComponentManagementSOPClass |
  DetachedVisitManagementSOPClass |
  DetachedPatientManagementSOPClass |
  VideoEndoscopicImageStorage |
  GeneralElectricMagneticResonanceImageStorage |
  GEPrivate3DModelStorage |
  ToshibaPrivateDataStorage |
  MammographyCADSR |
  KeyObjectSelectionDocument |
  HangingProtocolStorage |
  ModalityPerformedProcedureStepSOPClass |
  PhilipsPrivateMRSyntheticImageStorage |
  MS_END |

enum gdcm::MediaStorage::ObjectType

Enumerator:

  NoObject |
  Video |
  Waveform |
  Audio |
  PDF |
  URI |
  Segmentation |
  ObjectEnd |

## Constructor & Destructor Documentation

gdcm::MediaStorage::MediaStorage | ( | MSType | type = `MS_END` | ) | `[inline]`

## Member Function Documentation

const char* gdcm::MediaStorage::GetModality | ( |  | ) | const

static const char* gdcm::MediaStorage::GetMSString | ( | MSType | ts | ) | `[static]`

Referenced by gdcm::operator<<().

static MSType gdcm::MediaStorage::GetMSType | ( | const char * | str | ) | `[static]`

Examples:
  TestReader.cxx.

const char* gdcm::MediaStorage::GetString | ( |  | ) | const

Examples:
  EncapsulateFileInRawData.cxx.

void gdcm::MediaStorage::GuessFromModality | ( | const char * | modality,
|  | unsigned int | dimension = `2` |
| ) |  |  |

static bool gdcm::MediaStorage::IsImage | ( | MSType | ts | ) | `[static]`

Returns whether DICOM has a Pixel Data element (7fe0,0010)

Warning:
  MRSpectroscopyStorage could be image but are not

bool gdcm::MediaStorage::IsUndefined | ( |  | ) | const`[inline]`

Examples:
  TestReader.cxx.

gdcm::MediaStorage::operator MSType | ( |  | ) | const`[inline]`

bool gdcm::MediaStorage::SetFromDataSet | ( | DataSet const & | ds | ) |

Advanced user only (functions should be protected level...) Those function are lower level than SetFromFile

bool gdcm::MediaStorage::SetFromFile | ( | File const & | file | ) |

Attempt to set the MediaStorage from a file: WARNING: When no MediaStorage & Modality are found BUT a PixelData element is found then MediaStorage is set to the default SecondaryCaptureImageStorage (return value is false in this case)

Examples:
  TestReader.cxx.

bool gdcm::MediaStorage::SetFromHeader | ( | FileMetaInformation const & | fmi | ) |

bool gdcm::MediaStorage::SetFromModality | ( | DataSet const & | ds | ) |

void gdcm::MediaStorage::SetFromSourceImageSequence | ( | DataSet const & | ds | ) | `[protected]`

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | os,
|  | const MediaStorage & | ms |
| ) |  |  | `[friend]`

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

- gdcmMediaStorage.h