Dream3d data into python

31 views
Skip to first unread message

Charles Xu

unread,
Nov 19, 2022, 10:55:33 AM11/19/22
to dream3d-users
Hi, I'm trying to import and view dream3d data in python in order to transform some of the data so it can be applied elsewhere but I'm not quite sure how to get it to work. I'm using h5py to try and import and access the data but I'm not sure how to access the deeper layers within the dream3d data.

Thanks,
Charles

Aditya Venkatraman

unread,
Nov 19, 2022, 3:10:32 PM11/19/22
to Charles Xu, dream3d-users
This might help with reading the euler angles, neighbor list, number of neighbors and grain information for the RVE
hex2p=h5py.File('filename.dream3d','r')

neighborlist=np.array(hex2p['DataContainers']['SyntheticVolumeDataContainer']['Grain Data']['NeighborList'])
featureid=np.array(hex2p['DataContainers']['SyntheticVolumeDataContainer']['CellData']['FeatureIds']).squeeze()
eulerangles=np.array(hex2p['DataContainers']['SyntheticVolumeDataContainer']['CellData']['EulerAngles'])
numneighbors=np.array(hex2p['DataContainers']['SyntheticVolumeDataContainer']['Grain Data']['NumNeighbors']) 

--
You received this message because you are subscribed to the Google Groups "dream3d-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dream3d-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dream3d-users/b3abf033-06e8-4e67-9de0-2048282df17an%40googlegroups.com.


--
Aditya Venkatraman,
PhD Candidate,
Georgia Institute of Technology,
Atlanta,Georgia-30332.
Reply all
Reply to author
Forward
0 new messages