Failed anonymization of private tags

344 views
Skip to first unread message

akluiber

unread,
Mar 19, 2021, 1:03:58 PM3/19/21
to xnat_discussion
Hi all,

I have a test instance of the latest docker-compose running, and am having some trouble getting the site-wide and project-specific anonymization scripts to work as far as private tags go.

Here's the offending bit that results in failure:

//retain philips, GE and Toshiba iterative/filter values
retainPrivateTags[ "(01F7,109B)","(0053,1040)","(0053,1041)","(0053,1042)","(0053,1043)","(7005,XX0B)"]

Here are the errors I'm getting in the UI:

Extraction/Review failed: org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.IllegalStateException: Failed to parse tagpath at 1:6 due to no viable alternative at input '(01F7,109B)'

I figure my line must have been wrong, so tried 'removeAllPrivateTags' and got this error:

Extraction/Review failed: org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.ClassCastException: [B cannot be cast to org.dcm4che2.data.DicomObject

This seems to occur whether I'm sending using the UI uploaders, sending via DICOM operation, sending compressed or uncompressed transfer syntax, or whether either line is in either site-wide or project specific anonymization scripts.

I even tried removing just a single private tag and doing nothing else beyond the default script and received this error:

Extraction/Review failed: Failed to parse at 16:7 due to no viable alternative at input '(0009,1001)'

Manipulating only standard tags seem to work just fine.

Any thoughts?

Moore, Charlie

unread,
Mar 19, 2021, 1:08:07 PM3/19/21
to xnat_di...@googlegroups.com
Hello,

Could you share the full script you're trying to use?

Thanks,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of akluiber <al...@kluiber.net>
Sent: Friday, March 19, 2021 11:57 AM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Failed anonymization of private tags
 

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/a08d8427-523f-4a8c-87b2-86f4fdc4f9acn%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. 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.

Moore, Charlie

unread,
Mar 19, 2021, 1:34:57 PM3/19/21
to xnat_di...@googlegroups.com
The full scripts would still be useful, but I did notice the problem for at least most of the errors you're seeing. DicomEdit 6 (which is what you must be using as these functions are DE6 only) adds the ability to handle private elements better, but it requires you to interact with the private elements semantically rather than by absolute tag paths. For example, if you were using DicomEdit 4 (which you can do in XNAT by leaving the "version" line out of your script), you could have a script that just said:

-(0009,1001)

My guess is that is what you tried in DicomEdit 6, right? In DE6, whenever you are specifying private elements, you are required to use the private creator IDs (as there's no guarantee as to where exactly you will find the elements in the headers), not absolute paths. So, to go all the way back to the start..."(01F7,109B)" is not a valid input to the retainPrivateTags function. From some quick googling of conformance statements, it looks like what the private creator ID you might be expecting would be "ELSCINT1". If that is indeed correct for your data, this would look like:

retainPrivateTags["(01F7,{ELSCINT1}9B)", < do something analogous for the rest of the tag paths here > ]


Hope that helps,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Moore, Charlie <moo...@wustl.edu>
Sent: Friday, March 19, 2021 12:08 PM
To: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com>
Subject: Re: [XNAT Discussion] Failed anonymization of private tags
 

akluiber

unread,
Mar 19, 2021, 3:52:19 PM3/19/21
to xnat_discussion
Interesting. I am using DicomEdit 6 I will see if I can lookup the private creators IDs and adjust accordingly.

However, here's a full script that also fails when trying to just remove all private tags entirely. I'm pretty sure it's just the default with "removeAllPrivateTags" added to the end.

//
// Default XNAT anonymization script
// Copyright (c) 2005-2017, Washington University School of Medicine and Howard Hughes Medical Institute
// All Rights Reserved
//
// Released under the Simplified BSD.
//
version "6.1"

project != "Unassigned" ? (0008,1030) := project

(0010,0010) := subject
(0010,0020) := session

removeAllPrivateTags

Here's the error:
Extraction/Review failed: org.nrg.transaction.TransactionException: java.lang.ClassCastException: [B cannot be cast to org.dcm4che2.data.DicomObject

Herrick, Rick

unread,
Mar 19, 2021, 4:08:16 PM3/19/21
to xnat_di...@googlegroups.com

Do you have access to the XNAT logs on your server? If so, see if you can find that “org.nrg.transaction.TransactionException” in there anywhere. There should be a more verbose stacktrace (MUCH more verbose possibly) somewhere in there. That would be very helpful in figuring out what’s going wrong.

 

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

akluiber

unread,
Mar 19, 2021, 4:21:24 PM3/19/21
to xnat_discussion
Yep, here's the error in restlet.log using "removeAllPrivateTags":

2021-03-19 20:15:43,952 [threadPoolExecutorFactoryBean-12] ERROR org.nrg.xnat.restlet.actions.SessionImporter -
org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.ClassCastException: [B cannot be cast to org.dcm4che2.data.DicomObject
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:286)
at org.nrg.xnat.helpers.merge.AnonymizerA.anonymize(AnonymizerA.java:68)
at org.nrg.xnat.helpers.merge.AnonymizerA.call(AnonymizerA.java:99)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:265)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:48)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.nrg.transaction.TransactionException: java.lang.ClassCastException: [B cannot be cast to org.dcm4che2.data.DicomObject
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:50)
at org.nrg.transaction.Run.runTransaction(Run.java:17)
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:282)
... 8 common frames omitted
Caused by: java.lang.ClassCastException: [B cannot be cast to org.dcm4che2.data.DicomObject
at org.dcm4che2.data.SequenceDicomElement.getDicomObject(SequenceDicomElement.java:275)
at org.nrg.dicom.mizer.objects.DicomObjectFactory$MizerDicomObject.deleteAllPrivateTags(DicomObjectFactory.java:658)
at org.nrg.dicom.mizer.objects.DicomObjectFactory$MizerDicomObject.deleteAllPrivateTags(DicomObjectFactory.java:551)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitRemoveAllPrivateTags(DicomEditParseTreeVisitor.java:457)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitRemoveAllPrivateTags(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$RemoveAllPrivateTagsContext.accept(DE6Parser.java:1747)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitStatement(DicomEditParseTreeVisitor.java:81)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitStatement(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$StatementContext.accept(DE6Parser.java:342)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitScript(DicomEditParseTreeVisitor.java:74)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitScript(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$ScriptContext.accept(DE6Parser.java:140)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.ScriptApplicator.apply(ScriptApplicator.java:104)
at org.nrg.dicom.dicomedit.mizer.DE6Mizer.anonymizeImpl(DE6Mizer.java:105)
at org.nrg.dicom.mizer.service.impl.AbstractMizer.anonymize(AbstractMizer.java:86)
at org.nrg.dicom.mizer.service.impl.AnonymizeCallOnFileWithPixels.call(AnonymizeCallOnFileWithPixels.java:62)
at org.nrg.dicom.mizer.service.impl.AnonymizeCallOnFileWithPixels.call(AnonymizeCallOnFileWithPixels.java:38)
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:32)
... 10 common frames omitted

Yep, here's the error in restlet.log using retainPrivateTags[ "(01F7,{ELSCINT1}9B)","(0053,{GEHC_CT_ADVAPP_001}40)","(0053,{GEHC_CT_ADVAPP_001}41)","(0053,{GEHC_CT_ADVAPP_001}42)","(0053,{GEHC_CT_ADVAPP_001}43)","(7005,{TOSHIBA_MEC_CT3}0B)"]:

2021-03-19 20:17:55,870 [threadPoolExecutorFactoryBean-13] ERROR org.nrg.xnat.restlet.actions.SessionImporter - 
org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.NullPointerException
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:286)
at org.nrg.xnat.helpers.merge.AnonymizerA.anonymize(AnonymizerA.java:68)
at org.nrg.xnat.helpers.merge.AnonymizerA.call(AnonymizerA.java:99)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:265)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:48)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.nrg.transaction.TransactionException: java.lang.NullPointerException
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:50)
at org.nrg.transaction.Run.runTransaction(Run.java:17)
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:282)
... 8 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.util.regex.Pattern.quote(Pattern.java:1291)
at org.nrg.dicom.mizer.tags.TagPrivate.computePvtCreatorRegex(TagPrivate.java:109)
at org.nrg.dicom.mizer.tags.TagPrivate.getRegex(TagPrivate.java:103)
at org.nrg.dicom.mizer.tags.TagPath.computeRegex(TagPath.java:192)
at org.nrg.dicom.mizer.tags.TagPath.getRegex(TagPath.java:150)
at org.nrg.dicom.mizer.objects.DicomObjectFactory$MizerDicomObject$DeleteDicomObjectVisitor.visitTag(DicomObjectFactory.java:302)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:63)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:36)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:28)
at org.nrg.dicom.mizer.objects.DicomObjectFactory$MizerDicomObject.delete(DicomObjectFactory.java:321)
at org.nrg.dicom.dicomedit.functions.RetainPrivateTagsScriptFunction$1.visitTag(RetainPrivateTagsScriptFunction.java:60)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:63)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:36)
at org.nrg.dicom.mizer.objects.DicomObjectVisitor.visit(DicomObjectVisitor.java:28)
at org.nrg.dicom.dicomedit.functions.RetainPrivateTagsScriptFunction.apply(RetainPrivateTagsScriptFunction.java:65)
at org.nrg.dicom.dicomedit.functions.FunctionManager.execute(FunctionManager.java:125)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.evaluateFunction(DicomEditParseTreeVisitor.java:440)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitMethod(DicomEditParseTreeVisitor.java:335)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitMethod(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$MethodContext.accept(DE6Parser.java:1092)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitStatement(DicomEditParseTreeVisitor.java:81)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitStatement(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$StatementContext.accept(DE6Parser.java:342)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitScript(DicomEditParseTreeVisitor.java:74)
at org.nrg.dicom.dicomedit.DicomEditParseTreeVisitor.visitScript(DicomEditParseTreeVisitor.java:39)
at org.nrg.dicom.dicomedit.DE6Parser$ScriptContext.accept(DE6Parser.java:140)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.nrg.dicom.dicomedit.ScriptApplicator.apply(ScriptApplicator.java:104)
at org.nrg.dicom.dicomedit.mizer.DE6Mizer.anonymizeImpl(DE6Mizer.java:105)
at org.nrg.dicom.mizer.service.impl.AbstractMizer.anonymize(AbstractMizer.java:86)
at org.nrg.dicom.mizer.service.impl.AnonymizeCallOnFileWithPixels.call(AnonymizeCallOnFileWithPixels.java:62)
at org.nrg.dicom.mizer.service.impl.AnonymizeCallOnFileWithPixels.call(AnonymizeCallOnFileWithPixels.java:38)
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:32)
... 10 common frames omitted

Moore, Charlie

unread,
Mar 19, 2021, 4:57:20 PM3/19/21
to xnat_di...@googlegroups.com
Hmm, to eliminate another variable, do these issues persist if you upload the study here instead https://nrg.wustl.edu/projects/DICOM/sample1.zip ?

Thanks,
Charlie

Sent: Friday, March 19, 2021 3:21 PM

DavidMaffitt

unread,
Mar 19, 2021, 5:43:33 PM3/19/21
to xnat_discussion
Is the data Implicit or Explicit Value Representation?  The listed private tags are in private-element dictionaries and don't look likely to contain PHI at first glance.  Is it possible to remove everything else and provide a sample?

akluiber

unread,
Mar 22, 2021, 12:18:57 PM3/22/21
to xnat_discussion
So the samples do work, as does a set of other phantom images I tried.

Perhaps something about how these particular images were anonymized in the first place. Here's a sample I can provide.
sample.dcm

DavidMaffitt

unread,
Mar 22, 2021, 5:52:19 PM3/22/21
to xnat_discussion
We've noticed the sample data is missing creator IDs for groups 140d, 160d and 170d.  Confusingly, you mention using
retainPrivateTags[ "(01F7,{ELSCINT1}9B)","(0053,{GEHC_CT_ADVAPP_001}40)","(0053,{GEHC_CT_ADVAPP_001}41)","(0053,{GEHC_CT_ADVAPP_001}42)","(0053,{GEHC_CT_ADVAPP_001}43)","(7005,{TOSHIBA_MEC_CT3}0B)"]
but there is no overlap in private elements in the sample data and the ones referenced in the script.  

The DICOM is definitely broken if it is missing creator IDs and that should be addressed at the source.  But, assuming you can’t fix the data upstream, you could add the creator ID tags in the script.

set[ "140d,0010", "Whatever the creator ID string is"];
retainPrivateTag[ "(140d,{Whatever the creator ID string is}10"]

The 'set' function was added in DicomEdit 6.3 primarily for this case where the private creator ID is missing. DicomEdit 6.3 ships with XNAT 1.8.  If your XNAT is pre 1.8, you can still utilize DicomEdit v6.3 from the command line. You can download the jar file and get command-line instructions here.

-Dave

akluiber

unread,
Mar 22, 2021, 6:17:18 PM3/22/21
to xnat_discussion
Yes, sorry. This is an older dicom which doesn't include the above mentioned tags. For this one, I was simply trying removeAllPrivateTags. I'm guessing then that the lack of private Creator IDs affects that as well?

I suppose I may have to manually fix my dicoms to insert the relevant privateCreatorIDs where necessary to get the anonymization scripts to run smoothly. Appreciate the help.

akluiber

unread,
Mar 23, 2021, 5:11:36 PM3/23/21
to xnat_discussion
OK, perhaps a different issue entirely. I've managed to restructure the headers of some dicom and get the anonymization to work as expected; but with uncompressed DICOM only. It fails when uploading compressed transfer syntaxes. In fact, I can't do a DICOM send through Horos with compressed syntaxes at all. I assume this isn't expected behavior? I know I've been able to load jpg2k lossless compressed DICOM in the OHIF viewer in this docker instance.

See errors:

---Compressed Uploader : restlet.log---

2021-03-23 20:33:12,564 [threadPoolExecutorFactoryBean-47] ERROR org.nrg.xnat.restlet.actions.SessionImporter - 
org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.ClassCastException
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:286)
at org.nrg.xnat.helpers.merge.AnonymizerA.anonymize(AnonymizerA.java:68)
at org.nrg.xnat.helpers.merge.AnonymizerA.call(AnonymizerA.java:99)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:265)
at org.nrg.xnat.restlet.actions.SessionImporter.call(SessionImporter.java:48)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.nrg.transaction.TransactionException: java.lang.ClassCastException
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:50)
at org.nrg.transaction.Run.runTransaction(Run.java:17)
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:282)
... 8 common frames omitted
Caused by: java.lang.ClassCastException: null



