Insert OB value with dcmodify.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
micdob89
Posts: 6
Joined: Mon, 2015-02-02, 11:40

Insert OB value with dcmodify.

#1 Post by micdob89 »

Hello All,

Currently I'm working on a project that will need to use private tags but after struggling for several hours I can't make the following workflow to work:

1. add this tag to my dicom.dic:

Code: Select all

(0777,1000)	OB	RTFText	1	DICOM_2011
2. Insert a reservation of my private tags into dicom file:

Code: Select all

dcmodify -i "(777,0010)=myprivatetags" -nb        201604131820551.2.392.200036.9107.307.10991.111099116031600251.777.dcm
3. Insert my private tag value:

Code: Select all

dcmodify -i "(777,1000)=samplecontent" -nb 201604131820551.2.392.200036.9107.307.10991.111099116031600251.777.dcm
Everything I get is empty value under (0777,1000). I tried to use hex, base64 representation of 'samplecontent' but with no luck. Everything works when I change VR of (0777,1000) to UT. I know this solution is sufficient in many scenarios, but I'd love to have that value as OB.

I would be really grateful for any feedback.

Greetings
Michal

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Insert OB value with dcmodify.

#2 Post by J. Riesmeier »

Did you separate the hex numbers with a backslash (as in the dcmdump output)? I just tested the following and it worked (PixelData is stored as "OW" but that doesn't matter):

Code: Select all

dcmodify +fc -v test.dcm -i PixelData=0\\1\\2\\3
Also specifying a private tag without a private creator in the dictionary file is not correct. See "private.dic" for examples and documentation.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest