[x3d-public] considering general conversion of metadata

Don Brutzman brutzman at nps.edu
Thu Apr 6 09:09:33 PDT 2017


Have been working through and interesting example from NIH 3D Print Exchange (3DPX).

Background information on model testing and conversion efforts :

On 4/3/2017 8:16 PM, Don Brutzman wrote:
> The Caffeine example seemed a good place to start... 8)  I've captured and adapted it, with meta tags for links, at
>
> http://x3dgraphics.com/examples/X3dForAdvancedModeling/AdditiveManufacturing/CaffeinePubChem2519SticksColorIndex.html
>
> Your X3D conversion is pretty clean!  Still some things to fix, perhaps most for chimera.  Modifications log of changes is attached and maintained at
>
> http://x3dgraphics.com/examples/X3dForAdvancedModeling/AdditiveManufacturing/CaffeinePubChem2519Modifications.txt
[...]
>     https://3dprint.nih.gov/discover/3dpx-001005

Excerpt showing conversion of arbitrary metadata into strictly typed X3D Metadata nodes:

<WorldInfo DEF='ModelMetadata' title='CaffeinePubChem2519SticksColor.x3d'>
   <!-- xmlns:chimera='http://www.cgl.ucsf.edu/chimera' -->
   <!-- <chimera:WindowSize xmlns:chimera="http://www.cgl.ucsf.edu/chimera/" height='512' width='512' /> -->
   <!-- <chimera:DepthCue xmlns:chimera="http://www.cgl.ucsf.edu/chimera/" color='1 1 1' range='35.2169 40.437' /> -->
   <MetadataSet name='xmlns:chimera' reference='http://www.cgl.ucsf.edu/chimera'>
     <MetadataString containerField='value' name='comment' value='"X3D profile limits on number of elements/colors/etc. were ignored"'/>
     <MetadataSet containerField='value' name='chimera:WindowSize'>
       <MetadataInteger containerField='value' name='height' value='512'/>
       <MetadataInteger containerField='value' name='width' value='512'/>
     </MetadataSet>
     <MetadataSet containerField='value' name='chimera:DepthCue'>
       <MetadataFloat containerField='value' name='color' value='1 1 1'/>
       <MetadataFloat containerField='value' name='range' value='35.2169 40.437'/>
     </MetadataSet>
   </MetadataSet>
</WorldInfo>

This example is really encouraging  because the approach is quite general, and we might predictably map to any namespace-based metadata.

Current issues and potential improvements:

a. Metadata name attribute.  Currently validating as NMTOKEN which may be overly strict since a variety of other rules apply in other metadata vocabularies.

b. containerField="value" is awfully verbose.  Might we flip this around by changing the default containerField value?  This would change some existing content, but not by much, and this is a tricky business in any case so checking is always needed.  Might make sense to set up for the most common long-term case.

As noted a few times before, Metadata design issues are shared by CAD Heritage and Medical groups.  So getting a general technique is valuable and important.

Further observations and insights welcome.

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list