---DICOM Send : dicom.log---

2021-03-23 20:42:21,244 [threadPoolExecutorFactoryBean-53] ERROR org.nrg.dcm.scp.CStoreService - C-STORE operation failed
org.nrg.action.ClientException: unable to read DICOM object null
at org.nrg.xnat.archive.GradualDicomImporter.call(GradualDicomImporter.java:343)
at org.nrg.dcm.scp.CStoreService.doCStore(CStoreService.java:313)
at org.nrg.dcm.scp.CStoreService.cstore(CStoreService.java:264)
at org.dcm4che2.net.DicomServiceRegistry.process(DicomServiceRegistry.java:238)
at org.dcm4che2.net.NetworkApplicationEntity.perform(NetworkApplicationEntity.java:1185)
at org.dcm4che2.net.Association.onDimseRQ(Association.java:1010)
at org.dcm4che2.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:530)
at org.dcm4che2.net.Association.onPDataTF(Association.java:987)
at org.dcm4che2.net.State$Sta6.receivedPDataTF(State.java:239)
at org.dcm4che2.net.Association.receivedPDataTF(Association.java:983)
at org.dcm4che2.net.PDUDecoder.nextPDU(PDUDecoder.java:231)
at org.dcm4che2.net.Association.run(Association.java:882)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.nrg.action.ServerException: org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.ClassCastException
at org.nrg.xnat.archive.GradualDicomImporter.call(GradualDicomImporter.java:332)
... 14 common frames omitted
Caused by: org.nrg.dicom.mizer.exceptions.MizerException: org.nrg.transaction.TransactionException: java.lang.ClassCastException
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:267)
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:221)
at org.nrg.xnat.archive.GradualDicomImporter.call(GradualDicomImporter.java:310)
... 14 common frames omitted
Caused by: org.nrg.transaction.TransactionException: java.lang.ClassCastException
at org.nrg.transaction.operations.WorkOnCopyOp.run(WorkOnCopyOp.java:50)
at org.nrg.transaction.Run.runTransaction(Run.java:17)
at org.nrg.dicom.mizer.service.impl.BaseMizerService.anonymize(BaseMizerService.java:265)
... 16 common frames omitted
Caused by: java.lang.ClassCastException: null


