-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdicom2text.xml
More file actions
72 lines (66 loc) · 2.44 KB
/
dicom2text.xml
File metadata and controls
72 lines (66 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<tool id="highdicom_dicom2text" name="Export DICOM metadata" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.01">
<expand macro="description"/>
<macros>
<import>macros.xml</import>
<import>creators.xml</import>
</macros>
<creator>
<expand macro="creators/bmcv"/>
<expand macro="creators/kostrykin"/>
</creator>
<edam_operations>
<edam_operation>operation_3443</edam_operation>
</edam_operations>
<expand macro="xrefs"/>
<expand macro="requirements"/>
<command><![CDATA[
python '$__tool_directory__/dicom2text.py'
'$input'
#if $export_to == "json"
./output.json
#elif $export_to == "yaml"
./output.yaml
#end if
]]>
</command>
<inputs>
<param name="input" type="data" format="dicom" label="DICOM dataset"/>
<param name="export_to" type="select" label="Export to">
<option value="json" selected="true">JSON</option>
<option value="yaml">YAML</option>
</param>
</inputs>
<outputs>
<data format="json" name="output_json" from_work_dir="output.json" label="${tool.name} on ${on_string} (JSON)">
<filter>export_to == 'json'</filter>
</data>
<data format="yaml" name="output_yaml" from_work_dir="output.yaml" label="${tool.name} on ${on_string} (YAML)">
<filter>export_to == 'yaml'</filter>
</data>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="input" value="highdicom/ct_image.dcm"/>
<param name="export_to" value="json"/>
<output name="output_json" ftype="json">
<assert_contents>
<has_json_property_with_value property="00080080" value='{"vr": "LO", "Value": ["JFK IMAGING CENTER"]}'/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<param name="input" value="highdicom/sm_image.dcm"/>
<param name="export_to" value="yaml"/>
<output name="output_yaml" ftype="yaml">
<assert_contents>
<has_text_matching expression="00080104:\n +Value:\n +- Brightfield illumination\n"/>
</assert_contents>
</output>
</test>
</tests>
<help>
**Exports the metadata of a DICOM dataset as JSON or YAML.**
@DICOM_INTRO@
</help>
<expand macro="citations"/>
</tool>