## Generating TAPAS Training Data

These functions create the training data for TAPAS.

tapas_data()

Generates the TAPAS Training Data

tapas_data_par()

Generates The TAPAS Training Data in Parallel

## Training the TAPAS Model

This function trains the TAPAS model from the training data.

tapas_train()

TAPAS Model Training

## QA TAPAS Model

This function helps create scatter plots with marginal histograms (we call this plot a scattergram) to help assess the threshold grid and fit of the TAPAS model.

make_scattergram()

Make a Scatterplot of Subject-Level Thresholds with Marginal Histogram

## Apply TAPAS Model

These functions apply the TAPAS model fit to new subjects to determine a subject-specific threshold and create segmentation masks.

tapas_predict()

TAPAS Prediction

tapas_predict_par()

TAPAS Prediction in Parallel

## Data

The data contained in this package contains 3D arrays for 15 synthetic gold standard segmentations (gs#), 15 probability maps (pmap#), and a single brain mask (brain_mask) that can be used for all 30 images. The # value noted can be any number 1-15. Package data is set to Lazy Data: true and will therefore be automatically loaded with the package. We use 10 subjects for training the TAPAS model and then evaluate the model using 5 subjects excluded from training in this tutorial. The gold standard segmentations and probability maps consist of a single slice with voxel values and a second slice where all voxels are equal to 0. The brain mask contains a brain mask value in both slices. These are saved as arrays which we will convert to nifti objects. The authors would like to re-iterate that all data available in the package and used throughout this vignette are synthetic and created by the authors simply for demonstration of the package usage. The data is meant to mimic a simple set of real data.

brain_mask

Brain Mask

gs1

Gold Standard 1

gs10

Gold Standard 10

gs11

Gold Standard 11

gs12

Gold Standard 12

gs13

Gold Standard 13

gs14

Gold Standard 14

gs15

Gold Standard 15

gs2

Gold Standard 2

gs3

Gold Standard 3

gs4

Gold Standard 4

gs5

Gold Standard 5

gs6

Gold Standard 6

gs7

Gold Standard 7

gs8

Gold Standard 8

gs9

Gold Standard 9

pmap1

Probability Map 1

pmap10

Probability Map 10

pmap11

Probability Map 11

pmap12

Probability Map 12

pmap13

Probability Map 13

pmap14

Probability Map 14

pmap15

Probability Map 15

pmap2

Probability Map 2

pmap3

Probability Map 3

pmap4

Probability Map 4

pmap5

Probability Map 5

pmap6

Probability Map 6

pmap7

Probability Map 7

pmap8

Probability Map 8

pmap9

Probability Map 9