- /// \brief Size threshold above which an element value will NOT be loaded
- /// in memory (to avoid loading the image/volume itself). By default,
- /// this upper bound is fixed to 1024 bytes (which might look reasonable
- /// when one considers the definition of the various VR contents).
- guint32 MaxSizeLoadEntry;
-
- /// \brief Size threshold above which an element value will NOT be *printed*
- /// in order no to polute the screen output. By default, this upper bound
- /// is fixed to 64 bytes.
- guint32 MaxSizePrintEntry;
+typedef std::list<Element> ListElements;
+
+// Loading
+ //Deprecated : use SetFileName() + Load()
+ virtual bool Load( std::string const &filename );
+ virtual bool Load( );
+
+// Dictionaries
+ Dict *GetPubDict();
+ Dict *GetShaDict();
+ bool SetShaDict(Dict *dict);
+ bool SetShaDict(DictKey const &dictName);
+
+// Informations contained in the gdcm::Document
+ virtual bool IsReadable();
+ bool IsDicomV3();
+ bool IsPapyrus();
+ FileType GetFileType();
+ std::string GetTransferSyntax();
+ /// Return the Transfer Syntax as a string
+ std::string GetTransferSyntaxName();
+
+// Swap code
+ /// 'Swap code' accessor (see \ref SwapCode )
+ int GetSwapCode() { return SwapCode; }
+ // System access (meaning endian related !?)
+ uint16_t SwapShort(uint16_t);
+ uint32_t SwapLong(uint32_t);
+ /// \brief Unswaps back the bytes of 2-bytes long integer
+ /// so they agree with the processor order.
+ uint16_t UnswapShort(uint16_t a) { return SwapShort(a);}
+ /// \brief Unswaps back the bytes of 4-byte long integer
+ /// so they agree with the processor order.
+ uint32_t UnswapLong(uint32_t a) { return SwapLong(a);}
+
+// File I/O
+ /// Accessor to \ref Filename
+ const std::string &GetFileName() const { return Filename; }
+ /// Accessor to \ref Filename
+ virtual void SetFileName(std::string const &fileName)
+ { if (Filename != fileName)
+ Filename = fileName, IsDocumentModified = true; }
+
+ std::ifstream *OpenFile();
+ bool CloseFile();
+ void WriteContent( std::ofstream *fp, FileType type );
+
+// Content entries
+ virtual void LoadEntryBinArea(uint16_t group, uint16_t elem);
+ virtual void LoadEntryBinArea(BinEntry *entry);
+
+ void LoadDocEntrySafe(DocEntry *entry);
+ void AddForceLoadElement(uint16_t group, uint16_t elem);
+
+// Ordering of Documents
+ bool operator<(Document &document);
+
+/**
+ * \brief Sets the LoadMode as a boolean string.
+ * LD_NOSEQ, LD_NOSHADOW, LD_NOSHADOWSEQ
+ ... (nothing more, right now)
+ * WARNING : before using NO_SHADOW, be sure *all* your files
+ * contain accurate values in the 0x0000 element (if any)
+ * of *each* Shadow Group. The parser will fail if the size is wrong !
+ * @param mode Load mode to be used
+ */
+ void SetLoadMode (int mode) { if (LoadMode != mode)
+ LoadMode=mode, IsDocumentModified = true; }