GDCM  2.2.6
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
gdcm::Reader Class Reference

Reader ala DOM (Document Object Model) More...

#include <gdcmReader.h>

Inheritance diagram for gdcm::Reader:
Inheritance graph
[legend]
Collaboration diagram for gdcm::Reader:
Collaboration graph
[legend]

Public Member Functions

 Reader ()
 
virtual ~Reader ()
 
bool CanRead () const
 
const FileGetFile () const
 Set/Get File. More...
 
FileGetFile ()
 Set/Get File. More...
 
virtual bool Read ()
 Main function to read a file. More...
 
bool ReadSelectedPrivateTags (std::set< PrivateTag > const &ptags, bool readvalues=true)
 Will only read the specified selected private tags. More...
 
bool ReadSelectedTags (std::set< Tag > const &tags, bool readvalues=true)
 Will only read the specified selected tags. More...
 
bool ReadUpToTag (const Tag &tag, std::set< Tag > const &skiptags=std::set< Tag >())
 
void SetFile (File &file)
 Set/Get File. More...
 
void SetFileName (const char *filename_native)
 
void SetStream (std::istream &input_stream)
 Set the open-ed stream directly. More...
 

Protected Member Functions

std::istream * GetStreamPtr () const
 
bool ReadDataSet ()
 
bool ReadMetaInformation ()
 
bool ReadPreamble ()
 

Protected Attributes

SmartPointer< FileF
 

Friends

class StreamImageReader
 

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
Examples:
ChangeSequenceUltrasound.cxx, ClinicalTrialAnnotate.cxx, csa2img.cxx, DiffFile.cxx, DumpADAC.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DuplicatePCDE.cxx, ELSCINT1WaveToText.cxx, ExtractEncryptedContent.cxx, FixBrokenJ2K.cxx, gdcmrtionplan.cxx, gdcmrtplan.cxx, GenLongSeqs.cxx, GenSeqs.cxx, GetSequenceUltrasound.cxx, GetSubSequenceData.cxx, HelloWorld.cxx, iU22tomultisc.cxx, LargeVRDSExplicit.cxx, NewSequence.cs, PatchFile.cxx, pmsct_rgb1.cxx, ReadAndDumpDICOMDIR.cxx, ReadAndPrintAttributes.cxx, ReadExplicitLengthSQIVR.cxx, ReadGEMSSDO.cxx, ReadUTF8QtDir.cxx, rle2img.cxx, ScanDirectory.java, SimplePrintPatientName.cs, and TestReader.cxx.

Constructor & Destructor Documentation

gdcm::Reader::Reader ( )
inline
virtual gdcm::Reader::~Reader ( )
virtual

Member Function Documentation

bool gdcm::Reader::CanRead ( ) const

Test whether this is a DICOM file

Warning
need to call either SetFileName or SetStream first
Examples:
ReadUTF8QtDir.cxx.
const File& gdcm::Reader::GetFile ( ) const
inline
File& gdcm::Reader::GetFile ( )
inline

Set/Get File.

std::istream* gdcm::Reader::GetStreamPtr ( ) const
inlineprotected
virtual bool gdcm::Reader::Read ( )
virtual
bool gdcm::Reader::ReadDataSet ( )
protected
bool gdcm::Reader::ReadMetaInformation ( )
protected
bool gdcm::Reader::ReadPreamble ( )
protected
bool gdcm::Reader::ReadSelectedPrivateTags ( std::set< PrivateTag > const &  ptags,
bool  readvalues = true 
)

Will only read the specified selected private tags.

bool gdcm::Reader::ReadSelectedTags ( std::set< Tag > const &  tags,
bool  readvalues = true 
)

Will only read the specified selected tags.

bool gdcm::Reader::ReadUpToTag ( const Tag tag,
std::set< Tag > const &  skiptags = std::set< Tag >() 
)

Will read only up to Tag

Parameters
tagand skipping any tag specified in
skiptags
void gdcm::Reader::SetFile ( File file)
inline

Set/Get File.

void gdcm::Reader::SetFileName ( const char *  filename_native)
void gdcm::Reader::SetStream ( std::istream &  input_stream)
inline

Set the open-ed stream directly.

Examples:
ReadUTF8QtDir.cxx.

Friends And Related Function Documentation

friend class StreamImageReader
friend

Member Data Documentation

SmartPointer<File> gdcm::Reader::F
protected

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

Generated on Sat Dec 21 2013 05:56:22 for GDCM by doxygen 1.8.5
SourceForge.net Logo