- 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,
- std::string 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 (std::string 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();
+
+ int ComputeGroup0002Length( FileType filetype );
+
+// Variables
+ /// Refering underlying filename.
+ std::string Filename;
+
+ /// \brief Swap code gives an information on the byte order of a
+ /// supposed to be an int32, as it's read on disc
+ /// (depending on the image Transfer Syntax *and* on the processor endianess)
+ /// as opposed as it should in memory to be dealt as an int32.
+ /// For instance :
+ /// - a 'Little Endian' image, read with a little endian processor
+ /// will have a SwapCode= 1234 (the order is OK; nothing to do)
+ /// - a 'Little Endian' image, read with a big endian procesor
+ /// will have a SwapCode= 4321 (the order is wrong; int32 an int16 must be
+ /// swapped)
+ /// note : values 2143, 4321, 3412 remain for the ACR-NEMA time, and
+ /// the well known 'Bad Big Endian' and 'Bad Little Endian' codes
+ int SwapCode;
+
+ ///\brief whether we already parsed group 0002
+ bool Group0002Parsed;
+
+ ///\brief whether file has a DCM Preamble
+ bool HasDCMPreamble;
+
+ /// File Pointer, opened during Header parsing.
+ std::ifstream *Fp;
+
+ /// ACR, ACR_LIBIDO, ExplicitVR, ImplicitVR, Unknown
+ FileType Filetype;
+
+ /// After opening the file, we read HEADER_LENGTH_TO_READ bytes.
+ static const unsigned int HEADER_LENGTH_TO_READ;
+
+ /// \brief Elements whose value is longer than MAX_SIZE_LOAD_ELEMENT_VALUE
+ /// are NOT loaded.
+ static const unsigned int MAX_SIZE_LOAD_ELEMENT_VALUE;
+
+ /// \brief Elements whose value is longer than MAX_SIZE_PRINT_ELEMENT_VALUE
+ /// are NOT printed.
+ static const unsigned int MAX_SIZE_PRINT_ELEMENT_VALUE;
+
+ /// Store the RLE frames info obtained during parsing of pixels.
+ RLEFramesInfo *RLEInfo;
+
+ /// Store the JPEG fragments info obtained during parsing of pixels.
+ JPEGFragmentsInfo *JPEGInfo;