graintrace.tess_to_gnn#
Parse Neper .tess files into torch_geometric graph representations.
- class graintrace.tess_to_gnn.NeperTessToGraphNN(tess_path, geometry_cell_file=None, geometry_face_file=None, device='cpu', dtype=torch.float64)[source]#
Bases:
objectParse a Neper .tess file and build a graph representation (pytorch_geometric Data) with grains as nodes and faces as edges.
- load_geometry_information(cell_file, face_file)[source]#
Placeholder hook for loading precomputed cell/face geometry (not implemented).
- run_neper_for_geometry_information(tess_path)[source]#
Placeholder hook for computing geometry via NEPER (not implemented).
- validate_topology(verbose=True)[source]#
Validate the graph connectivity: ensure each face belongs to 1 or 2 cells.
- register_dataframe_features(data, verbose=True)[source]#
Register every column in a pandas DataFrame as a node feature.
- activate_all_registered_features()[source]#
Activate all currently registered node and edge features.
- Return type:
None