Illegal Dicom Group

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

Illegal Dicom Group

#1 Post by 4steven »

I am trying to use dcmodify to change and add a couple of Dicom tags before sending them to our pacs.

1 of these tags specific to the PACS vendor is group 0005 which dcmodify reports is an ilegal group.

I have tried many times to get this to work unsuccessfully.

How can I get dcmodify to insert the needed group 5 tags ?

Thanks for any help

Steven

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

#2 Post by J. Riesmeier »

These elements in group "0005" are illegal as DICOM PS 3.5 states in section 7.1:
Private Data Elements have an odd Group Number that is not (0001,eeee), (0003,eeee),
(0005,eeee), (0007,eeee), or (FFFF,eeee).
You should contact the vendor and tell him that he is creating non-standard conformant DICOM objects!

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#3 Post by 4steven »

Illegal or not, unfortunately they are not going to change their entire installed base just because I asked them too. ( btw I did already ask ).

Without being able to insert 1 entery in Group 5 and 1 entry in group 50 then the images will not import to where they are supposed to and will take a lot of manual work to correct.

Is there any way around the ilegal issue to get these 2 keys in ?

Steven

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

#4 Post by J. Riesmeier »

As far as I can see, there is currently no way to ignore this standard violation (data elements in group 0x0005) with dcmodify. But I already added this as a "nice-to-have" to our to-do list.

Of course, you can write your own little program based on the DCMTK. Or, you could use dcmdump/dump2dcm or dcm2xml/xml2dcm to perform this task.

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#5 Post by 4steven »

While I would normally plunge right ahead and attempt to write my "own little program" I only know vbscript and a limited amount of vb.net. I have reviewed the DCMTK code and it is just a bit beyond my expertise at the moment.

steven

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

#6 Post by J. Riesmeier »

... you could also disable the checks in the source code of dcmodify by commenting out the corresponding lines. Just search for the error message text in "dcmdata/apps/*.cc".

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#7 Post by 4steven »

I have removed the 0005 exclusion and compiled a new version.

Now I get " NO private reservation found"


This is my command line

Code: Select all

c:\scripts\dicom\dcmodify1.exe -nb -ll trace -i "(0005,0005)=TESTDATA" c:\temp\Import\1.3.DCM
And the private.dic file has.

Code: Select all

(0005,0005)	CS	MYTAG	1	DICOM
I also tried

Code: Select all

(0005,"MYTAG",05)	CS	MYTAG	1	DICOM
Is there something I am doing wrong ?

Steven

Uli Schlachter
DCMTK Developer
Posts: 120
Joined: Thu, 2009-11-26, 08:15

#8 Post by Uli Schlachter »

According to the dcmodify man page, --no-reserv-check disables the check.

BTW: This is another standard violation.

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#9 Post by 4steven »

Thanks, I missed that.

I will give it a try.

Steven

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#10 Post by 4steven »

With the -nrc option all I get is "corrupted Data" messages. I am assuming because it doesn't know what type the tags should be.

Steven

Uli Schlachter
DCMTK Developer
Posts: 120
Joined: Thu, 2009-11-26, 08:15

#11 Post by Uli Schlachter »

The only "corrupted data" message that this could be means, that reading the file failed.
Can dcmdump read the file? Could you paste the output of dcmodify or dcmdump started with the --debug flag (and for dcmodify, whatever other flags you are trying)?
Can you upload the dicom file somewhere or send it via mail to dicom (at) offis (dot) de togehter with the dcmodify command that you are trying to execute?

Uli

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#12 Post by 4steven »

dcmdump works fine, and I have tried on hundreds of different Dicom files from various places. I can modify any existing tags in the files, I just seem unable to insert a tag.

4steven
Posts: 8
Joined: Fri, 2011-01-21, 17:46

#13 Post by 4steven »

I now have it working on another pc, must be something on my test pc.

Thanks for all the help.

Steven

Post Reply

Who is online

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