]> Creatis software - gdcm.git/commitdiff
To display the actual value of Transfer Syntax (instead of its code)
authorjpr <jpr>
Tue, 17 Jun 2003 16:38:20 +0000 (16:38 +0000)
committerjpr <jpr>
Tue, 17 Jun 2003 16:38:20 +0000 (16:38 +0000)
src/gdcmTS.cxx [new file with mode: 0644]
src/gdcmTS.h [new file with mode: 0644]

diff --git a/src/gdcmTS.cxx b/src/gdcmTS.cxx
new file mode 100644 (file)
index 0000000..ebcd65a
--- /dev/null
@@ -0,0 +1,43 @@
+// gdcmTS.cxx
+
+#include <stdio.h>
+
+#include "gdcmTS.h"
+
+gdcmTS::gdcmTS(void) {
+   ts["1.2.840.10008.1.2"]      = "Implicit VR - Little Endian";  
+   ts["1.2.840.10008.1.2.1"]    = "Explicit VR - Little Endian";         
+   ts["1.2.840.10008.1.2.1.99"] = "Deflated Explicit VR - Little Endian";          
+   ts["1.2.840.10008.1.2.2"]    = "Explicit VR - Big Endian";                 
+   ts["1.2.840.10008.1.2.4.50"] = "JPEG Baseline (Process 1)";       
+   ts["1.2.840.10008.1.2.4.51"] = "JPEG Extended (Process 2 & 4)";            
+   ts["1.2.840.10008.1.2.4.52"] = "JPEG Extended (Process 3 & 5)"; 
+   ts["1.2.840.10008.1.2.4.53"] = "JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8)"; 
+   ts["1.2.840.10008.1.2.4.54"] = "JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9)";        
+   ts["1.2.840.10008.1.2.4.55"] = "JPEG Spectral Selection, Non-Hierarchical (Process 10 & 12)";           
+   ts["1.2.840.10008.1.2.4.56"] = "JPEG Spectral Selection, Non-Hierarchical (Process 11 & 13)";             
+   ts["1.2.840.10008.1.2.4.57"] = "JPEG Baseline (Process 14)";     
+   ts["1.2.840.10008.1.2.4.58"] = "JPEG Baseline (Process 15)";     
+   ts["1.2.840.10008.1.2.4.59"] = "JPEG Spectral Selection, Non-Hierarchical (Process 16 & 18)";           
+   ts["1.2.840.10008.1.2.4.60"] = "JPEG Spectral Selection, Non-Hierarchical (Process 17 & 19)";          
+   ts["1.2.840.10008.1.2.4.61"] = "JPEG Spectral Selection, Non-Hierarchical (Process 20 & 22)";           
+   ts["1.2.840.10008.1.2.4.62"] = "JPEG Spectral Selection, Non-Hierarchical (Process 21 & 23)";          
+   ts["1.2.840.10008.1.2.4.63"] = "JPEG Spectral Selection, Non-Hierarchical (Process 24 & 26)";   
+   ts["1.2.840.10008.1.2.4.64"] = "JPEG Spectral Selection, Non-Hierarchical (Process 25 & 27)";   
+   ts["1.2.840.10008.1.2.4.65"] = "JPEG Lossless, Hierarchical (Process 28)";   
+   ts["1.2.840.10008.1.2.4.66"] = "JPEG Lossless, Hierarchical (Process 29)";   
+   ts["1.2.840.10008.1.2.4.70"] = "Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])"; 
+   ts["1.2.840.10008.1.2.5"]    = "RLE Lossless";              
+}
+
+gdcmTS::~gdcmTS() {
+   ts.clear();
+}
+
+int gdcmTS::Count(TSKey key) {
+   return ts.count(key);
+}
+
+string gdcmTS::GetValue(TSKey key) {
+   return ts[key];
+}
diff --git a/src/gdcmTS.h b/src/gdcmTS.h
new file mode 100644 (file)
index 0000000..0aa14c3
--- /dev/null
@@ -0,0 +1,27 @@
+// gdcmTS.h
+
+#ifndef GDCMTS_H
+#define GDCMTS_H
+
+#include <map>
+#include <string>
+#include "gdcmCommon.h"
+
+typedef std::string TSKey;
+typedef std::string TSAtr;
+typedef std::map<TSKey, TSAtr> TSHT;    // Transfert Syntax Hash Table
+
+/// Container for dicom Transfert Syntax Hash Table
+/// \note   This is a singleton
+class GDCM_EXPORT gdcmTS {
+private:
+   TSHT ts;    
+
+public:
+   gdcmTS(void);
+   ~gdcmTS();
+   int Count(TSKey key);
+   string GetValue(TSKey key);
+};
+
+#endif