<!-- =========================================================================

    proper (SIC PROPER Modeling Language)
    
    author: Martin Peng, Katrin Franke
    institution: Fraunhofer IPK
    version: 2.0
    created: 2002-11-18-00-00
    modified: 2003-02-23-00-00
    
 ============================================================================ -->
<!--begin of schema -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<!-- =========================================================================
	Definition of sicTypes :
  ==========================================================================	 -->
	<!-- sicByte [0...255]  -->
	<xsd:simpleType name="sicByte">
		<xsd:restriction base="xsd:integer">
			<xsd:minInclusive value="0"/>
			<xsd:maxInclusive value="255"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- end of sicByte -->
	<!-- sicAngle [0...360]  -->
	<xsd:simpleType name="sicAngle">
		<xsd:restriction base="xsd:decimal">
			<xsd:minInclusive value="0"/>
			<xsd:maxInclusive value="360"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- end of sicByte -->
	<!-- sicResolution [75 | 150 | 300 | 600 | 1200 ]  -->
	<xsd:simpleType name="sicResolution">
		<xsd:restriction base="xsd:integer">
			<xsd:enumeration value="75"/>
			<xsd:enumeration value="150"/>
			<xsd:enumeration value="300"/>
			<xsd:enumeration value="600"/>
			<xsd:enumeration value="1200"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- end of sicResolution -->
	<!-- sicColorModel [rgb | cymk | gray | bw ]  -->
	<xsd:simpleType name="sicColorModel">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="rgb"/>
			<xsd:enumeration value="cmyk"/>
			<xsd:enumeration value="gray"/>
			<xsd:enumeration value="bw"/>
		</xsd:restriction>
	</xsd:simpleType>
	<!-- end of sicColorModel -->
	<!-- scaleType  -->
	<xsd:complexType name="scaleType">
		<xsd:sequence>
			<xsd:element name="resolution" minOccurs="0">
				<xsd:complexType>
					<xsd:attribute name="dpi" type="sicResolution" default="300"/>
				</xsd:complexType>
			</xsd:element>
			<xsd:choice>
				<xsd:element name="bilinear" minOccurs="0"/>
				<xsd:element name="repeat" minOccurs="0"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
	<!-- end of scaleType -->
	<!-- rectType -->
	<xsd:complexType name="rectType">
		<xsd:choice>
			<xsd:element name="extension">
				<xsd:complexType>
					<xsd:attribute name="offset_x" type="sicByte" default="10"/>
					<xsd:attribute name="offset_y" type="sicByte" default="10"/>
					<xsd:attribute name="extension_x" type="sicByte" default="10"/>
					<xsd:attribute name="extension_y" type="sicByte" default="10"/>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="frame">
				<xsd:complexType>
					<xsd:attribute name="left" type="sicByte" default="10"/>
					<xsd:attribute name="top" type="sicByte" default="10"/>
					<xsd:attribute name="bottom" type="sicByte" default="10"/>
					<xsd:attribute name="right" type="sicByte" default="10"/>
				</xsd:complexType>
			</xsd:element>
		</xsd:choice>
	</xsd:complexType>
	<!-- rectType -->
	<!-- =========================================================================== 
	 SPML - SIC Proper Modelling Language                                        
      =========================================================================== -->
	<xsd:element name="proper">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="roi" minOccurs="0" maxOccurs="unbounded">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="vertex" minOccurs="0" maxOccurs="unbounded">
								<xsd:complexType>
									<xsd:attribute name="x" type="xsd:integer" use="required"/>
									<xsd:attribute name="y" type="xsd:integer" use="required"/>
								</xsd:complexType>
							</xsd:element>
						</xsd:sequence>
						<xsd:attribute name="id" type="xsd:integer" default="0"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="properParam" maxOccurs="unbounded">
					<xsd:complexType>
						<xsd:sequence>
							<xsd:element name="background">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="none" minOccurs="0"/>
										<xsd:element name="homogenous" minOccurs="0"/>
										<xsd:element name="textured" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="low" minOccurs="0">
														<xsd:complexType>
															<xsd:attribute name="value" type="sicByte" default="70"/>
														</xsd:complexType>
													</xsd:element>
													<xsd:element name="high" minOccurs="0">
														<xsd:complexType>
															<xsd:attribute name="value" type="sicByte" default="120"/>
														</xsd:complexType>
													</xsd:element>
													<xsd:element name="peaks" minOccurs="0">
														<xsd:complexType>
															<xsd:attribute name="value" type="sicByte"/>
														</xsd:complexType>
													</xsd:element>
													<xsd:element name="amount" minOccurs="0">
														<xsd:complexType>
															<xsd:attribute name="value" type="sicByte" default="3"/>
														</xsd:complexType>
													</xsd:element>
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="userdefined" minOccurs="0"/>
										<xsd:element name="formdropout" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="image"/>
													<xsd:element name="method"/>
													<xsd:element name="offset"/>
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="colordropout" minOccurs="0"/>
										<xsd:element name="colorconvert" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="channelcomp" minOccurs="0">
														<xsd:complexType>
															<xsd:sequence>
																<xsd:element name="image"/>
																<xsd:element name="method"/>
																<xsd:element name="offset"/>
															</xsd:sequence>
														</xsd:complexType>
													</xsd:element>
													<!--====================
														channelcomp
													
														Xxx ToDo xxX
											    		 ====================-->
													<!-- end of channelcomp -->
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<!--====================
											none 
									     ====================-->
										<!--====================
											homogenius (cleantype)
									     ================-->
										<!--====================
											textured (cleantype)
									     ====================-->
										<!-- end of textured -->
										<!--====================
												userdefined
												
												Xxx ToDo xxX
										     ====================-->
										<!--====================
												formdropout
												
												Xxx ToDo xxX
										     ====================-->
										<!-- end of formdropout -->
										<!--====================
												colordropout
												
												Xxx ToDo xxX
										     ====================-->
										<!--====================
												colorconvert
												
												Xxx ToDo xxX
										     ====================-->
										<!-- end of colorcovert -->
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="foreground" minOccurs="0">
								<xsd:complexType>
									<xsd:sequence>
										<xsd:element name="reconst" minOccurs="0"/>
										<xsd:element name="noise" minOccurs="0">
											<xsd:complexType>
												<xsd:attribute name="size" type="sicByte" default="35"/>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="line" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="direction" minOccurs="0">
														<xsd:complexType>
															<xsd:sequence>
																<xsd:element name="rows" minOccurs="0"/>
																<xsd:element name="columns" minOccurs="0"/>
																<xsd:element name="angle" minOccurs="0">
																	<xsd:complexType>
																		<xsd:attribute name="degree" type="sicAngle" use="required"/>
																	</xsd:complexType>
																</xsd:element>
															</xsd:sequence>
														</xsd:complexType>
													</xsd:element>
													<xsd:sequence>
														<xsd:choice minOccurs="0">
															<xsd:element name="average" minOccurs="0"/>
															<xsd:element name="trace" minOccurs="0">
																<xsd:complexType>
																	<xsd:attribute name="grayvariance" type="sicByte" default="10"/>
																	<xsd:attribute name="derivation" type="sicByte" default="9"/>
																	<xsd:attribute name="limit" type="sicByte" default="20"/>
																	<xsd:attribute name="threshold" type="xsd:decimal" default="0.6"/>
																</xsd:complexType>
															</xsd:element>
															<xsd:element name="morpho" minOccurs="0">
																<xsd:complexType>
																	<xsd:attribute name="se_horizontal" type="xsd:decimal" default="0.1"/>
																	<xsd:attribute name="se_vertical" type="xsd:decimal" default="10"/>
																	<xsd:attribute name="ze_horizontal" type="xsd:decimal" default="0.1"/>
																	<xsd:attribute name="ze_vertical" type="xsd:decimal" default="10"/>
																</xsd:complexType>
															</xsd:element>
															<xsd:element name="gabor" minOccurs="0"/>
															<!-- average -->
															<!-- trace -->
															<!-- morpho -->
															<!-- gabor -->
														</xsd:choice>
													</xsd:sequence>
													<!-- direction -->
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="stamp" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:choice>
														<xsd:element name="segment"/>
														<xsd:element name="contrast"/>
													</xsd:choice>
													<xsd:element name="noise">
														<xsd:complexType>
															<xsd:attribute name="size" type="sicByte" default="35"/>
														</xsd:complexType>
													</xsd:element>
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="framein" minOccurs="0">
											<xsd:complexType>
												<xsd:choice>
													<xsd:element name="share" minOccurs="0">
														<xsd:complexType>
															<xsd:attribute name="amount" type="xsd:decimal" default="0.1"/>
														</xsd:complexType>
													</xsd:element>
													<xsd:element name="rect" type="rectType" minOccurs="0"/>
												</xsd:choice>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="border" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="rect" type="rectType" minOccurs="0"/>
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<!-- ================= -->
										<!--        reconst    -->
										<!-- ================= -->
										<!-- =============== -->
										<!--        noise    -->
										<!-- =============== -->
										<!-- =============== -->
										<!--        line		    -->
										<!-- =============== -->
										<!-- end of line -->
										<!-- ================= -->
										<!--        stamp			-->
										<!-- ================= -->
										<!-- ================= -->
										<!--        framein			-->
										<!-- ================= -->
										<!-- end of framein -->
										<!-- ================= -->
										<!--        border    -->
										<!-- ================= -->
									</xsd:sequence>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="inout" minOccurs="0">
								<xsd:complexType>
									<xsd:choice>
										<xsd:element name="pre" minOccurs="0">
											<xsd:complexType>
												<xsd:sequence>
													<xsd:element name="scale" type="scaleType" minOccurs="0"/>
												</xsd:sequence>
											</xsd:complexType>
										</xsd:element>
										<xsd:element name="post" minOccurs="0">
											<xsd:complexType>
												<xsd:choice>
													<xsd:element name="scale" type="scaleType" minOccurs="0"/>
													<xsd:element name="colorout" minOccurs="0">
														<xsd:complexType>
															<xsd:choice>
																<xsd:element name="color" minOccurs="0">
																	<xsd:complexType>
																		<xsd:attribute name="model" type="sicColorModel" default="rgb"/>
																	</xsd:complexType>
																</xsd:element>
																<xsd:element name="pseudo" minOccurs="0"/>
															</xsd:choice>
														</xsd:complexType>
													</xsd:element>
												</xsd:choice>
											</xsd:complexType>
										</xsd:element>
									</xsd:choice>
								</xsd:complexType>
							</xsd:element>
							<xsd:element name="desc" minOccurs="0"/>
							<!--========================================================================= 
							background cleaning
    						     =========================================================================== -->
							<!-- end of background -->
							<!--=========================================================================-->
							<!--		foreground cleaning												      -->
							<!--=========================================================================== -->
							<!-- end of foreground -->
							<!-- ================== -->
							<!--       inout        -->
							<!-- ================== -->
							<!-- end of inout -->
							<!-- ================== -->
							<!--       desc        -->
							<!-- ================== -->
						</xsd:sequence>
						<xsd:attribute name="id" type="xsd:integer" default="0"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="meta" minOccurs="0">
					<xsd:complexType>
						<xsd:attribute name="author" default="anoymous"/>
						<xsd:attribute name="institution" default="anywhere"/>
						<xsd:attribute name="version" default="default"/>
						<xsd:attribute name="created" default="today"/>
						<xsd:attribute name="modified" default="never"/>
					</xsd:complexType>
				</xsd:element>
				<!-- end roi -->
				<!-- ==========================================================-->
				<!-- 		roi - region of interest										      -->
				<!--===========================================================-->
				<!--===========================================================
						proper - begin of properParamter
				    ==========================================================-->
				<!--end of properPram -->
				<!-- end of info -->
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<!--end of SPML -->
</xsd:schema>