Difference between revisions of "2011 Winter Project Week:SEMXMLSchema"

From NAMIC Wiki
Jump to: navigation, search
 
(12 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
<gallery>
 
<gallery>
 
Image:PW-SLC2011.png|[[2011_Winter_Project_Week#Projects|Projects List]]
 
Image:PW-SLC2011.png|[[2011_Winter_Project_Week#Projects|Projects List]]
 +
Image:SEM_snippet.png‎
 +
<pre>hello</pre>|XML
 
</gallery>
 
</gallery>
  
Line 34: Line 36:
  
 
<h3>Progress</h3>
 
<h3>Progress</h3>
 +
An XML schema has already been written part of CTK (unofficial yet):
 +
[https://github.com/finetjul/CTK/blob/Module/Plugins/org.commontk.slicermodule/Resources/Xml/slicerModuleDescription.xsd slicerModuleDescription.xsd]
 +
* Issues with initial schema
 +
** Image, Geometry, Transform do not have to be '''index''' parameters
 +
** ParamType, IndexParamType, TypedIndexParamType probably need clearer names
 +
** Index parameters do not have to be files and hence do not need always have fileExtensions attribute
 +
* Perl script to validate XML using LibXML
 +
* Issues against current CLI's XML
 +
** xxx
  
 
</div>
 
</div>
 
</div>
 
</div>
 +
 +
 +
<div style="width: 97%; float: left;">
 +
 +
== Current Parser ==
 +
 +
{|
 +
| || hidden||reference||fileExtension||type||coordinateSystem||multiple||aggregate
 +
|-
 +
|boolean||.||.||.||.||.||x||.||
 +
|-
 +
|integer||.||.||.||.||.||x||.||
 +
|-
 +
|float||.||.||.||.||.||x||.||
 +
|-
 +
|double||.||.||.||.||.||x||.||
 +
|-
 +
|string||.||.||.||.||.||x||.||
 +
|-
 +
|image||x||x||x||x||.||x||.||
 +
|-
 +
|geometry||.||.||x||x||.||x||x||
 +
|-
 +
|transform||.||x||x||x||.||x||.||
 +
|-
 +
|table||x||x||x||x||.||x||.||
 +
|-
 +
|measurement||x||x||x||x||.||x||.||
 +
|-
 +
|file||.||.||x||.||.||x||.||
 +
|-
 +
|directory||.||.||.||.||.||x||.||
 +
|-
 +
|point||.||.||.||.||x||x||.||
 +
|-
 +
|region||.||.||.||.||x||x||.||
 +
|-
 +
|}
 +
 +
All other parameters (integer-vector, float-vector, double-vector, string-vector, integer-enumeration, float-enumeration, double-enumeration, string-enumeration) have no attributes currently
 +
 +
</div>
 +
 +
<div style="width: 97%; float: left;">
 +
== Current XML against initial schema==
 +
 +
xxx
 +
 +
xxx
 +
 +
</div>
 +
  
 
<!--<div style="width: 97%; float: left;">
 
<!--<div style="width: 97%; float: left;">

Latest revision as of 21:46, 11 January 2011

Home < 2011 Winter Project Week:SEMXMLSchema

Key Investigators

  • UIowa: Hans Johnson
  • GE: Jim Miller
  • Tim Olsen

Objective

Create a formal schema for the SEM xml so that eternal tools (i.e. nipype) can validate the xml

Approach, Plan

Define what should be valid SEM XML. The current SEM parser and Slicer CommandLineModule may currently only support a subset of the ultimate specification.

  • Use XML tools to grok a schema from current SEM XML files.
  • Use this schema as a guide to identify what the SEM schema should be
  • Check schema against Slicer CommandLineModule gui/logic. Attributes like reference, multiple, type should be generalized where it makes sense.
  • Update the SEM XML parser
  • Update the CommandLineModule in Slicer

Progress

An XML schema has already been written part of CTK (unofficial yet): slicerModuleDescription.xsd

  • Issues with initial schema
    • Image, Geometry, Transform do not have to be index parameters
    • ParamType, IndexParamType, TypedIndexParamType probably need clearer names
    • Index parameters do not have to be files and hence do not need always have fileExtensions attribute
  • Perl script to validate XML using LibXML
  • Issues against current CLI's XML
    • xxx


Current Parser

hidden reference fileExtension type coordinateSystem multiple aggregate
boolean . . . . . x .
integer . . . . . x .
float . . . . . x .
double . . . . . x .
string . . . . . x .
image x x x x . x .
geometry . . x x . x x
transform . x x x . x .
table x x x x . x .
measurement x x x x . x .
file . . x . . x .
directory . . . . . x .
point . . . . x x .
region . . . . x x .

All other parameters (integer-vector, float-vector, double-vector, string-vector, integer-enumeration, float-enumeration, double-enumeration, string-enumeration) have no attributes currently

Current XML against initial schema

xxx

xxx