diff --git a/src/doc/index.rst b/src/doc/index.rst index d834178f93d3888c81e2671e419617168dd2e64a..ca6faa20032756da4dcc4219bd8aa47ba9129ac9 100644 --- a/src/doc/index.rst +++ b/src/doc/index.rst @@ -267,3 +267,39 @@ to the variables like: type: DictTextElement match_value: (?P<description>.*) match_name: description + + +Scopes +======== + +Example: + +.. code-block:: yaml + DicomFile: + type: SimpleDicomFile + match: (?P<filename>.*)\.dicom + records: + DicomRecord: + name: $filename + subtree: # header of dicom file + PatientID: + type: DicomHeaderElement + match_name: PatientName + match_value: (?P<patient>.*) + records: + Patient: + name: $patient + dicom_name: $filename # $filename is in same scope! + ExperimentFile: + type: MarkdownFile + match: ^readme.md$ + records: + Experiment: + dicom_name: $filename # does NOT work, because $filename is out of scope! + + +# can variables be used within regexp? + + +File Objects +============