Properties of a Network3D Object
Main Properties
The Network3D Object is how NetTracer3D groups together the data in an ongoing session. These properties will be saved/loaded when using ‘File -> Save (As) Network 3D Object’, or the equivalent load. Many of NetTracer3D’s methods may need to reference one or more of these properties to function correctly.
- These properties are as follows:
Nodes - the image in the nodes channel that represents objects to be grouped in a network.
Edges - the image in the edges channel that represents objects to use to connect nodes together.
Overlay 1 - the image in the overlay1 channel
Overlay 2 - the image in the overlay2 channel
Network - The network itself.
Node Centroids - The [Z,Y,X] centroid of each node.
Edge Centroids - The [Z, Y, X] centroid of each edge.
Node Communities - The communities that nodes in the network belong to.
Node identities - The assigned identities of nodes in the network.
xy_scale - The real-dimension per pixel of the 2D x/y plane (ie, 5 microns per pixel). This value will always be the same for both x and y. NetTracer3D does not currently support differentially scaled x and y dimensions.
z_scale - The real dimension per voxel-depth of the 3D z plane.
- Whenever ‘Process -> Calculate Connectivity Network’ is run, NetTracer3D will aquire an additional hidden property.
12. Search Region - An image of the nodes after they have been expanded by the desired parameter to search for edge connections. * Note this property does occupy RAM. It will be saved alongside the ‘Network 3D Object’ if it exists, but it will not be loaded in when loading ‘Network 3D Object’. * The main reason this exists is to allow it to be saved, after which the user can simply load the Search Region itself into the nodes channel, so that they may compute Connectivity Networks under new parameters, while being able to skip the node_search step completely (which is the slow step).
Note that the majority of the properties can be purged from RAM by using ‘Image -> Properties’. The xy_scale and z_scale values should also be assigned here.
Necessary Structures to Properties stored in CSVs
When NetTracer3D saves its properties, it organizes several into csv spreadsheets, containing specific data organization that it expects to find when loading the same properties back in.
Some users may wish to load these properties in from elsewhere (.csv or .xlsx can be used to load). For example, if they want to manually assign nodes to certain centroids or identities by editing microsoft excel, or batch organizing datasets for import this way using something like the pandas module in python.
Note that node identities specifically will also save into a .json that will be take priority over the .csv when loading. If you want to load the .csv instead, please delete the .json.
Note that .xlsx files have a row limit, so I generally recommend saving as .CSV if possible, especially for large property lists.
These structures are as follows (make sure to use correct headers):
network property:
Network tables are organized with this structure. Adjacent nodes in the same row are connected. The edge to the right of a node-pair in the same row is the edge that was found to connect them. If labeled edges were not used, this value is simply 0.
For example, this table specifically is saying node 18 is paired to node 20, connected via edge 175, etc.
Node A |
Node B |
Edge C |
|---|---|---|
18 |
20 |
175 |
16 |
20 |
176 |
These new columns should be thought of their own rows, as in node 21 is paired to node 22, connected by edge 177.
node_identities:
Node identities are organized with a simple Node:Identity structure.
NodeID |
Identity |
|---|---|
1 |
[Value] |
2 |
[Value] |
3 |
[Value] |
Note that node identities typically pair a node to a single identity value, however nodes can also be assigned multiple identities. In such a case, the identity value is assigned as a list of all corresponding identities. This list is stored as a string in memory, for compatibility with other methods, however it is returned to a list in relevant functions using ast.literal_eval().
node_communities:
This property has the same structure as node_identities.
NodeID |
Community |
|---|---|
1 |
[Value] |
2 |
[Value] |
3 |
[Value] |
node_centroids:
Node centroids organize using Node:Zval:Yval:Xval.
Make sure to use Z, Y, X. This is because of the way numpy organizes dimensions.
Coordinates should generally be ints greater than 0.
Node ID |
Z |
Y |
X |
|---|---|---|---|
1 |
[Val] |
[Val] |
[Val] |
2 |
[Val] |
[Val] |
[Val] |
3 |
[Val] |
[Val] |
[Val] |
edge_centroids:
Edge centroids are ostensibly the same as node centroids, albeit with a different header.
Edge ID |
Z |
Y |
X |
|---|---|---|---|
1 |
[Val] |
[Val] |
[Val] |
2 |
[Val] |
[Val] |
[Val] |
3 |
[Val] |
[Val] |
[Val] |
Temp Properties
- The following properties will be maintained for the duration of an active session but are neither saved nor loaded with ‘Network 3D Objects’:
Object volumes.
Object Radii.
While both of these properties exist in the active session, they will be displayed when their corresponding objects are clicked in the ‘Info on Object’ table.
Next Steps
Next, you can read the doc Using the Spreadsheet Loader for help using the excel loader GUI (this is a tool to help load data from excel files).