Examples/imagedata

From XdmfWeb
Revision as of 18:26, 19 August 2014 by Dave.demarle (talk | contribs) (Created page with "The following will read in an array of floats from h5 with the values associated with the points. <?xml version="1.0" ?> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []> <Xdmf xmlns:x...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The following will read in an array of floats from h5 with the values associated with the points.

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
  <Domain>
        <Grid Name="Particle Images" GridType="Uniform">
      <Topology TopologyType="3DCORECTMesh" Dimensions="400 300 300"/>
      <Geometry GeometryType="ORIGIN_DXDYDZ">
        <DataItem Name="Origin" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
                        0 0 0
                </DataItem>
        <DataItem Name="Spacing" Dimensions="3" NumberType="Float"
                        Precision="4" Format="XML">
                        1 1 1
                </DataItem>
      </Geometry>
      <Attribute Name="second 0" AttributeType="Scalar" Center="Node">
        <DataItem Format="HDF" NumberType="UInt" Precision="2" Dimensions="400 300 300">test.hdf:/images/0/image</DataItem>
      </Attribute>
    </Grid>
  </Domain>
</Xdmf>

The following will read in an array of floats from h5 with the values associated with the cells.

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
  <Domain>
        <Grid Name="Particle Images" GridType="Uniform">
      <Topology TopologyType="3DCORECTMesh" Dimensions="401 301 301"/>
      <Geometry GeometryType="ORIGIN_DXDYDZ">
        <DataItem Name="Origin" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
                        0 0 0
                </DataItem>
        <DataItem Name="Spacing" Dimensions="3" NumberType="Float"
                        Precision="4" Format="XML">
                        1 1 1
                </DataItem>
      </Geometry>
      <Attribute Name="second 0" AttributeType="Scalar" Center="Cell">
        <DataItem Format="HDF" NumberType="UInt" Precision="2" Dimensions="400 300 300">test.hdf:/images/0/image</DataItem>
      </Attribute>
    </Grid>
  </Domain>
</Xdmf>