|
@@ -1,146 +1,328 @@
|
|
|
<?xml version="1.0"?>
|
|
|
+
|
|
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
|
|
|
|
- <xsd:element name="executable">
|
|
|
- <xsd:complexType>
|
|
|
- <xsd:sequence>
|
|
|
- <xsd:element name="category" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="index" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="title" type="xsd:string" maxOccurs="1"/>
|
|
|
- <xsd:element name="description" type="xsd:string" maxOccurs="1"/>
|
|
|
- <xsd:element name="version" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="documentation-url" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="license" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="contributor" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="acknowledgements" type="xsd:string" minOccurs="0"/>
|
|
|
- <xsd:element name="parameters" type="parameters" maxOccurs="unbounded"/>
|
|
|
- </xsd:sequence>
|
|
|
- </xsd:complexType>
|
|
|
- </xsd:element>
|
|
|
-
|
|
|
- <xsd:complexType name="parameters">
|
|
|
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
|
|
|
- <xsd:element name="label" type="xsd:string"/>
|
|
|
- <xsd:element name="description" type="xsd:string"/>
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ EXECUTABLE
|
|
|
+ Root element
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:element name="executable">
|
|
|
+ <xsd:complexType>
|
|
|
+ <xsd:sequence>
|
|
|
+
|
|
|
+ <!-- 'title' and 'description' elements are required -->
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="category" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" name="title" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" name="description" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="version" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="documentation-url" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="license" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="contributor" type="xsd:string"/>
|
|
|
+ <xsd:element maxOccurs="1" minOccurs="0" name="acknowledgements" type="xsd:string"/>
|
|
|
+
|
|
|
+ <!-- Parameter group elements -->
|
|
|
+ <xsd:element maxOccurs="unbounded" name="parameters" type="parameters"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ PARAMETER GROUP
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="parameters">
|
|
|
+ <xsd:sequence>
|
|
|
+
|
|
|
+ <!-- Required elements for a parameter group -->
|
|
|
+ <xsd:element name="label" type="xsd:string"/>
|
|
|
+ <xsd:element name="description" type="xsd:string"/>
|
|
|
+
|
|
|
+ <!-- At least one parameter definition is required in the group -->
|
|
|
+ <xsd:choice maxOccurs="unbounded">
|
|
|
<xsd:element name="integer" type="scalarType"/>
|
|
|
- <xsd:element name="integer-vector" type="scalarType"/>
|
|
|
- <xsd:element name="boolean" type="scalarType"/>
|
|
|
- <xsd:element name="boolean-vector" type="scalarType"/>
|
|
|
+ <xsd:element name="integer-vector" type="scalarVectorType"/>
|
|
|
+ <xsd:element name="boolean" type="paramType"/>
|
|
|
<xsd:element name="float" type="scalarType"/>
|
|
|
- <xsd:element name="float-vector" type="scalarType"/>
|
|
|
+ <xsd:element name="float-vector" type="scalarVectorType"/>
|
|
|
<xsd:element name="double" type="scalarType"/>
|
|
|
- <xsd:element name="double-vector" type="scalarType"/>
|
|
|
- <xsd:element name="string" type="paramType"/>
|
|
|
+ <xsd:element name="double-vector" type="scalarVectorType"/>
|
|
|
+ <xsd:element name="string" type="multipleType"/>
|
|
|
<xsd:element name="string-vector" type="paramType"/>
|
|
|
<xsd:element name="point" type="pointType"/>
|
|
|
- <xsd:element name="point-vector" type="pointType"/>
|
|
|
<xsd:element name="region" type="pointType"/>
|
|
|
- <xsd:element name="region-vector" type="pointType"/>
|
|
|
<xsd:element name="string-enumeration" type="enumerationType"/>
|
|
|
<xsd:element name="integer-enumeration" type="enumerationType"/>
|
|
|
<xsd:element name="float-enumeration" type="enumerationType"/>
|
|
|
<xsd:element name="double-enumeration" type="enumerationType"/>
|
|
|
- <xsd:element name="file" type="indexedParamType"/>
|
|
|
- <xsd:element name="directory" type="paramType"/>
|
|
|
- <xsd:element name="transform" type="typedIndexParamType"/>
|
|
|
- <xsd:element name="image" type="typedIndexParamType"/>
|
|
|
- <xsd:element name="geometry" type="typedIndexParamType"/>
|
|
|
- <xsd:element name="table" type="typedIndexParamType"/>
|
|
|
- <xsd:element name="measurement" type="typedIndexParamType"/>
|
|
|
+ <xsd:element name="file" type="fileType"/>
|
|
|
+ <xsd:element name="directory" type="channelType"/>
|
|
|
+ <xsd:element name="image" type="imageType"/>
|
|
|
+ <xsd:element name="geometry" type="geometryType"/>
|
|
|
+ <!--
|
|
|
+ <xsd:element name="transform" type="transformType"/>
|
|
|
+ <xsd:element name="table" type="tableType"/>
|
|
|
+ <xsd:element name="measurement" type="measurementType"/>
|
|
|
+ -->
|
|
|
</xsd:choice>
|
|
|
- </xsd:complexType>
|
|
|
+
|
|
|
+ </xsd:sequence>
|
|
|
+
|
|
|
+ <!-- Parameter group attributes -->
|
|
|
+ <xsd:attribute default="false" name="advanced" type="xsd:boolean"/>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ PARAMETER
|
|
|
+ Defines common sub-elements and attributes.
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="paramType">
|
|
|
+ <xsd:sequence>
|
|
|
|
|
|
- <xsd:complexType name="paramType">
|
|
|
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
|
|
|
- <xsd:element name="name" type="xsd:string"/>
|
|
|
- <xsd:element name="flag" type="flagType" />
|
|
|
- <xsd:element name="longflag" type="flagType"/>
|
|
|
- <xsd:element name="description" type="xsd:string"/>
|
|
|
- <xsd:element name="label" type="xsd:string"/>
|
|
|
- <xsd:element name="default" type="xsd:string"/>
|
|
|
+ <xsd:element name="name">
|
|
|
+ <xsd:simpleType>
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="[_a-zA-Z][_a-zA-Z0-9]*"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+ </xsd:element>
|
|
|
+
|
|
|
+ <!-- either 'flag' or 'longflag' (or both) or 'index' are required -->
|
|
|
+ <xsd:choice>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element maxOccurs="1" name="flag" type="flagType"/>
|
|
|
+ <xsd:element minOccurs="0" maxOccurs="1" name="longflag" type="longFlagType"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ <xsd:element name="longflag" type="longFlagType"/>
|
|
|
+ <xsd:element name="index" type="xsd:nonNegativeInteger"/>
|
|
|
</xsd:choice>
|
|
|
- <xsd:attribute name="multiple" type="xsd:boolean"/>
|
|
|
- <xsd:attribute name="hidden" type="xsd:boolean"/>
|
|
|
- </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:element name="description" type="xsd:string"/>
|
|
|
+ <xsd:element name="label" type="xsd:string"/>
|
|
|
+ <xsd:element minOccurs="0" name="default" type="xsd:string"/>
|
|
|
+
|
|
|
+ </xsd:sequence>
|
|
|
|
|
|
- <xsd:complexType name="scalarType" >
|
|
|
- <xsd:complexContent>
|
|
|
- <xsd:extension base="paramType">
|
|
|
- <xsd:sequence>
|
|
|
- <xsd:element name="constraints" type="constraintsType" minOccurs="0" />
|
|
|
- </xsd:sequence>
|
|
|
- </xsd:extension>
|
|
|
- </xsd:complexContent>
|
|
|
- </xsd:complexType>
|
|
|
+ <!-- parameter attributes -->
|
|
|
+ <xsd:attribute default="false" name="hidden" type="xsd:boolean"/>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ SCALAR VECTOR
|
|
|
+ Extends paramType for vectors of integer, float, and double.
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="scalarVectorType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="paramType">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element minOccurs="0" name="constraints" type="constraintsType"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ MULTIPLE PARAMETER
|
|
|
+ Extends paramType for parameters which can appear multiple times on the command line.
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="multipleType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="paramType">
|
|
|
+ <xsd:attribute default="false" name="multiple" type="xsd:boolean"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ SCALAR PARAMETER
|
|
|
+ Extends multipleType for scalar parameters with constraints (integer, float, double).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="scalarType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="multipleType">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element minOccurs="0" name="constraints" type="constraintsType"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ ENUMERATION PARAMETER
|
|
|
+ Extends paramType for scalar and string enumeration parameters (integer, float, double, string).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="enumerationType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="paramType">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element maxOccurs="unbounded" name="element" type="xsd:string"/>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ POINT PARAMETER
|
|
|
+ Extends multipleType for parameters with point-like values (point and region).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="pointType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="multipleType">
|
|
|
+ <xsd:attribute name="coordinateSystem">
|
|
|
+ <xsd:simpleType>
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:enumeration value="ras"/>
|
|
|
+ <xsd:enumeration value="ijk"/>
|
|
|
+ <xsd:enumeration value="lps"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+ </xsd:attribute>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ GEOMETRY PARAMETER
|
|
|
+ Extends multipleType for geometry parameters (geometry).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="geometryType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="multipleType">
|
|
|
+ <xsd:attribute name="fileExtensions" type="xsd:string"/>
|
|
|
+ <xsd:attribute name="type">
|
|
|
+ <xsd:simpleType>
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:enumeration value="fiberbundle"/>
|
|
|
+ <xsd:enumeration value="model"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+ </xsd:attribute>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
|
|
|
- <xsd:complexType name="pointType" >
|
|
|
- <xsd:complexContent>
|
|
|
- <xsd:extension base="paramType">
|
|
|
- <xsd:attribute name="coordinateSystem">
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ CHANNEL PARAMETER
|
|
|
+ Extends multipleType for parameters with input/output semantics (directory, file, image).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="channelType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="multipleType">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element maxOccurs="1" name="channel">
|
|
|
<xsd:simpleType>
|
|
|
<xsd:restriction base="xsd:string">
|
|
|
- <xsd:enumeration value="RAS"/>
|
|
|
- <xsd:enumeration value="IJK"/>
|
|
|
+ <xsd:enumeration value="input"/>
|
|
|
+ <xsd:enumeration value="output"/>
|
|
|
</xsd:restriction>
|
|
|
</xsd:simpleType>
|
|
|
- </xsd:attribute>
|
|
|
- </xsd:extension>
|
|
|
- </xsd:complexContent>
|
|
|
- </xsd:complexType>
|
|
|
-
|
|
|
- <xsd:complexType name="enumerationType" >
|
|
|
- <xsd:complexContent>
|
|
|
- <xsd:extension base="paramType">
|
|
|
- <xsd:sequence>
|
|
|
- <xsd:element name="element" type="xsd:string"/>
|
|
|
- </xsd:sequence>
|
|
|
- </xsd:extension>
|
|
|
- </xsd:complexContent>
|
|
|
- </xsd:complexType>
|
|
|
+ </xsd:element>
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ FILE PARAMETER
|
|
|
+ Extends channelType for parameters with input/output semantics and file extension
|
|
|
+ information (file, image).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="fileType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="channelType">
|
|
|
+ <xsd:attribute name="fileExtensions" type="xsd:string"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
|
|
|
- <xsd:complexType name="indexedParamType" >
|
|
|
- <xsd:all>
|
|
|
- <xsd:element name="name" type="xsd:string"/>
|
|
|
- <xsd:element name="label" type="xsd:string"/>
|
|
|
- <xsd:element name="description" type="xsd:string"/>
|
|
|
- <xsd:element name="channel" maxOccurs="1">
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ IMAGE PARAMETER
|
|
|
+ Extends fileType for image parameters (image).
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+ <xsd:complexType name="imageType">
|
|
|
+ <xsd:complexContent>
|
|
|
+ <xsd:extension base="fileType">
|
|
|
+ <xsd:attribute name="type">
|
|
|
<xsd:simpleType>
|
|
|
<xsd:restriction base="xsd:string">
|
|
|
- <xsd:enumeration value="input"/>
|
|
|
- <xsd:enumeration value="output"/>
|
|
|
+ <xsd:enumeration value="scalar"/>
|
|
|
+ <xsd:enumeration value="label"/>
|
|
|
+ <xsd:enumeration value="tensor"/>
|
|
|
+ <xsd:enumeration value="diffusion-weighted"/>
|
|
|
+ <xsd:enumeration value="vector"/>
|
|
|
+ <xsd:enumeration value="model"/>
|
|
|
</xsd:restriction>
|
|
|
</xsd:simpleType>
|
|
|
- </xsd:element>
|
|
|
- <xsd:element name="index" type="xsd:nonNegativeInteger"/>
|
|
|
- </xsd:all>
|
|
|
- <xsd:attribute name="fileExtensions" type="xsd:string"/>
|
|
|
- </xsd:complexType>
|
|
|
+ </xsd:attribute>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:complexContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ ===================================================================
|
|
|
+ ***** UTILITY TYPES *****
|
|
|
+ ===================================================================
|
|
|
+ -->
|
|
|
+
|
|
|
+ <xsd:simpleType name="flagValueType">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="-?[a-zA-Z]"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
|
|
|
- <xsd:complexType name="typedIndexParamType" >
|
|
|
- <xsd:complexContent>
|
|
|
- <xsd:extension base="indexedParamType">
|
|
|
- <xsd:attribute name="reference" type="xsd:string"/>
|
|
|
- <xsd:attribute name="type" type="xsd:string"/>
|
|
|
- <xsd:attribute name="hidden" type="xsd:boolean"/>
|
|
|
- </xsd:extension>
|
|
|
- </xsd:complexContent>
|
|
|
- </xsd:complexType>
|
|
|
-
|
|
|
- <xsd:complexType name="flagType">
|
|
|
- <xsd:simpleContent>
|
|
|
- <xsd:extension base="xsd:string">
|
|
|
- <xsd:attribute name="alias" type="xsd:string"/>
|
|
|
- <xsd:attribute name="deprecatedalias" type="xsd:string"/>
|
|
|
- </xsd:extension>
|
|
|
- </xsd:simpleContent>
|
|
|
- </xsd:complexType>
|
|
|
-
|
|
|
- <xsd:complexType name="constraintsType">
|
|
|
- <xsd:sequence>
|
|
|
- <xsd:element name="minimum" type="xsd:double"/>
|
|
|
- <xsd:element name="maximum" type="xsd:double"/>
|
|
|
- <xsd:element name="step" type="xsd:double"/>
|
|
|
- </xsd:sequence>
|
|
|
- </xsd:complexType>
|
|
|
+ <xsd:complexType name="flagType">
|
|
|
+ <xsd:simpleContent>
|
|
|
+ <xsd:extension base="flagValueType">
|
|
|
+ <xsd:attribute name="alias" type="xsd:string"/>
|
|
|
+ <xsd:attribute name="deprecatedalias" type="xsd:string"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:simpleContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="longFlagValueType">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="-?-?[_a-zA-Z][_a-zA-Z0-9]*"/>
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:complexType name="longFlagType">
|
|
|
+ <xsd:simpleContent>
|
|
|
+ <xsd:extension base="longFlagValueType">
|
|
|
+ <xsd:attribute name="alias" type="xsd:string"/>
|
|
|
+ <xsd:attribute name="deprecatedalias" type="xsd:string"/>
|
|
|
+ </xsd:extension>
|
|
|
+ </xsd:simpleContent>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <!-- constraints for scalar parameters (integer, double, float) -->
|
|
|
+ <xsd:complexType name="constraintsType">
|
|
|
+ <xsd:all>
|
|
|
+ <xsd:element minOccurs="0" name="minimum" type="xsd:double"/>
|
|
|
+ <xsd:element minOccurs="0" name="maximum" type="xsd:double"/>
|
|
|
+ <xsd:element name="step" type="xsd:double"/>
|
|
|
+ </xsd:all>
|
|
|
+ </xsd:complexType>
|
|
|
|
|
|
</xsd:schema>
|