CorticalParcels.BilateralParcellationMethod
BilateralParcellation{T}(surface, x)

Create a BilateralParcellation from a Vector x, the length of which should match the size of the surface::CorticalSurface being supplied. The distinct elements of that Vector will become the Parcels of the resulting struct. Parcels will be keyed by IDs of type T; therefore the eltype of the Vector you supply must be coercable to T.

CorticalParcels.BilateralParcellationMethod
BilateralParcellation{T}(surface, cifti)

Create a BilateralParcellation from surface::CorticalSurface, with parcels initialized by the values given from a CiftiStruct (see CIFTI.jl)

CorticalParcels.HemisphericParcellationMethod
HemisphericParcellation{T}(surface, x)

Create a HemisphericParcellation from a Vector x, the length of which should match the size of the surface::Hemisphere being supplied. The distinct elements of that Vector will become the Parcels of the resulting struct. Parcels will be keyed by IDs of type T; therefore the eltype of the Vector you supply must be coercable to T.

CorticalParcels.ParcelMethod
Parcel(surface, coords, tree)

Given a Matrix of arbitrary x, y, z coordinates and a KDTree representing the positions of defined cortical vertex indices, make a Parcel by mapping those coordinates to the set of defined indices via nearest neighbor search.

CorticalParcels.ParcelMethod
 Parcel(surface, verts)

Make a Parcel, given a surface::Hemisphere its vertex indices.

CorticalParcels.ParcelMethod
Parcel(surface)

Make an empty Parcel where surface::Hemisphere dictates the length of the representational space.

Base.append!Method
append!(p, v)

Add vertex v::Int to the p's membership vector.

Base.deepcopyMethod
deepcopy(p)

Make a new Parcel containing a deepcopy of original parcel p's membership vector. Note however that the surface remains just a reference and is not itself copied, since it may be a large object.

Base.deepcopyMethod
deepcopy(px)

Make a new parcellation containing a deepcopy of all parcels from px. Note however that, as with deepcopy(p::Parcel), the surface remains just a reference and is not itself copied, since it may be a large object.

Base.delete!Method
delete!(px, k)

Delete Parcel with ID k from a Parcellation.

Base.getindexMethod
getindex(px, k)

Access a single Parcel within a Parcellation via its key of type T".

Base.haskeyMethod
 haskey(px, k)

Check whether Parcellation{T} px contains a parcel with key value k.

Base.keysMethod
keys(px)

Get the IDs of all Parcels within a Parcellation.

Base.lengthMethod
length(px)

Get the number of vertices comprising the representation space of a Parcellation.

Base.lengthMethod
length(p)

Get the length of the representational space in which a Parcel is located.

Base.merge!Method
merge!(p1, p2, A)

Merge two Parcels by moving the member vertices of p2 to p1.

Base.merge!Method
merge!(px, k1, k2, A)

Given a Parcellation{T} and two keys of type T, merge the two Parcels denoted by those keys and delete the latter one from the dictionary.

Base.resize!Method
 resize!(p, desired_size, A, neighbors)

Resize a Parcel p, guided by an adjacency matrix and an adjacency list, by repeated dilation or erosion until p reaches desired_size.

Base.resize!Method
 resize!(p, desired_size)

Resize a Parcel p, using adjacency information from its surface field.

Base.sizeMethod
size(px)

Get the number of Parcels comprising a Parcellation.

Base.sizeMethod
size(p)

Get the size (number of non-zero vertices) of a Parcel".

Base.splitMethod
 split(p, v)

Remove vertices v from a graph representation of a Parcel, and return a new set of Parcels: one for each connected component remaining.

Base.valuesMethod
values(px)

Access the Parcels in a Parcellation.

Base.vecMethod
vec(px)

Convert a BilateralParcellation from its internal Dict-based representation into a Vector{T}. T must have a zeros(T, ...) method. Warning: this is not a sensible representation in the event that any Parcels overlap.

Base.vecMethod
vec(px)

Convert a HemisphericParcellation from its internal Dict-based representation into a Vector{T}. T must have a zeros(T, ...) method. Warning: this is not a sensible representation in the event that any Parcels overlap.

CorticalParcels.bordersMethod
 borders(p)

Get a BitVector of the just the vertices of Parcel p that lie on its outermost edge.

CorticalParcels.centroidMethod
centroid(p, distances)

Find the centroid of a parcel (the vertex that has the least summed distance to all other vertices in the parcel). distances is expected to be a square distance matrix of dimensions (length(p), length(p)).

CorticalParcels.close!Method
close!(p, neighbors)

Given a Parcel p and an adjacency list neighbors, perform a morphological closing to fill in gaps, if any, by finding vertices in p where all of its neighbors but one belong to p. Note: for performance reasons, this may not be technically quite the same as a true closing operation, erode!(dilate!(p)).

CorticalParcels.complementMethod
complement(p1, p2)

Compute the number of member vertices in Parcel p1 not shared by those of p2.

CorticalParcels.cutMethod
cut(p, A)

Cut articulation point(s), if any, from a graph representation of a Parcel, and return a new set of Parcels: one for each connected component remaining after the vertex cut.

CorticalParcels.densityMethod
density(px)

Get the proportion of assigned parcel vertices of a parcellation relative to the total number of vertices in its surface representation.

CorticalParcels.densityMethod
density(p)

Get the proportion of member vertices in a Parcel relative to the length of its space.

CorticalParcels.dilate!Method
dilate!(p, A; limit = nothing)

Perform a single pass of dilation on Parcel p, guided by adjacency matrix A; optionally specify a limit::Int on the number of new vertices that can be added.

CorticalParcels.distanceFunction
 distance(p1, p2; method = CentroidToCentroid())

Find the distance between Parcels p1 and p2 using method (one of CentroidToCentroid() or ClosestVertices). This method call will expect to find a distance matrix :distances belonging to the first parcel's SurfaceSpace struct

CorticalParcels.distanceMethod
 distance(p1, p2, distances; method = CentroidToCentroid())

Find the distance between Parcels p1 and p2 according to distance matrix distances, using method (one of CentroidToCentroid() or ClosestVertices)

CorticalParcels.erode!Method
erode!(p, neighbors; limit = nothing)

Perform a single pass of erosion on Parcel p, guided by adjacency list neighbors; optionally specify a limit::Int on the number of vertices that you want to remove.

CorticalParcels.intersticesMethod
interstices(px, A)

Iterate through a parcellation and find, for each pair of neighboring Parcels separated by a 1-vertex-wide gap, the vertices in that interstitial region.

CorticalParcels.nnzMethod
nnz(px)

Get the number of vertices within a parcellation that are assigned to at least one Parcel.

CorticalParcels.overlapMethod
overlap(p1, p2)

Compute the number of member vertices shared between two Parcels p1, p2.

CorticalSurfaces.verticesMethod
vertices(p)

Get the vertex indices belonging to a Parcel. Indices will be numbered inclusive of medial wall by default.