- n->SetEntry(TransferSyntax, 0x0002,0x0010);
- n->SetEntry(StudyDate, 0x0008,0x0020);
- n->SetEntry(StudyTime, 0x0008,0x0030);
- n->SetEntry(Modality, 0x0008,0x0060);
- n->SetEntry(PatientName, 0x0010,0x0010);
-
- n->SetEntry(SamplesPerPixel, 0x0028,0x0002);
- n->SetEntry(Rows, 0x0028,0x0010);
- n->SetEntry(Columns, 0x0028,0x0011);
- n->SetEntry(BitsAllocated, 0x0028,0x0100);
- n->SetEntry(BitsStored, 0x0028,0x0101);
- n->SetEntry(HighBit, 0x0028,0x0102);
- n->SetEntry(PixelRepresentation,0x0028,0x0102);
+ n->ReplaceOrCreate(MediaStSOPinstUID, 0x0002,0x0002);
+ // Whe keep default gdcm Transfer Syntax (Explicit VR Little Endian)
+ // since using Papyrus one (Implicit VR Little Endian) is a mess
+ //n->ReplaceOrCreate(TransferSyntax, 0x0002,0x0010);
+ n->ReplaceOrCreate(StudyDate, 0x0008,0x0020);
+ n->ReplaceOrCreate(StudyTime, 0x0008,0x0030);
+ n->ReplaceOrCreate(Modality, 0x0008,0x0060);
+ n->ReplaceOrCreate(PatientName, 0x0010,0x0010);
+
+ n->ReplaceOrCreate(SamplesPerPixel, 0x0028,0x0002);
+ n->ReplaceOrCreate(NumberOfFrames, 0x0028,0x0008);
+ n->ReplaceOrCreate(Rows, 0x0028,0x0010);
+ n->ReplaceOrCreate(Columns, 0x0028,0x0011);
+ n->ReplaceOrCreate(BitsAllocated, 0x0028,0x0100);
+ n->ReplaceOrCreate(BitsStored, 0x0028,0x0101);
+ n->ReplaceOrCreate(HighBit, 0x0028,0x0102);
+ n->ReplaceOrCreate(PixelRepresentation,0x0028,0x0102);