Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
I finally got it to work, at least for Scalar values. The Dimensions in the topology section need to be 1 more than in the DataItem section because the Xdmf reader is creating a Rectilinear Grid and not ImageData. So once I finally figured that out then I could load up some of my scalar values. 2 Step forward. I then tried to load up a Vector data set, i.e., at set that has 3 component array at each Cell Center. This failed with various error messages also so I guess I'll try the process of elimination again for that today. It would be really helpful if there were more xdmc examples on their web page. Promising technology. Just needs some more documentation. Grid Name=Block 1 GridType=Uniform Topology TopologyType=3DCoRectMesh Dimensions=118 202 190/Topology Geometry Type=ORIGIN_DXDYDZ !-- Origin -- DataItem Format=XML Dimensions=30.0 0.0 0.0/DataItem !-- DxDyDz -- DataItem Format=XML Dimensions=30.25 0.25 0.25/DataItem /Geometry Attribute Name=GrainIds AttributeType=Scalar Center=Cell DataItem Format=HDF Dimensions=117 201 189 NumberType=Int Precision=4Small_IN100.dream3d:/VoxelDataContainer/CELL_DATA/GrainIds/DataItem /Attribute Attribute Name=EulerAngles AttributeType=Vector Center=Cell DataItem Format=HDF Dimensions=117 201 189 NumberType=Float Precision=4Small_IN100.dream3d:/VoxelDataContainer/CELL_DATA/EulerAngles/DataItem /Attribute /Grid -- Mike Jackson www.bluequartz.net On Feb 4, 2013, at 11:29 PM, Jason Fleming jason.flem...@seahorsecoastal.com wrote: I'm looking at an XDMF xml file that I generated that works with Paraview (although for a 2D unstructured mesh). In the Topology element, I've set the NumberOfElements attribute ... I wonder if the XDMF reader needs that value to set up the loop to load the attribute data ... maybe try setting NumberOfElements in your Topology element instead of Dimensions? I wouldn't think that interlacing the values into a 1D array would cause problems ... thats what they do in the xml examples at least. Cheers Jason On Mon, 2013-02-04 at 17:37 -0500, Michael Jackson wrote: I was wondering that myself as the data inside the HDf5 file is actually encoded as a 1D array of 32 bit integers but in the xdmc file I am telling the XDMF reader that the data is 3D. Wonder if that matters? I have tried both ways and either get a read error or a ParaView crash. -- Mike Jackson www.bluequartz.net On Feb 4, 2013, at 5:30 PM, Jason Fleming jason.flem...@seahorsecoastal.com wrote: Hello Mike I'm not sure what the issue is ... I'm assuming the hdf5 file containing the attribute data is in the same dir and the internal path is correct etc ... it all depends on how picky the XDMF reader is ... for example the number type for your Xdmf Attribute is Int but the Precision attribute is set to 4 ... I wonder if that matters to the reader. Cheers Jason On Mon, 2013-02-04 at 16:54 -0500, Michael Jackson wrote: 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.flem...@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
Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
On 05.02.2013 13:27, Michael Jackson wrote: I finally got it to work, at least for Scalar values. The Dimensions in the topology section need to be 1 more than in the DataItem section because the Xdmf reader is creating a Rectilinear Grid and not ImageData. So once I finally figured that out then I could load up some of my scalar values. 2 Step forward. I then tried to load up a Vector data set, i.e., at set that has 3 component array at each Cell Center. This failed with various error messages also so I guess I'll try the process of elimination again for that today. I might be mistaken, but as far as I recall, vector components have to be on cell NODES, not centers if you want to take advantage of PV's vector field visualization tools (arrows, streamlines and such). I use something like Attribute Name=my_vec_field AttributeType=Vector Center=Node DataItem ItemType=Function Dimensions=128 128 128 3 Function= JOIN( $0,$1,$2 ) DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_x /DataItem DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_y /DataItem DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_z /DataItem /DataItem /Attribute to load vector data, and it works reasonably well. In your case though, a complication might arise from the possible need to convert a grid of 3D vectors into a set of three separate grids for each components. As a side note, it has proven advantageous for debugging purposes to start with XML-only files (replacing the file reference with some (obviously smaller) sample data, and work from there. That way, the dimension mismatch you mentioned earlier would have been detectable to others not in possession of your heavy data file. It would be really helpful if there were more xdmc examples on their web page. Promising technology. Just needs some more documentation. That's exactly my impression as well... Good luck, Jens. ___ 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
Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
On Feb 5, 2013, at 10:23 AM, Jens Kleimann wrote: On 05.02.2013 13:27, Michael Jackson wrote: I finally got it to work, at least for Scalar values. The Dimensions in the topology section need to be 1 more than in the DataItem section because the Xdmf reader is creating a Rectilinear Grid and not ImageData. So once I finally figured that out then I could load up some of my scalar values. 2 Step forward. I then tried to load up a Vector data set, i.e., at set that has 3 component array at each Cell Center. This failed with various error messages also so I guess I'll try the process of elimination again for that today. I might be mistaken, but as far as I recall, vector components have to be on cell NODES, not centers if you want to take advantage of PV's vector field visualization tools (arrows, streamlines and such). I use something like Attribute Name=my_vec_field AttributeType=Vector Center=Node DataItem ItemType=Function Dimensions=128 128 128 3 Function= JOIN( $0,$1,$2 ) DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_x /DataItem DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_y /DataItem DataItem Dimensions=128 128 128 NumberType=Float Format=HDF my_file.h5:/path/comp_z /DataItem /DataItem /Attribute to load vector data, and it works reasonably well. In your case though, a complication might arise from the possible need to convert a grid of 3D vectors into a set of three separate grids for each components. As a side note, it has proven advantageous for debugging purposes to start with XML-only files (replacing the file reference with some (obviously smaller) sample data, and work from there. That way, the dimension mismatch you mentioned earlier would have been detectable to others not in possession of your heavy data file. It would be really helpful if there were more xdmc examples on their web page. Promising technology. Just needs some more documentation. That's exactly my impression as well... Good luck, Jens. Thanks for the thoughts. I'll take that into consideration when trying to figure out what is going wrong. Now on to see if XDMF will allow me to display my data with my chosen set of colors. --- Mike Jackson ___ 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
Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
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.flem...@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=713 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 JacksonPrincipal Software Engineer BlueQuartz SoftwareDayton, Ohio mike.jack...@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 x...@lists.kitware.com http://www.kitware.com/cgi-bin/mailman/listinfo/xdmf ___ 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
Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
Hello Mike I'm not sure what the issue is ... I'm assuming the hdf5 file containing the attribute data is in the same dir and the internal path is correct etc ... it all depends on how picky the XDMF reader is ... for example the number type for your Xdmf Attribute is Int but the Precision attribute is set to 4 ... I wonder if that matters to the reader. Cheers Jason On Mon, 2013-02-04 at 16:54 -0500, Michael Jackson wrote: 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.flem...@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=713 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 JacksonPrincipal Software Engineer BlueQuartz SoftwareDayton, Ohio mike.jack...@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 x...@lists.kitware.com
Re: [Paraview] [Xdmf] How to write voxel or image data xdmf file.
I was wondering that myself as the data inside the HDf5 file is actually encoded as a 1D array of 32 bit integers but in the xdmc file I am telling the XDMF reader that the data is 3D. Wonder if that matters? I have tried both ways and either get a read error or a ParaView crash. -- Mike Jackson www.bluequartz.net On Feb 4, 2013, at 5:30 PM, Jason Fleming jason.flem...@seahorsecoastal.com wrote: Hello Mike I'm not sure what the issue is ... I'm assuming the hdf5 file containing the attribute data is in the same dir and the internal path is correct etc ... it all depends on how picky the XDMF reader is ... for example the number type for your Xdmf Attribute is Int but the Precision attribute is set to 4 ... I wonder if that matters to the reader. Cheers Jason On Mon, 2013-02-04 at 16:54 -0500, Michael Jackson wrote: 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.flem...@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=713 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 JacksonPrincipal Software Engineer BlueQuartz SoftwareDayton, Ohio mike.jack...@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.