Table of Contents

Class DfbFormat

Namespace
DotFly.Core.Checkpoints
Assembly
DotFly.Core.dll

Layout constants of the dotFly brain checkpoint (.dfb) file.

The file is a little-endian container of fixed-width columns, each 64-byte aligned so that it can be memory-mapped and used in place:

[0..64)      header: magic "DFB1", version, section count, header size, reserved
[64..)       section table:  × count
...          sections, each aligned to 64 bytes

Section tags are four ASCII characters. Neuron columns have one element per neuron; edge columns have one element per directed edge in CSR order (rows = presynaptic neuron index, columns sorted ascending within a row).

public static class DfbFormat
Inheritance
DfbFormat
Inherited Members

Fields

Alignment

Section alignment in bytes.

public const int Alignment = 64

Field Value

int

HeaderSize

Header size in bytes.

public const int HeaderSize = 64

Field Value

int

Magic

File magic, "DFB1".

public const uint Magic = 826426948

Field Value

uint

TagBodyId

Neuron column, ulong: body/root ID.

public static readonly uint TagBodyId

Field Value

uint

TagClass

Neuron column, uint: string index of the class.

public static readonly uint TagClass

Field Value

uint

TagColumns

Edge column indices, int[E]: postsynaptic neuron index.

public static readonly uint TagColumns

Field Value

uint

TagFlywireType

Neuron column, uint: string index of the FlyWire type (MaleCNS cross-reference).

public static readonly uint TagFlywireType

Field Value

uint

TagHemibrainType

Neuron column, uint: string index of the hemibrain type (MaleCNS cross-reference).

public static readonly uint TagHemibrainType

Field Value

uint

TagInstance

Neuron column, uint: string index of the instance name.

public static readonly uint TagInstance

Field Value

uint

TagNeurotransmitter

Neuron column, byte: Neurotransmitter.

public static readonly uint TagNeurotransmitter

Field Value

uint

TagProvenance

Provenance JSON (UTF-8), see Provenance.

public static readonly uint TagProvenance

Field Value

uint

TagRowPtr

Edge row pointers, long[N+1].

public static readonly uint TagRowPtr

Field Value

uint

TagSetIndices

Concatenated, per-set-sorted neuron indices of all named sets, int[].

public static readonly uint TagSetIndices

Field Value

uint

TagSets

Named sets directory: uint32 count, then per set uint32 nameStringIndex, uint32 offset, uint32 length into TagSetIndices.

public static readonly uint TagSets

Field Value

uint

TagSide

Neuron column, byte: Side.

public static readonly uint TagSide

Field Value

uint

TagSoma

Neuron column, int × 3: soma voxel coordinates, MinValue when unknown.

public static readonly uint TagSoma

Field Value

uint

TagStrings

String table: uint32 count, uint32 offsets[count+1], UTF-8 bytes. Index 0 is always the empty string (used as "null").

public static readonly uint TagStrings

Field Value

uint

TagSuperclass

Neuron column, uint: string index of the superclass.

public static readonly uint TagSuperclass

Field Value

uint

TagType

Neuron column, uint: string index of the cell type.

public static readonly uint TagType

Field Value

uint

TagWeights

Edge weights, short[E]: signed contact count.

public static readonly uint TagWeights

Field Value

uint

Version

Current format version.

public const uint Version = 1

Field Value

uint

Methods

Align(long)

Rounds a byte offset up to the next multiple of Alignment.

public static long Align(long offset)

Parameters

offset long

Returns

long

Tag(string)

Builds a section tag from four ASCII characters.

public static uint Tag(string fourCc)

Parameters

fourCc string

Returns

uint

TagToString(uint)

Formats a tag as its four characters, for diagnostics.

public static string TagToString(uint tag)

Parameters

tag uint

Returns

string