qsirecon.interfaces.qc module

qsirecon.interfaces.qc.createB0_ColorFA_Mask_Sprites(b0_file, colorFA_file, mask_file)[source]
qsirecon.interfaces.qc.createSprite4D(dwi_file)[source]
qsirecon.interfaces.qc.create_sprite_from_tiles(tile, out_file=None, as_bytes=False)[source]
qsirecon.interfaces.qc.embed_tiles_in_json_sprite(tile_list, as_bytes=True, out_file=None)[source]

Make a big rectangle containing the images for a brainsprite.

Parameters:

tile_listlist

List of 2d square numpy arrays to stick in a mosaic

Returns:

mosaicnp.ndarray

Mosaic of tile images

qsirecon.interfaces.qc.get_middle_slice_tiles(data, slice_direction)[source]

Create a strip of intensity-normalized, square middle slices.

qsirecon.interfaces.qc.load_and_reorient(filename)[source]
qsirecon.interfaces.qc.make_a_square(data_mat, include_last_dim=True)[source]

Applies zero padding to make a 2d matrix a square.

Examples:

>>> too_long = np.arange(4 * 7).reshape((4, 7))
>>> long_squared = make_a_square(too_long)
>>> long_squared.shape
(7, 7)
>>> long_squared.sum(1)
array([  0,  21,  70, 119, 168,   0,   0])
>>> too_tall = np.arange(6 * 5 * 3).reshape((6, 5, 3))
>>> tall_squared = make_a_square(too_tall)
>>> tall_squared.shape
(6, 6, 6)
>>> tall_2squared = make_a_square(too_tall, include_last_dim=False)
>>> tall_2squared.shape
(6, 6, 3)
qsirecon.interfaces.qc.mplfig(data, outfile=None, as_bytes=False)[source]
qsirecon.interfaces.qc.mplfigcontour(data, outfile=None, as_bytes=False)[source]
qsirecon.interfaces.qc.nearest_square(limit)[source]
qsirecon.interfaces.qc.reorient_array(data, aff)[source]
qsirecon.interfaces.qc.square_and_normalize_slice(slice2d)[source]