List of my modules...
Datatype: HxSkeleton
Description:
Data structure representing a skeleton of a 3D discretised object defined on a cubic grid (i.e. from a binarised 3D image). The structure can be generated from the 3D image of a skeleton with the module Skeleton_Image_To_Graph. The conversion procces implies topological classification of the skeleton pixels: branch (or edge), intersection, surface, etc. The structure contains all the information from the 3D image, so in theory you could be able to regenerate the image.
This structure supposes a curvilinear skeleton, i.e. with lines and points. It does handle surfaces but stores the associated pixels in a container named Others. In essence, this structure is based on a graph structure: a set of vertices and a set of edges, but is adapted and enriched to accomodate the rest of the information that can be found in the image.
The structure contains the following data:
- No: nodes, or coordinates (in the image space) of the "vertices" of the graph.
- No_v: associated value, i.e. the greylevel from the image.
- No_c: associated connexity, or number of edges leading to the node.
- No_b: border flag, to indicate whether the node touches the image border (useful for handling boundary conditions). It's an 8-bit value, with the following bits indicating which sides of the image the node touches:
- bit 0x01: minimum X coordinate.
- bit 0x02: maximum X coordinate.
- bit 0x04: minimum Y coordinate.
- bit 0x08: maximum Y coordinate.
- bit 0x10: minimum Z coordinate.
- bit 0x20: maximum Z coordinate.
- No_lbl: associated label. The HxSkeleton structure is built for seperating connected "elements" (e.g. in porous media, like pores, or grains), and this label will identify one such element. At the start, during the conversion process, an intersection of several branches of the skeleton is hardly concentrated on one single pixel, but spread on a connected cluster of several, so this value will identify these clusters.
- Ne: edges (historically called necks), defined as a pair of indices in No.
- Ne_v: associated value. In the previously mentioned conversion module, equals the minimum greylevel found along this edge.
- NePts: coordinates of all the pixels that comprises the edges or branches of the skeleton (excluding the endpoints, since those are stored in No) .
- NeNfo: information used, for each edge, to identify the path of the edge (originally defined as a set of pixels in the image), i.e. the subset in NePts. It is a pair of values, say (x,y), that define the aforementioned subset as [NePts[x]; NePts[x+y]. Note that each and every point in NePts is (initially, at least) referenced exactly once in NeNfo.
- NePts_v: associated value, i.e. the greylevel from the image.
- NePts_b: associated border flag, defined in the same way as for the nodes.
- No_Others: coordinates of all other points that were not classified as branch or branch intersection. Therefore this contains all point that make up surfaces, if the skeleton is not curvilinear, and interior points if it wasn't even a skeleton to begin with.
Finally, more global additional information is stored:
- dims: dimensions of the skeleton image from which this structure was generated, i.e, width, height, and depth.
- periodic: boolean value which is true if periodic boundary conditions were used.
- box: bounding box of the skeleton image (used to reposition this structure in the 3D space).
- transform: transformation matrix applied to the structure (again, used to reposition in 3D space).
The structure can be saved to disk in an ASCII format named "EP_SkeletonGraph", with an epg extension. The file can be opened in a text editor and modified if needed. It can be visualised with the Draw_Skeleton module.