read
read_ply(path)
Reader for '.ply' files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Disc location of the file to read. |
required |
Returns:
| Type | Description |
|---|---|
simplices
|
list of lists of vertex ids surrounding each cell. |
positions
|
A Nx3 array of floats. Where N = number of vertices. |
Notes
- In the
.plyformat we tend to save onlySimplicialComplexobjects. Cochainobjects must be saved in.vtkformat.- TODO: Should also check elements of lower order to see if they contain simplices to extract. So far only pure simplicial complexes are handled.
- TODO: Should also check and extract other properties in order to read Cochains.
Source code in src/dxtr/io/read.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
read_vtk(path)
Reader for .vtk files of a pure SimplicialComplex or Cochain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
The location of the file to read. |
required |
Returns:
| Type | Description |
|---|---|
simplices
|
A (Nn, n+1) array containing the top vertex indices (n+1 indices per n-simplex) for each of the Nn top simplices (of topological dimension n). |
positions
|
A (N0, 3) array containing the 3D position vectors of the N0 0-simplices. |
property
|
A |
Notes
- Only works so far on Primal scalar-valued Cochain !!!
Source code in src/dxtr/io/read.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |