# gdcm::CSAHeader Class Reference

Class for CSAHeader. More...

`#include <gdcmCSAHeader.h>`

Collaboration diagram for gdcm::CSAHeader:
[legend]

List of all members.

## Public Types

enum | CSAHeaderType { UNKNOWN = 0, SV10, NOMAGIC, DATASET_FORMAT, INTERFILE, ZEROED_OUT }
| Divers format of CSAHeader as found 'in the wild'. More...

## Public Member Functions

| CSAHeader ()
| ~CSAHeader ()
bool | FindCSAElementByName (const char *name)
const CSAElement & | GetCSAElementByName (const char *name)
const DataSet & | GetDataSet () const
| Return the DataSet output (use only if Format == DATASET_FORMAT )
CSAHeaderType | GetFormat () const
const char * | GetInterfile () const
| Return the string output (use only if Format == Interfile)
bool | LoadFromDataElement (DataElement const &de)
| Decode the CSAHeader from element 'de'.
void | Print (std::ostream &os) const
| Print the CSAHeader (use only if Format == SV10 or NOMAGIC)
template<typename TSwap >
std::istream & | Read (std::istream &is)
template<typename TSwap >
const std::ostream & | Write (std::ostream &os) const

## Static Public Member Functions

static const PrivateTag & | GetCSADataInfo ()
static const PrivateTag & | GetCSAImageHeaderInfoTag ()
static const PrivateTag & | GetCSASeriesHeaderInfoTag ()

## Protected Member Functions

const CSAElement & | GetCSAEEnd () const

## Friends

std::ostream & | operator<< (std::ostream &_os, const CSAHeader &d)

## Detailed Description

Class for CSAHeader.

SIEMENS store private information in tag (0x0029,0x10,"SIEMENS CSA HEADER") this class is meant for user wishing to access values stored within this private attribute. There are basically two main 'format' for this attribute : SV10/NOMAGIC and DATASET_FORMAT SV10 and NOMAGIC are from a user prospective identical, see CSAHeader.xml for possible name / value stored in this format. DATASET_FORMAT is in fact simply just another DICOM dataset (implicit) with -currently unknown- value. This can be only be printed for now.

Warning:
  Everything you do with this code is at your own risk, since decoding process was not written from specification documents.
  the API of this class might change.

Todo:
  MrEvaProtocol in 29,1020 contains ^M that would be nice to get rid of on UNIX system...

See also:
  PDBHeader

External references: 5.1.3.2.4.1 MEDCOM History Information and 5.1.4.3 CSA Non-Image Module in http://tamsinfo.toshiba.com/docrequest/pdf/E.Soft_v2.0.pdf

Examples:

  csa2img.cxx, and MrProtocol.cxx.

## Member Enumeration Documentation

enum gdcm::CSAHeader::CSAHeaderType

Divers format of CSAHeader as found 'in the wild'.

Enumerator:

  UNKNOWN |
  SV10 |
  NOMAGIC |
  DATASET_FORMAT |
  INTERFILE |
  ZEROED_OUT |

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

bool gdcm::CSAHeader::FindCSAElementByName | ( | const char * | name | ) |

Return true if the CSA element matching 'name' is found or not

Warning:
  Case Sensitive

Examples:
  csa2img.cxx, and MrProtocol.cxx.

static const PrivateTag& gdcm::CSAHeader::GetCSADataInfo | ( |  | ) | `[static]`

Return the private tag used by SIEMENS to store the CSA Data Info This is: PrivateTag(0x0029,0x0010,"SIEMENS CSA NON-IMAGE");

const CSAElement& gdcm::CSAHeader::GetCSAEEnd | ( |  | ) | const`[protected]`

const CSAElement& gdcm::CSAHeader::GetCSAElementByName | ( | const char * | name | ) |

Return the CSAElement corresponding to name 'name'

Warning:
  Case Sensitive

Examples:
  csa2img.cxx, and MrProtocol.cxx.

static const PrivateTag& gdcm::CSAHeader::GetCSAImageHeaderInfoTag | ( |  | ) | `[static]`

Return the private tag used by SIEMENS to store the CSA Image Header This is: PrivateTag(0x0029,0x0010,"SIEMENS CSA HEADER");

Examples:
  csa2img.cxx, and PublicDict.cxx.

static const PrivateTag& gdcm::CSAHeader::GetCSASeriesHeaderInfoTag | ( |  | ) | `[static]`

Return the private tag used by SIEMENS to store the CSA Series Header This is: PrivateTag(0x0029,0x0020,"SIEMENS CSA HEADER");

Examples:
  csa2img.cxx, and MrProtocol.cxx.

const DataSet& gdcm::CSAHeader::GetDataSet | ( |  | ) | const`[inline]`

Return the DataSet output (use only if Format == DATASET_FORMAT )

CSAHeaderType gdcm::CSAHeader::GetFormat | ( |  | ) | const

return the format of the CSAHeader SV10 and NOMAGIC are equivalent.

const char* gdcm::CSAHeader::GetInterfile | ( |  | ) | const`[inline]`

Return the string output (use only if Format == Interfile)

bool gdcm::CSAHeader::LoadFromDataElement | ( | DataElement const & | de | ) |

Decode the CSAHeader from element 'de'.

Examples:
  csa2img.cxx, and MrProtocol.cxx.

void gdcm::CSAHeader::Print | ( | std::ostream & | os | ) | const

Print the CSAHeader (use only if Format == SV10 or NOMAGIC)

Examples:
  csa2img.cxx.

Referenced by gdcm::operator<<().

template<typename TSwap >

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

template<typename TSwap >

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

## Friends And Related Function Documentation

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

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

- gdcmCSAHeader.h