#include <map>
#include <string>
#include <iostream>
+#include <stdio.h>
int main()
{
cout << "Find request on key 00380010" << endl;
im = tb1.find("00380010");
cout << " \"" << im->first << "\" = " << im->second << endl;
+
+ int i = 0x0010;
+ std::cout.setf(std::ios::hex);
+ std::cout << i << endl;
+ std::cout.setf(std::ios::dec);
+ std::cout << i << endl;
+
+ // Voir :
+ //http://www.developer.com/net/cplus/article.php/10919_2119781_3
+ //
+ // domage que ca ne marche pas ...
}
#include "gdcmUtil.h"
#include "gdcmElValSet.h"
-#define DEBUG 0
-
TagElValueHT & gdcmElValSet::GetTagHt(void) {
return tagHt;
sprintf(trash, "%04x", gr);
key = trash;
-
+
if (SkipSequence && vr == "SQ") continue;
// pas SEQUENCE en ACR-NEMA
// WARNING : pb CERTAIN
}
}
+ if(0)
+ for (GroupHT::iterator g = groupHt.begin();
+ g != groupHt.end();
+ ++g){
+ printf("groupKey %s : %d\n",g->first.c_str(),g->second);
+ }
+
+
unsigned short int gr_bid;
for (GroupHT::iterator g = groupHt.begin();
g != groupHt.end();
++g){
- tk = g->first + "|0000";
sscanf(g->first.c_str(),"%x",&gr_bid);
-
+ tk = g->first + "|0000";
+
if ( tagHt.count(tk) == 0) {
gdcmDictEntry * tagZ = new gdcmDictEntry(gr_bid, 0x0000, "UL");
elemZ = new gdcmElValue(tagZ);
Add(elemZ);
} else {
elemZ=GetElementByNumber(gr_bid, 0x0000);
- }
+ }
+ sprintf(trash ,"%d",g->second);
str_trash=trash;
elemZ->SetValue(str_trash);
}
lgr = tag2->second->GetLength();
val = tag2->second->GetValue().c_str();
vr = tag2->second->GetVR();
- if(DEBUG)printf ("%04x %04x [%s] : [%s]\n",gr, el, vr.c_str(), val);
if ( type == ACR ) {
if (gr < 0x0008) continue;
//FIXME Refer to standards on page 21, chapter 6.2 "Value representation":
// values with a VR of UI shall be padded with a single trailing null
- // Dans le cas suivant on doit pader manuellement avec un 0.
+ // Dans le cas suivant on doit pader manuellement avec un 0
+
SetElValueLengthByNumber(18, 0x0002, 0x0010);
}
// Question :
- // Comment pourrait-on si le DcmHeader vient d'un fichoer DicomV3 ou non ,
+ // Comment pourrait-on savoir si le DcmHeader vient d'un fichier DicomV3 ou non ,
// (FileType est un champ de gdcmHeader ...)
// WARNING : Si on veut ecrire du DICOM V3 a partir d'un DcmHeader ACR-NEMA
// no way