-// Dictionnaries
- Dict* GetPubDict();
- Dict* GetShaDict();
- bool SetShaDict(Dict* dict);
- bool SetShaDict(DictKey const & dictName);
-
-// Informations contained in the parser
- virtual bool IsReadable();
- TransferSyntaxType GetTransferSyntax();
- bool IsJPEGLossless();
- bool IsJPEG2000();
- bool IsJPEG();
- bool IsEncapsulate();
- bool IsDicomV3();
-
- FileType GetFileType();
-
- std::ifstream * OpenFile();
- bool CloseFile();
-
- void WriteContent( std::ofstream* fp, FileType type );
-
- ValEntry* ReplaceOrCreateByNumber(std::string const & value,
- uint16_t group, uint16_t elem,
- TagName const & vr = "unkn");
-
- BinEntry* ReplaceOrCreateByNumber(uint8_t* binArea, int lgth,
- uint16_t group, uint16_t elem,
- TagName const & vr = "unkn");
-
- SeqEntry* ReplaceOrCreateByNumber(uint16_t group, uint16_t elem);
-
- bool ReplaceIfExistByNumber ( std::string const & value,
- uint16_t group, uint16_t elem );
-
- virtual void LoadEntryBinArea(uint16_t group, uint16_t elem);
- virtual void LoadEntryBinArea(BinEntry* entry);
-
- // System access (meaning endian related !?)
- uint16_t SwapShort(uint16_t); // needed by File
- uint32_t SwapLong(uint32_t); // needed by File
- uint16_t UnswapShort(uint16_t); // needed by File
- uint32_t UnswapLong(uint32_t); // needed by File
-
- static std::string GetTransferSyntaxValue(TransferSyntaxType type);
-
-protected:
- // Constructor and destructor are protected to forbid end user
- // to instanciate from this class Document (only Header and
- // DicomDir are meaningfull).
- Document();
- Document( std::string const & filename );
- virtual ~Document();
-
- void ReadAndSkipEncapsulatedBasicOffsetTable();
- void ComputeRLEInfo();
- void ComputeJPEGFragmentInfo();
- // Entry
- bool CheckIfEntryExistByNumber(uint16_t group, uint16_t elem );
-public:
- virtual std::string GetEntryByName (TagName const & tagName);
- virtual std::string GetEntryVRByName (TagName const & tagName);
- virtual std::string GetEntryByNumber (uint16_t group, uint16_t elem);
- 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 const & content,
- TagName const & tagName );
- virtual bool SetEntryByNumber(std::string const & content,
- uint16_t group, uint16_t element);
- virtual bool SetEntryByNumber(uint8_t* content, int lgth,
- uint16_t group, uint16_t element);
- virtual bool SetEntryLengthByNumber(uint32_t length,
- uint16_t group, uint16_t element);
-
- virtual size_t GetEntryOffsetByNumber(uint16_t group, uint16_t elem);
- virtual void* GetEntryBinAreaByNumber(uint16_t group, uint16_t elem);
- virtual bool SetEntryBinAreaByNumber(uint8_t* a, uint16_t group,
- uint16_t elem);
-
- virtual void UpdateShaEntries();
-
- // Header entry
- DocEntry* GetDocEntryByNumber(uint16_t group, uint16_t element);
- DocEntry* GetDocEntryByName (TagName const & tagName);
-
- ValEntry* GetValEntryByNumber(uint16_t group, uint16_t element);
- //BinEntry* GetBinEntryByNumber(uint16_t group, uint16_t element);
- RLEFramesInfo* GetRLEInfo() { return RLEInfo; }
- JPEGFragmentsInfo* GetJPEGInfo() { return JPEGInfo; }
-
- void LoadDocEntrySafe(DocEntry* entry);
- TagDocEntryHT* BuildFlatHashTable();