Download presentation
Presentation is loading. Please wait.
1
XNAT 1.7 DicomEdit 4, DicomEdit 6, and Mizer
18 October, 2017
2
DicomEdit 4 & 6 A software library that transforms DICOM objects based on a scripted list of commands Scripts are written by users in a small custom language defined by DicomEdit Scripts can be general purpose, providing a general anonymization, or customized to handle unique requirements posed by a specific project or data source.
3
Mizer and DicomEdit frameworks
DicomEdit 6 is very similar to DicomEdit 4, but with some notable differences: Requires version declaration: version "6.1" Handles sequences and private tags, including function to remove all private tags Some changes in core syntax Both are supported in 1.7 Programmatically the implementation is abstracted through the Mizer service
4
DicomEdit 6 basics The following slides show some of the basics of the DicomEdit 6 language.
5
Statements Comment Assignment Deletion
// All after the slashes is ignored. Assignment (0010,0010) := “My Patient Name” Deletion - (0010,1030) // delete Patient Weight
6
Statements (continued)
Conditionals // mirror Java’s ternary if-then-else operator (0020,0011) = "1" ? (0008,103E) := "Series One" : “Default Series Descrip” // match regular expressions (0020,0011) ~ “[1-5]” ? – (0080,103E) Conditional Operators ‘=‘ equal ‘!=‘ not equal ‘~’ matches ‘!~’ not matches
7
String literals, delimited by quotes Identifiers
Elements String literals, delimited by quotes “Desmond^Jones” Identifiers patientName := “Molly^Jones” // variable names removeAllPrivateTags // single word operations patientName := concatenate[(0010,0020), (0010,0030)] Tagpath Represents a DICOM attribute or a set of attributes May represent a location or the value at that location
8
Tagpaths Simple Tag Tag Wildcards
(0010,0010) // Patient Name Attribute Tag Wildcards ‘X’ matches any hex digit, even, and ‘#’ odd // matches all 3000 elements in the even groups between 5000 and 50FE (Curve Data)
9
Simple Sequence Tagpath
Tagpaths: Sequence Simple Sequence Tagpath // match the coding scheme name in the first item in the coding scheme identification sequence. (0008,0110)[0](0008,0115) Sequence Wildcards [* ? +] DICOM elements can be nested arbitrarily deep. * / (0010,0010) // address patient name anywhere it appears + / ( ) // address patient name at least one level deep
10
Tagpaths: Private Tags
Private data elements do not have unique tags Their unique location within a particular object is determined by its ‘private creator id’ tag. (0019,{SIEMENS MR HEADER}0C) correctly addresses the Diffusion b-value attribute regardless of where it is mapped in any particular object.
11
How To: Remove all private tags
// remove all private tags – this is a common requirement // Why make it hard? removeAllPrivateTags
12
How To: White list certain private tags
// record white listed to variables Diffusion-b-value := (0019,{SIEMENS MR HEADER}09) // remove all private tags removeAllPrivateTags // restore the variables (0019,{SIEMENS MR HEADER}09) := Diffusion-b-value DicomEdit How To: White list certain private tags
13
How To: Remove a tag nested in a sequence
// retain patient name at the top level but remove it from sequences in which it is embedded - + / (0010, 0010)
14
Explore further Built-in functions Custom functions Externally injected variables Home page: Language Reference:
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.