VolumeFlattening: Module to flatten and un-flatten OCT data based on RPE

PRLEC Framework for OCT Processing and Visualization

OCT_GUI.Algorithms.Flattening.VolumeFlattening.applyFlattening(self, event=None)[source]

Method called by GUI to apply RPE flattening and update planes

OCT_GUI.Algorithms.Flattening.VolumeFlattening.applyFlatteningBM(self, event=None)[source]

Apply Flattening to Bruch’s Membrane Callback.

Setting and Resetting Flattening to Bruch’s Membrane. Updating planes and Setting Buttons.

OCT_GUI.Algorithms.Flattening.VolumeFlattening.fillMissingColumns(volume)[source]

This method fills up empty columns by its nearest neighbors. If columns are zero, RANSAC may fail on several slices. Furthermore, weights are not defined.

Parameters:
volume: list of ndarrays

Input oct volume_rgb

OCT_GUI.Algorithms.Flattening.VolumeFlattening.ransac_fit(x, y, degree_in)[source]

Ransac fitting helper

Parameters:
x: ndarray

data points x

y: ndarray

data points y

degree_in: scalar

degree of ransac

OCT_GUI.Algorithms.Flattening.VolumeFlattening.runFlattening(volume, flattening_polynomial)[source]

Flattening an OCT volume based on RPE.

Compare S. Chiu’s paper.

Algorithm: For every volume slice… 1) Gaussian Smoothing 2) Searching brightest pixel in every column, and only allow +/-3 pixels distance from prior slice 3) Ransac and curve fit of degree 4 4) Shift columns and store shifts

Parameters:
volume: numpy array 2D/3D array

input oct volume_rgb

flattening_polynomial = scalar

input for polynomial fitting - order of the curve

OCT_GUI.Algorithms.Flattening.VolumeFlattening.unFlatten(volume, shiftedValues)[source]

Method to unflatten the slices

Parameters:
volume: ndarray

flattened oct volume

shiftedValues: list of lists

the shifted values of each column - if the y-th column of slice z was shifted/translated by t, the translation distance t can be accessed by shiftedValues[z][y].