Program: gdcm
Module: $RCSfile: gdcmDocument.h,v $
Language: C++
- Date: $Date: 2004/11/25 15:46:11 $
- Version: $Revision: 1.64 $
+ Date: $Date: 2004/12/16 11:37:02 $
+ Version: $Revision: 1.69 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef GDCMDOCUMENT_H
#define GDCMDOCUMENT_H
-#include "gdcmCommon.h"
#include "gdcmVR.h"
-#include "gdcmTS.h"
-#include "gdcmException.h"
-#include "gdcmDictSet.h"
-#include "gdcmDocEntry.h"
-#include "gdcmRLEFramesInfo.h"
-#include "gdcmJPEGFragmentsInfo.h"
-#include "gdcmDocEntrySet.h"
+#include "gdcmDict.h"
#include "gdcmElementSet.h"
-class ValEntry;
-class BinEntry;
-class SeqEntry;
-
#include <map>
#include <list>
#include <fstream>
namespace gdcm
{
+class ValEntry;
+class BinEntry;
+class SeqEntry;
+class Dict;
+class RLEFramesInfo;
+class JPEGFragmentsInfo;
enum TransferSyntaxType {
ImplicitVRLittleEndian = 0,
UnknownTS
};
-static const char *TransferSyntaxStrings[] = {
- // Implicit VR Little Endian
- "1.2.840.10008.1.2",
- // Implicit VR Little Endian DLX G.E?
- "1.2.840.113619.5.2",
- // Explicit VR Little Endian
- "1.2.840.10008.1.2.1",
- // Deflated Explicit VR Little Endian
- "1.2.840.10008.1.2.1.99",
- // Explicit VR Big Endian
- "1.2.840.10008.1.2.2",
- // JPEG Baseline (Process 1)
- "1.2.840.10008.1.2.4.50",
- // JPEG Extended (Process 2 & 4)
- "1.2.840.10008.1.2.4.51",
- // JPEG Extended (Process 3 & 5)
- "1.2.840.10008.1.2.4.52",
- // JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8)
- "1.2.840.10008.1.2.4.53",
- // JPEG Full Progression, Non-Hierarchical (Process 10 & 12)
- "1.2.840.10008.1.2.4.55",
- // JPEG Lossless, Non-Hierarchical (Process 14)
- "1.2.840.10008.1.2.4.57",
- // JPEG Lossless, Hierarchical, First-Order Prediction (Process 14, [Selection Value 1])
- "1.2.840.10008.1.2.4.70",
- // JPEG 2000 Lossless
- "1.2.840.10008.1.2.4.90",
- // JPEG 2000
- "1.2.840.10008.1.2.4.91",
- // RLE Lossless
- "1.2.840.10008.1.2.5",
- // Unknown
- "Unknown Transfer Syntax"
-};
-
//-----------------------------------------------------------------------------
/**
* \brief Derived by both Header and DicomDir
/// Store the JPEG fragments info obtained during parsing of pixels.
JPEGFragmentsInfo* JPEGInfo;
- /// \brief Amount of printed details for each Header Entry (Dicom Element):
- /// 0 : stands for the least detail level.
- int PrintLevel;
-
public:
// the 2 following will be merged
virtual void PrintPubDict (std::ostream &os = std::cout);
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
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 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);
+ // FIXME
+ // Verify the usefull of this method... otherwise remove it
+ // It's body is commented in the .xx
+ //virtual bool SetEntryBinAreaByNumber(uint8_t* a, uint16_t group,
+ // uint16_t elem);
virtual void UpdateShaEntries();
void HandleBrokenEndian(uint16_t group, uint16_t elem);
public:
// Accessors:
- /// Accessor to \ref PrintLevel
- void SetPrintLevel(int level) { PrintLevel = level; }
-
/// Accessor to \ref Filename
const std::string &GetFileName() const { return Filename; }
int GetSwapCode() { return SwapCode; }
bool operator<(Document &document);
-
};
} // end namespace gdcm