[Paraview] [Xdmf] How to write "voxel" or "image" data xdmf file.

Michael Jackson mike.jackson at bluequartz.net
Mon Feb 4 16:54:41 EST 2013


I have this:

<?xml version="1.0" ?>
<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
<Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
 <Information Name="DREAM3D Data File for Small IN100" Value="0"/>
 <Domain>
   <Grid Name="Structured Grid" GridType="Uniform">
<Topology TopologyType="3DCoRectMesh" Dimensions="117 201 189"/>
     <Geometry GeometryType="ORIGIN_DXDYDZ">
       <DataItem Dimensions="3 " NumberType="Float" Precision="4" Format="XML">
          0 0 0
       </DataItem>
       <DataItem Dimensions="3 " NumberType="Float" Precision="4" Format="XML">
        0.25 0.25 0.25
       </DataItem>
     </Geometry>
     <Attribute Name="GrainIds" AttributeType="Scalar" Center="Cell">
       <DataItem Dimensions="117 201 189 " NumberType="Int" Precision="4" Format="HDF">
       Small_IN100.dream3d:/VoxelDataContainer/CELL_DATA/GrainIds
       </DataItem>
     </Attribute>
   </Grid>
 </Domain>
</Xdmf>

But I get an "Can't read attribute data" error from ParaView.
--
Mike Jackson <www.bluequartz.net>

On Feb 4, 2013, at 11:24 AM, Jason Fleming <jason.fleming at seahorsecoastal.com> wrote:

> Hello Mike
> 
> I've developed some XDMF routines for ADCIRC, a finite element coastal
> ocean model. Its been a struggle, but ultimately successful. The XDMF
> technology is valuable, but somehow the community around it seems ...
> scarce. 
> 
> Anyway, I had a look at your xml, and my first guess is that you have
> placed the dimensions for your Topology element in the NumberOfElements
> attribute, instead of the Dimensions attribute ... maybe try 
> 
> <Topology TopologyType="3DCoRectMesh" Dimensions="117 201 189"/>
> 
> instead of
> 
> <Topology TopologyType="3DCORECTMesh" NumberOfElements="117 201 189 "/>
> 
> Cheers
> Jason
> 
> 
> On Mon, 2013-02-04 at 10:33 -0500, Michael Jackson wrote:
>> I have an HDF5 file that stores data on a regular voxelized grid. I have the origin, dimensions and grid deltas for each of the axis store in the file along side my data. I have tried a few different xdmf files but ParaView 3.14.1 seems to just crash or fails to read the "Attribute" data. I think it may be a "dimension" issue but there seems to be a real lack of XDMF examples on the internet to draw from.
>> 
>> This is what I have so far.
>> <?xml version="1.0" ?>
>> <!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" []>
>> <Xdmf xmlns:xi="http://www.w3.org/2003/XInclude" Version="2.2">
>> <Information Name="DREAM3D Data File for Small IN100" Value="0"/>
>> <Domain>
>>   <Grid Name="Structured Grid" GridType="Uniform">
>>     <Topology TopologyType="3DCORECTMesh" NumberOfElements="117 201 189 "/>
>>     <Geometry GeometryType="ORIGIN_DXDYDZ">
>>       <DataItem Dimensions="3 " NumberType="Float" Precision="4" Format="XML">
>>          0 0 0
>>       </DataItem>
>>       <DataItem Dimensions="3 " NumberType="Float" Precision="4" Format="XML">
>>        0.25 0.25 0.25
>>       </DataItem>
>>     </Geometry>
>>     <Attribute Name="GrainIds" AttributeType="Scalar" Center="Cell">
>>       <DataItem Dimensions="4444713" NumberType="Int" Precision="4" Format="HDF">
>>       Small_IN100.dream3d:/VoxelDataContainer/CELL_DATA/GrainIds
>>       </DataItem>
>>     </Attribute>
>>   </Grid>
>> </Domain>
>> </Xdmf>
>> 
>> With the above the xdmf file can be read into paraview but all I get is the outline. If I attempt to display as "Surface" then I get a crash from paraview inside the vtkTupleArray() class trying to access the data. For the "DataItem" the data is actually stored in a 1D array in the HDF5 file BUT the data is really for a 3D volume of (KJI) 117 201 189. If I place those values for the "Dimensions"  in the "DataItem" then ParaView says it can not read the attribute data.
>> 
>> Does anyone have any thoughts on what might be going on?
>> ___________________________________________________________
>> Mike Jackson                    Principal Software Engineer
>> BlueQuartz Software                            Dayton, Ohio
>> mike.jackson at bluequartz.net              www.bluequartz.net
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
> 
> -- 
> Dr. Jason G. Fleming
> Chief Engineer, Seahorse Coastal Consulting
> 3103 Mandy Ln
> Morehead City, NC 28557
> Tel: (252) 726-6323
> Mobile: (252) 269-0962
> Web: http://www.seahorsecoastal.com
> 
> 
> 
> _______________________________________________
> Xdmf mailing list
> Xdmf at lists.kitware.com
> http://www.kitware.com/cgi-bin/mailman/listinfo/xdmf



More information about the ParaView mailing list