Moore, Charlie

unread,
Mar 23, 2021, 6:04:03 PM3/23/21
to xnat_di...@googlegroups.com
You are correct that that's not the expected behavior. It's working for me for CSTOREs to XNAT with compressed DICOM (& anon). Would you be able to share your script and a non-sensitive sample to recreate this?

Thanks,
Charlie

Sent: Tuesday, March 23, 2021 4:11 PM

akluiber

unread,
Mar 24, 2021, 11:50:43 AM3/24/21
to xnat_discussion

Sure. site-wide script below and two dicom sample attached.

//
// Default XNAT anonymization script
// Copyright (c) 2005-2017, Washington University School of Medicine and Howard Hughes Medical Institute
// All Rights Reserved
//
// Released under the Simplified BSD.
//
version "6.3"

project != "Unassigned" ? (0008,1030) := project

(0010,0010) := subject
(0010,0020) := session

retainPrivateTags["(01F7,{ELSCINT1}9B)","(0053,{GEHC_CT_ADVAPP_001}40)","(0053,{GEHC_CT_ADVAPP_001}41)","(0053,{GEHC_CT_ADVAPP_001}42)","(0053,{GEHC_CT_ADVAPP_001}43)","(7005,{TOSHIBA_MEC_CT3}0B)"]
horos_jpg2k.dcm
horos_evrle.dcm

