Logo Search packages:      
Sourcecode: gdcm version File versions  Download package

gdcm::Reader Class Reference

#include <gdcmReader.h>

Inheritance diagram for gdcm::Reader:

gdcm::PixmapReader gdcm::ImageReader

List of all members.


Detailed Description

Reader ala DOM (Document Object Model).

This class is a non-validating reader, it will only performs well- formedness check only, and to some extent catch known error (non well-formed document).

Detailled description here

A DataSet DOES NOT contains group 0x0002 (see FileMetaInformation)

This is really a DataSet reader. This will not make sure the dataset conform to any IOD at all. This is a completely different step. The reasoning was that user could control the IOD there lib would handle and thus we would not be able to read a DataSet if the IOD was not found Instead we separate the reading from the validation.

Note:
From GDCM1.x. Users will realize that one feature is missing from this DOM implementation. In GDCM 1.x user used to be able to control the size of the Value to be read. By default it was 0xfff. The main author of GDCM2 thought this was too dangerous and harmful and therefore this feature did not make it into GDCM2
Warning:
GDCM will not produce warning for unorder (non-alphabetical order).
See also:
Writer FileMetaInformation DataSet File

Definition at line 54 of file gdcmReader.h.


Public Member Functions

FileGetFile ()
 Set/Get File.
const FileGetFile () const
 Set/Get File.
virtual bool Read ()
 Main function to read a file.
bool ReadSelectedTags (std::set< Tag > const &tags)
 Will only read the specified selected tags.
bool ReadUpToTag (const Tag &tag, std::set< Tag > const &skiptags)
 Will read only up to Tag 'tag'.
void SetFile (File &file)
 Set/Get File.
void SetFileName (const char *filename)
void SetStream (std::istream &input_stream)
 Set the open-ed stream directly.

Protected Member Functions

bool ReadDataSet ()
bool ReadMetaInformation ()
 read the DICOM Meta Information Header Find out the TransferSyntax used (default: Little Endian Explicit) we are at the start of group 0x0002 (well after preamble) we are at the beginning of the DataSet
bool ReadPreamble ()
 tells us if "DICM" is found as position 128 (i.e. the file is a 'true dicom' one) If not found then seek back at beginning of file (could be Mallinckrodt or old ACRNEMA with no preamble) we are at the beginning of file we are at the beginning of the DataSet or Meta Information Header

Protected Attributes

SmartPointer< FileF

Private Member Functions

TransferSyntax GuessTransferSyntax ()
template<typename T_Caller>
bool InternalReadCommon (const T_Caller &caller)

Private Attributes

std::ifstream * Ifstream
std::istream * Stream

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

Generated by  Doxygen 1.6.0   Back to index