Re: [XNAT Discussion] DicomRemap dosn't work as expected

43 views
Skip to first unread message

Archie, Kevin

unread,
Nov 1, 2012, 7:08:30 PM11/1/12
to <xnat_discussion@googlegroups.com>, dicombrow...@googlegroups.com
There are actually two problems here:

One is that variable initialization (which looks unfortunately like tag assignment) is a once-per-script-application, global operation. So you can do

tempPID := (0010,0020)

sort-of safely so long as you only have one value of Patient ID in the whole dataset on which you're running the script. (I've talked previously about adding patient, study and series scopes, but that will complicate both the language semantics and the implementation and I haven't had a pressing need for it.)

You'd actually be better off just doing:

(0010,0020) := (0010,0010)
(0010,0010) := (0010,0020)

...except for the second problem, which is that there's a bug preventing that from working. Coincidentally, I fixed that bug a week or two ago but I haven't pushed up a new version of DicomBrowserDicomRemap yet. It's part of a fairly major DicomEdit update that makes possible Suppl. 142-style anonymization, so unfortunately there are some small API changes and it's not just a drop-in-the-jar upgrade.

I'll try to wrap up those changes over the next week or so. If you really need it in the next day I could probably hack up a script that exploits the current, buggy state of things, but that would break when the language gets fixed in the next release.

Sorry for the chaos. Things will be better soon.

  - Kevin


On Nov 1, 2012, at 4:30 PM, Just, David J. (Dave) wrote:

I simply want to flip patient ID and patient Name on dicom files.  This looks like it should be a simple task for DicomRemap but it only changes the patientID to the value of patientName and leaves name the same

script:
{{{
describe tempPID hidden
tempPID := (0010,0020)
echo tempPID
describe tempName hidden
tempName := (0010,0010)
echo tempName
(0010,0020) := tempName
(0010,0010) := tempPID
}}}

Any suggestions?

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To post to this group, send email to xnat_di...@googlegroups.com.
To unsubscribe from this group, send email to xnat_discussi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xnat_discussion?hl=en.




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.
Reply all
Reply to author
Forward
0 new messages