Moore, Charlie

unread,
Mar 24, 2021, 12:53:15 PM3/24/21
to xnat_di...@googlegroups.com
Thank you; this is exactly the details I needed to see what's happening. Unfortunately, it seems to be a regression in XNAT 1.8, but what's really strange is that while the scripts you've been trying do break on 1.8 with compressed data, some scripts to manipulate private tags don't. You can see the full details in the ticket here: https://issues.xnat.org/browse/DE-44 . I can't think of any simple workarounds until we get this fixed. One thing that comes to mind is putting a CTP instance in front of XNAT to decompress the images before forwarding them onto XNAT.

Thanks,
Charlie

Sent: Wednesday, March 24, 2021 10:50 AM
To: xnat_discussion <xnat_di...@googlegroups.com>

akluiber

unread,
Mar 24, 2021, 2:07:00 PM3/24/21
to xnat_discussion
Well, hey, I'm happy to help uncover these sorts of things. We're only in a testing phase right now, so I can wait for a fix and in the meantime manage the workarounds like CTP in the middle or converting to EVRLE before sending.

Cheers!

DavidMaffitt

unread,
Mar 25, 2021, 12:03:35 AM3/25/21
to xnat_discussion
The move from XNAT 1.7.6 to 1.8.0 moved DicomEdit from 6.2 to 6.3. DE6.3 introduced the ability to edit pixels which means pixel-data attributes are now being read as well as the metadata attributes.  The 'retainPrivateTags' and 'removeAllPrivateTags' have to visit all tags, including sequence tags, in a way that deleting individual tags does not. Pixel-data attributes in compressed format have items like sequence attributes but aren't regular VR=SQ attributes.  The presence of pixel-data tags and then item tags in compressed pixel data hit a bug in handling sequence tags.
A fix is in the works.

Moore, Charlie

unread,
Mar 30, 2021, 3:24:38 PM3/30/21
to xnat_di...@googlegroups.com
As a follow-up, the issue with private tag anonymization failing for compressed images should be fixed when XNAT 1.8.1 is released, although there is another issue with the retainPrivateTags function to keep in mind: https://issues.xnat.org/browse/DE-45 .

Thanks,
Charlie

Sent: Wednesday, March 24, 2021 1:07 PM
Reply all
Reply to author
Forward
0 new messages