Orientation

src.processing_cores.orientation.bulk_proj_std(img, b_min=- 90, b_max=90, step=1)

Calculates the maximum standard deviation for each value of theta from “b_min” to “b_max” with step “step”.

Arguments:

img (Image): Input image b_min (int, optional): Minimum value of theta. Defaults to -90. b_max (int, optional): Maximum value of theta. Defaults to 90. step (int, optional): Step between two values of theta. Defaults to 1.

Returns:

float: Best angle

float: Maximum standard deviation

Image: Rotated image

src.processing_cores.orientation.circle_mask(img)

Creates and applies the circumscribed circle as a circular mask on an image.

Arguments:

img (Image): Input image

Returns:

Image: Masked image

src.processing_cores.orientation.f_orientation(img, ROI_pos=(- 1, - 1), ROI_size=100, sigma=7, precision=0.9)

Computes the fiber orientation.

Arguments:

img (Image): Input image on which the fiber orientation is computed. ROI_pos (tuple, optional): Top-left corner position of the square ROI. Defaults to (-1, -1). ROI_size (int, optional): Width of the square ROI. Defaults to 100. sigma (int, optional): Width of the window in the orientationMap module. Defaults to 7. precision (float, optional): Minimum level of precision. Defaults to 0.9.

Returns:

float: Angle

Image: Rotated image

src.processing_cores.orientation.find_orientation(img)

Computes the fiber orientation on the given image.

Arguments:

img (Image): Input image

Returns:

float: Angle

Image: Rotated image

src.processing_cores.orientation.orientationMap(img, w=1)

Calculates the inertia tensor of the image with a sliding window of width “w” (limiting to orientation)

Arguments:

img (Image): Input image w (int, optional): Width of the sliding window. Defaults to 1.

Returns:

Image: Orientation map image

src.processing_cores.orientation.proj_std(angle, img)

Rotates the image at the given angle and sums all the columns together.

Arguments:

angle (float): Image rotation angle img (Image): Input image

Returns:

float: Standard deviation of image rows

Image: Rotated image