XNAT 1 7 Dicom Edit 4 Dicom Edit

  • Slides: 14
Download presentation
XNAT 1. 7 Dicom. Edit 4, Dicom. Edit 6, and Mizer 18 October, 2017

XNAT 1. 7 Dicom. Edit 4, Dicom. Edit 6, and Mizer 18 October, 2017

Dicom. Edit 4 & 6 • • • A software library that transforms DICOM

Dicom. Edit 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 Dicom. Edit Scripts can be general purpose, providing a general anonymization, or customized to handle unique requirements posed by a specific project or data source.

Mizer and Dicom. Edit frameworks • Dicom. Edit 6 is very similar to Dicom.

Mizer and Dicom. Edit frameworks • Dicom. Edit 6 is very similar to Dicom. Edit 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

Dicom. Edit 6 basics • The following slides show some of the basics of

Dicom. Edit 6 basics • The following slides show some of the basics of the Dicom. Edit 6 language.

Statements • Comment // All after the slashes is ignored. • Assignment (0010, 0010)

Statements • Comment // All after the slashes is ignored. • Assignment (0010, 0010) : = “My Patient Name” • Deletion - (0010, 1030) // delete Patient Weight

Statements (continued) • Conditionals // mirror Java’s ternary if-then-else operator (0020, 0011) = "1"

Statements (continued) • Conditionals // mirror Java’s ternary if-then-else operator (0020, 0011) = "1" ? (0008, 103 E) : = "Series One" : “Default Series Descrip” // match regular expressions (0020, 0011) ~ “[1 -5]” ? – (0080, 103 E) • Conditional Operators ‘=‘ equal ‘!=‘ not equal ‘~’ matches ‘!~’ not matches

Elements • String literals, delimited by quotes “Desmond^Jones” • Identifiers patient. Name : =

Elements • String literals, delimited by quotes “Desmond^Jones” • Identifiers patient. Name : = “Molly^Jones” // variable names remove. All. Private. Tags // single word operations patient. Name : = 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

Tagpaths • Simple Tag (0010, 0010) // Patient Name Attribute • Tag Wildcards –

Tagpaths • Simple Tag (0010, 0010) // Patient Name Attribute • Tag Wildcards – ‘X’ matches any hex digit, ‘@’ even, and ‘#’ odd (50 X@, 3000) // matches all 3000 elements in the even groups between 5000 and 50 FE (Curve Data)

Tagpaths: Sequence • Simple Sequence Tagpath // match the coding scheme name in the

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 + / (0010) // address patient name at least one level deep

Tagpaths: Private Tags • Private data elements do not have unique tags • Their

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}0 C) correctly addresses the Diffusion b-value attribute regardless of where it is mapped in any particular object.

How To: Remove all private tags // remove all private tags – this is

How To: Remove all private tags // remove all private tags – this is a common requirement // Why make it hard? remove. All. Private. Tags

How To: White list certain private tags // record white listed to variables Diffusion-b-value

How To: White list certain private tags // record white listed to variables Diffusion-b-value : = (0019, {SIEMENS MR HEADER}09) // remove all private tags remove. All. Private. Tags Dicom. Edit How To: White list certain private tags // restore the variables (0019, {SIEMENS MR HEADER}09) : = Diffusion-b-value

How To: Remove a tag nested in a sequence // retain patient name at

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)

Explore further • • • Built-in functions Custom functions Externally injected variables Home page:

Explore further • • • Built-in functions Custom functions Externally injected variables Home page: https: //wiki. xnat. org/xnat-tools/dicomedit Language Reference: https: //wiki. xnat. org/xnat-tools/dicomedit-6 -1 -languagereference