- f1->GetHeader()->ReplaceOrCreateByNumber(f2->GetHeader()->GetEntryByNumber(0x0028, 0x0010),
- 0x0028, 0x0010);// nbLig
- f1->GetHeader()->ReplaceOrCreateByNumber( f2->GetHeader()->GetEntryByNumber(0x0028, 0x0011),
- 0x0028, 0x0011);// nbCol
-
-
- // sans doute d'autres à mettre à jour...
-
- // TODO : rajouter une valeur par defaut.
- // TODO : une routine qui recoit une liste de couples (gr,el),
- // et qui fasse le boulot.
-
-
- dataSize = f2->GetImageDataSize();
- printf ("dataSize %d\n",dataSize);
- imageData= f2->GetImageData();
-
- // TODO : ne devrait-on pas fusionner ces 2 fonctions ?
- f1->SetImageData(imageData,dataSize);
- f1->GetHeader()->SetImageDataSize(dataSize);
-
- f1->GetHeader()->PrintEntry();
-
- std::string s0 =f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0000);
- std::string s10=f2->GetHeader()->GetEntryByNumber(0x7fe0, 0x0010);
- printf("lgr 7fe0, 0000 %s\n",s0.c_str());
- printf("lgr 7fe0, 0010 %s\n",s10.c_str());
-
- sprintf(resultat, "%s.vol", deuxieme.c_str());
- printf ("WriteDCM\n");
- //f1->WriteDcmImplVR(resultat);
- f1->WriteAcr(resultat);
-
- return 0;
-}
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0010), 0x0028, 0x0010);// nbLig
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0011), 0x0028, 0x0011);// nbCol
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0100), 0x0028, 0x0100);// BitsAllocated
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0101), 0x0028, 0x0101);// BitsStored
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0102), 0x0028, 0x0102);// HighBit
+ f1->GetHeader()->Insert(
+ f2->GetHeader()->GetEntryValue(0x0028, 0x0103), 0x0028, 0x0103);// Pixel Representation
+// Probabely some more to update (?)
+
+// TODO : add a default value
+// TODO : add a method that receives a list of pairs (gr,el),
+// and that does the work.
+
+ int dataSize = f2->GetImageDataSize();
+ printf ("dataSize %d\n",dataSize);
+ uint8_t *imageData= f2->GetImageData();
+
+// TODO : Why don't we merge these 2 functions ?