NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Next topic

algorithms.utils.affines

This Page

algorithms.statistics.utils

Module: algorithms.statistics.utils

Functions

nipy.algorithms.statistics.utils.combinations(iterable, r)
nipy.algorithms.statistics.utils.complex(maximal=[(0, 3, 2, 7), (0, 6, 2, 7), (0, 7, 5, 4), (0, 7, 5, 1), (0, 7, 4, 6), (0, 3, 1, 7)])

Faces from simplices

Take a list of maximal simplices (by default a triangulation of a cube into 6 tetrahedra) and computes all faces

Parameters :

maximal : sequence of sequences, optional

Default is triangulation of cube into tetrahedra

Returns :

faces : dict

nipy.algorithms.statistics.utils.cube_with_strides_center(center=[0, 0, 0], strides=[4, 2, 1])

Cube in an array of voxels with a given center and strides.

This triangulates a cube with vertices [center[i] + 1].

The dimension of the cube is determined by len(center) which should agree with len(center).

The allowable dimensions are [1,2,3].

Parameters :

center : (d,) sequence of int, optional

Default is [0, 0, 0]

strides : (d,) sequence of int, optional

Default is [4, 2, 1]. These are the strides given by np.ones((2,2,2), np.bool).strides

Returns :

complex : dict

A dictionary with integer keys representing a simplicial complex. The vertices of the simplicial complex are the indices of the corners of the cube in a ‘flattened’ array with specified strides.

nipy.algorithms.statistics.utils.decompose2d(shape, dim=3)

Return all (dim-1)-dimensional simplices in a triangulation of a square of a given shape. The vertices in the triangulation are indices in a ‘flattened’ array of the specified shape.

nipy.algorithms.statistics.utils.decompose3d(shape, dim=4)

Return all (dim-1)-dimensional simplices in a triangulation of a cube of a given shape. The vertices in the triangulation are indices in a ‘flattened’ array of the specified shape.

nipy.algorithms.statistics.utils.join_complexes(*complexes)

Join a sequence of simplicial complexes.

Returns the union of all the particular faces.

nipy.algorithms.statistics.utils.test_EC2(shape)
nipy.algorithms.statistics.utils.test_EC3(shape)