Examples/imagedata: Difference between revisions

From XdmfWeb
Jump to navigationJump to search
(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...")
 
mNo edit summary
 
Line 1: Line 1:
The following will read in an array of floats from h5 with the values associated with the points.
The following will read in an array of floats from h5 with the values associated with the points.
<code format="XML">


  <?xml version="1.0" ?>
  <?xml version="1.0" ?>
Line 10: Line 12:
         <DataItem Name="Origin" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
         <DataItem Name="Origin" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
                         0 0 0
                         0 0 0
                </DataItem>
        </DataItem>
         <DataItem Name="Spacing" Dimensions="3" NumberType="Float"
         <DataItem Name="Spacing" Dimensions="3" NumberType="Float" Precision="4" Format="XML">
                        Precision="4" Format="XML">
                         1 1 1
                         1 1 1
                </DataItem>
        </DataItem>
       </Geometry>
       </Geometry>
       <Attribute Name="second 0" AttributeType="Scalar" Center="Node">
       <Attribute Name="second 0" AttributeType="Scalar" Center="Node">
Line 22: Line 23:
   </Domain>
   </Domain>
  </Xdmf>
  </Xdmf>
</code>


The following will read in an array of floats from h5 with the values associated with the cells.
The following will read in an array of floats from h5 with the values associated with the cells.
<code format="XML">


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

Latest revision as of 14:35, 19 August 2014

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>