Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/07/31 23:30:04 $
- Version: $Revision: 1.27 $
+ Date: $Date: 2004/08/02 16:42:14 $
+ Version: $Revision: 1.30 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
gdcmDict *GetPubDict();
gdcmDict *GetShaDict();
bool SetShaDict(gdcmDict *dict);
- bool SetShaDict(DictKey dictName);
+ bool SetShaDict(DictKey const & dictName);
// Informations contained in the parser
virtual bool IsReadable();
- bool IsGivenTransferSyntax(std::string const & SyntaxToCheck);
+ bool IsGivenTransferSyntax(std::string const & syntaxToCheck);
bool IsImplicitVRLittleEndianTransferSyntax();
bool IsExplicitVRLittleEndianTransferSyntax();
bool IsDeflatedExplicitVRLittleEndianTransferSyntax();
FileType GetFileType();
- FILE* OpenFile(bool exception_on_error = false) throw(gdcmFileError);
+ FILE* OpenFile();
bool CloseFile();
void Write(FILE* fp, FileType type);
gdcmBinEntry* ReplaceOrCreateByNumber(void *voidArea, int lgth,
uint16_t group, uint16_t elem);
- bool ReplaceIfExistByNumber (std::string const & value, uint16_t group, uint16_t elem);
+ bool ReplaceIfExistByNumber ( std::string const & value,
+ uint16_t group,
+ uint16_t elem );
virtual void* LoadEntryVoidArea(uint16_t group, uint16_t elem);
virtual void* LoadEntryVoidArea(gdcmBinEntry* entry);
- // System access
+ // System access (meaning endian related !?)
uint16_t SwapShort(uint16_t); // needed by gdcmFile
uint32_t SwapLong(uint32_t); // needed by gdcmFile
uint16_t UnswapShort(uint16_t); // needed by gdcmFile
// Constructor and destructor are protected to forbid end user
// to instanciate from this class gdcmDocument (only gdcmHeader and
// gdcmDicomDir are meaningfull).
- gdcmDocument(bool exception_on_error = false);
- gdcmDocument(std::string const & filename,
- bool exception_on_error = false);
+ gdcmDocument();
+ gdcmDocument( std::string const & filename );
virtual ~gdcmDocument();
void Parse7FE0 ();
virtual std::string GetEntryVRByNumber(uint16_t group, uint16_t elem);
virtual int GetEntryLengthByNumber(uint16_t group, uint16_t elem);
protected:
- virtual bool SetEntryByName (std::string content, std::string tagName);
- virtual bool SetEntryByNumber(std::string content,
+ virtual bool SetEntryByName (std::string const & content,
+ std::string const & tagName);
+ virtual bool SetEntryByNumber(std::string const & content,
uint16_t group, uint16_t element);
virtual bool SetEntryByNumber(void *content, int lgth,
uint16_t group, uint16_t element);
private:
// Read
long ParseDES(gdcmDocEntrySet *set, long offset, long l_max,bool delim_mode);
- long ParseSQ(gdcmSeqEntry *seq, long offset, long l_max, bool delim_mode);
+ long ParseSQ (gdcmSeqEntry *seq, long offset, long l_max, bool delim_mode);
void LoadDocEntry (gdcmDocEntry *);
- void FindDocEntryLength(gdcmDocEntry *);
+ void FindDocEntryLength(gdcmDocEntry *) throw ( gdcmFormatError );
void FindDocEntryVR (gdcmDocEntry *);
bool CheckDocEntryVR (gdcmDocEntry *, gdcmVRKey);
void FixDocEntryFoundLength(gdcmDocEntry *, uint32_t);
bool IsDocEntryAnInteger (gdcmDocEntry *);
- uint32_t FindDocEntryLengthOB();
+ uint32_t FindDocEntryLengthOB() throw( gdcmFormatUnexpected );
- uint16_t ReadInt16();
- uint32_t ReadInt32();
+ uint16_t ReadInt16() throw ( gdcmFormatError );
+ uint32_t ReadInt32() throw ( gdcmFormatError );
void SkipBytes(uint32_t);
bool ReadTag(uint16_t, uint16_t);
uint32_t ReadTagLength(uint16_t, uint16_t);