Rename

Class: NodeStructRenamer

Node Icon

Rename structures according to a set of rules defined by the user. Supports export and import of predefined sets of renaming rules. You can also use dictionaries of acceptable names to harmonize structure naming. Predefined naming rules can be supplied in a .txt or .dsv file the following format (the delimiter can be changed during the import):

PATTERN;NEW NAME;CONDITION;CASE SENSITIVE

where PATTERN is the character combination used to identify the structure from its original name and NEW NAME is the name that will be assigned to the structures that match the rule. CONDITION defines the condition that must be fulfilled when the pattern is compared to the old name which can be Contains; DoesNotContain; Equals; NotEqual; Regex. Most of these are self explanatory, while the term regex might not be familiar to all. It's short for regular expression, and is a sequence of characters that define a search pattern. To learn more on how to write regular expressions, this article on Wikipedia can be helpful. CASE SENSITIVE can be True;False and of course determines if the comparison between the pattern and the original name should be case sensitive.

A naming convention or dictionary is simply a .txt file in the format StructureName;Description which is located in the MICE Toolkit program catalog under ...\External\Structure Naming Conventions. To add user defined naming conventions, copy the .txt file containing your naming convention to this path. The swedish naming convention published by the Swedish Radiation Safety Authority is supplied by default.

Example workflows

Inputs

In

The renamed struct collection.

Type: RTStructCollection, Required, Single

Outputs

Out

Resulting RTStruct collection.

Type: RTStructCollection

Settings

Renaming Rules Text

A list of rules to apply when renaming structures, the list is evaluated from top to bottom and the first matching rule will be applied.

Default Action Selection

This is the default action that will be applied if no rules on the list matches the structure.

Values: Keep, Rename, Discard, Stop

Default Name Text

If the default action is ‘Rename’ this is the name that non matching structures will be renamed to. Use $n to insert old structure name and $c to insert duplicate name counter.

Keywords: rename, struct, rtstruct, dicom