- // Change the created dict entry
- std::string PixelVR;
- // 8 bits allocated is a 'O Bytes' , as well as 24 (old ACR-NEMA RGB)
- // more than 8 (i.e 12, 16) is a 'O Words'
- if ( GetBitsAllocated() == 8 || GetBitsAllocated() == 24 )
- PixelVR = "OB";
- else
- PixelVR = "OW";
+ // Create a new BinEntry to change the the DictEntry
+ // The changed DictEntry will have
+ // - a correct PixelVR OB or OW)
+ // - a VM to "PXL"
+ // - the name to "Pixel Data"
+ BinEntry *oldEntry = dynamic_cast<BinEntry *>(entry);
+ if(oldEntry)
+ {
+ std::string PixelVR;
+ // 8 bits allocated is a 'O Bytes' , as well as 24 (old ACR-NEMA RGB)
+ // more than 8 (i.e 12, 16) is a 'O Words'
+ if ( GetBitsAllocated() == 8 || GetBitsAllocated() == 24 )
+ PixelVR = "OB";
+ else
+ PixelVR = "OW";
+
+ // Change only made if usefull
+ if( PixelVR != oldEntry->GetVR() )
+ {
+ DictEntry* newDict = NewVirtualDictEntry(GrPixel,NumPixel,
+ PixelVR,"1","Pixel Data");