Skip to content
ptokarcz edited this page Apr 30, 2018 · 12 revisions

AutoFD wiki

Interpolation

This may be x4 in each direction in-plane, or to 0.25 mm pixels (using the original resolution read in from the NII header).

Defining perimeter from a segmentation

This proceeds in stages, as depicted in the Processing Workflow PDF.

  • First, slices with too few pixels in the segmented blood pool are discarded.
  • Next, an attempt is made to draw a perimeter outside the blood pool and wholly within the myocardium, in the remaining slices.
  • Failing that, the border pixels of the blood pool are counted, and if enough of these are in contact with the myocardium, then a "contingent" ROI is formed from the intersection of the blood pool and the convex hull of the myocardium.
  • If even this operation fails to return a usable ROI, an error condition is reported; however, this could only occur in principle, in the event of a gross failure at the segmentation step (an inside-out mis-labelling of the blood pool and the myocardium), and we have never seen it in practice.

Fractal dimension analysis

Once a perimeter has been established, the interior is used to select a region for a two-stage fractal-dimension analysis. First, a Bias-Field Elimination/Level-Set Estimation step creates an edge-detected contour within the working perimeter, and second, the FD is estimated using a multi-resolution box-counting algorithm. A failure at this stage results in an error condition; otherwise, the FD for the slice is written to the summary master file. At all events, processing advances smoothly to the next slice or the next folder. Two progress bars display the number of folders processed so far, and the number of slices in the current folder.

A comprehensive audit trail, consisting of images, plots and small CSV files, is created for each slice in its own output directory. Filenames are self-explanatory and document the processing for each slice, including any error conditions.

Slice selection for analysis

All slices actually present in the image grayscale stack are analysed, and the results reported; however, there is an option to keep or discard the first and slices in the calculation of the global, basal and apical summary statistics. In the presence of segmentation data, a minimum pixel-threshold for the blood pool can be set. Previous optimisation on images acquired from 116 Genscan subjects suggests that a minimum segmented blood pool pixel count of 64 pixels (see resolution above) results in >99% balanced accuracy in automated slice selection when automated and clinician slice selection are compared. For the UKBB data, a similar threshold was set at 38 pixels.

Note that Slice 1 is always the first slice in the grayscale image stack. If the input segmentation stack contains extra (zero) planes extending beyond the grayscale stack, those are discarded. In any case, all important inputs, outputs and intermediate results are written to labelled "audit" images or CSV files with self-explanatory names.

Error codes

For slices actually present in the grayscale image stack:

  • Meagre blood pool (below pre-defined threshold - the default is 64 pixels for the sample Test Data, and 38 pixels for the UKBB data.
  • Sparse myocardium (below pre-defined threshold of blood pool connected to myocardium - default 50%).
  • No ROI created.
  • FD measure failed.

In addition:

  • The statistics summary file has room for 20 slices, but the FD for those not actually present is reported as NaN.
  • If an attempt is made to process a sub-folder which is missing either the grayscale image or segmentation, then the sub-folder name is written to the summary file, but the rest of the data row is set to white space. This signals an error without disrupting the workflow for multiple datasets.