GDCM 3.0.24
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:
[legend]
Collaboration diagram for gdcm::Reader:
[legend]

Public Member Functions

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

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).

Detailed 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
BasicAnonymizer.cs, ChangePrivateTags.cxx, ChangeSequenceUltrasound.cxx, Cleaner.cs, ClinicalTrialAnnotate.cxx, ClinicalTrialIdentificationWorkflow.cs, CreateFakeRTDOSE.cxx, DeriveSeries.cxx, DiffFile.cxx, DumpADAC.cxx, DumpCSA.cs, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DumpSiemensBase64.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, DumpVisusChange.cxx, DuplicatePCDE.cxx, ELSCINT1WaveToText.cxx, ExtractEncapsulatedFile.cs, ExtractEncryptedContent.cxx, FixBrokenJ2K.cxx, FixOrientation.cxx, GenLongSeqs.cxx, GenSeqs.cxx, GetSequenceUltrasound.cxx, GetSubSequenceData.cxx, HelloWorld.cxx, LargeVRDSExplicit.cxx, MakeTemplate.cxx, ManipulateFile.cs, NewSequence.cs, PatchFile.cxx, QIDO-RS.cxx, ReadAndDumpDICOMDIR.cxx, ReadAndDumpDICOMDIR2.cxx, ReadAndPrintAttributes.cxx, ReadExplicitLengthSQIVR.cxx, ReadGEMSSDO.cxx, ReadUTF8QtDir.cxx, ReformatFile.cs, SimplePrint.cs, SimplePrintPatientName.cs, TestReader.cxx, csa2img.cxx, gdcmrtionplan.cxx, gdcmrtplan.cxx, iU22tomultisc.cxx, pmsct_rgb1.cxx, and rle2img.cxx.

Constructor & Destructor Documentation

◆ Reader()

gdcm::Reader::Reader ( )

◆ ~Reader()

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

Member Function Documentation

◆ CanRead()

bool gdcm::Reader::CanRead ( ) const

Test whether this is a DICOM file

Warning
need to call either SetFileName or SetStream first
Examples
ReadUTF8QtDir.cxx.

◆ GetFile() [1/2]

File & gdcm::Reader::GetFile ( )
inline

Set/Get File.

◆ GetFile() [2/2]

const File & gdcm::Reader::GetFile ( ) const
inline

◆ GetStreamCurrentPosition()

size_t gdcm::Reader::GetStreamCurrentPosition ( ) const

For wrapped language. return type is compatible with System::FileSize return type Use native std::streampos / std::streamoff directly from the stream from C++

Examples
ExtractImageRegion.cs.

◆ GetStreamPtr()

std::istream * gdcm::Reader::GetStreamPtr ( ) const
inlineprotected

◆ Read()

virtual bool gdcm::Reader::Read ( )
virtual

◆ ReadDataSet()

bool gdcm::Reader::ReadDataSet ( )
protected

◆ ReadMetaInformation()

bool gdcm::Reader::ReadMetaInformation ( )
protected

◆ ReadPreamble()

bool gdcm::Reader::ReadPreamble ( )
protected

◆ ReadSelectedPrivateTags()

bool gdcm::Reader::ReadSelectedPrivateTags ( std::set< PrivateTag > const &  ptags,
bool  readvalues = true 
)

Will only read the specified selected private tags.

◆ ReadSelectedTags()

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

Will only read the specified selected tags.

◆ ReadUpToTag()

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
Examples
DumpVisusChange.cxx.

◆ SetFile()

void gdcm::Reader::SetFile ( File file)
inline

Set/Get File.

◆ SetFileName()

void gdcm::Reader::SetFileName ( const char *  filename_native)

Set the filename to open. This will create a std::ifstream internally See SetStream if you are dealing with different std::istream object

Examples
BasicAnonymizer.cs, BasicImageAnonymizer.cs, ChangePrivateTags.cxx, ChangeSequenceUltrasound.cxx, CheckBigEndianBug.cxx, Cleaner.cs, ClinicalTrialAnnotate.cxx, ClinicalTrialIdentificationWorkflow.cs, CompressImage.cxx, CompressLossyJPEG.cs, ConvertToQImage.cxx, CreateFakeRTDOSE.cxx, DecompressImage.cs, DeriveSeries.cxx, DiffFile.cxx, DumpADAC.cxx, DumpCSA.cs, DumpExamCard.cxx, DumpGEMSMovieGroup.cxx, DumpImageHeaderInfo.cxx, DumpPhilipsECHO.cxx, DumpSiemensBase64.cxx, DumpToshibaDTI.cxx, DumpToshibaDTI2.cxx, DumpVisusChange.cxx, DuplicatePCDE.cxx, ELSCINT1WaveToText.cxx, ExtractEncapsulatedFile.cs, ExtractEncryptedContent.cxx, ExtractIconFromFile.cxx, ExtractImageRegion.cs, ExtractImageRegionWithLUT.cs, FixBrokenJ2K.cxx, FixJAIBugJPEGLS.cxx, FixOrientation.cxx, GenLongSeqs.cxx, GenSeqs.cxx, GetArray.cs, GetJPEGSamplePrecision.cxx, GetSequenceUltrasound.cxx, GetSubSequenceData.cxx, HelloVizWorld.cxx, HelloWorld.cxx, LargeVRDSExplicit.cxx, MakeTemplate.cxx, ManipulateFile.cs, MergeTwoFiles.cxx, MrProtocol.cxx, NewSequence.cs, PatchFile.cxx, PrintLUT.cxx, QIDO-RS.cxx, ReadAndDumpDICOMDIR.cxx, ReadAndDumpDICOMDIR2.cxx, ReadAndPrintAttributes.cxx, ReadExplicitLengthSQIVR.cxx, ReadGEMSSDO.cxx, ReadMultiTimesException.cxx, ReadUTF8QtDir.cxx, ReformatFile.cs, RescaleImage.cs, SimplePrint.cs, SimplePrintPatientName.cs, StandardizeFiles.cs, TemplateEmptyImage.cxx, TestReader.cxx, csa2img.cxx, gdcmrtionplan.cxx, gdcmrtplan.cxx, iU22tomultisc.cxx, pmsct_rgb1.cxx, rle2img.cxx, and threadgdcm.cxx.

◆ SetStream()

void gdcm::Reader::SetStream ( std::istream &  input_stream)
inline

Set the open-ed stream directly.

Examples
ReadUTF8QtDir.cxx.

Friends And Related Symbol Documentation

◆ StreamImageReader

friend class StreamImageReader
friend

Member Data Documentation

◆ F

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

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