Setup_For_Keras: Setup geoLet derived objects for deep learning analysis

Description Usage Arguments Value

View source: R/Prepare_for_Keras.R

Description

Provide the output needed for starting a deep learning model using keras:

Usage

1
2
3
4
5
6
7
Setup_For_Keras(path, outcome = NULL, ratio = 2/3, ROIname,
  ROINameNorm = NULL, TrainTest = TRUE, per_patient_sampling = TRUE,
  New_Pixel_Spacing = c(), ROIBitMask = TRUE, TargetSize = "auto",
  VirtualBiopsy = FALSE, VirtualBiopsyRay = c(10, 10),
  VirtualBiopsyMaxNum = 25, backgroud = c("zero", "min", "mean",
  "runif", "rnorm"), bckwidth = 0.5, threshold_filter = 150,
  ROImap = NULL)

Arguments

path

The path of cases structured as moddicom usually requires (one subfolder with a DICOM study containing images and a RT structure DICOM file)

outcome

A data.frame containing in one column the same IDs of patients listed in path, usually corresponding to the folder names, and a column with the given outcome

ratio

a number between 0 and 1 giving the ratio between training set and verification set (default 2/3)

ROIname

a character vector containing the ROI(s) name(s) used for extracting images from studies

ROINameNorm

a character vector containing the ROI(s) name(s) used for used for normalizing the values, if NULL no normalization is applied

TrainTest

logical value (default is TRUE) that gives the outcome already splitted for training and test.

per_patient_sampling

a logical value (default is TRUE) that sets the sampling for training and testing set according the patients IDs. If FALSE the sampling is obtained by images slices.

New_Pixel_Spacing

a numeric vector, length must be 2 values, that sets the new pixel spacing for all the images in order to homogenize the spatial resolution among all patients.

ROIBitMask

a logical value, default TRUE, return only the voxels within the ROI, if FALSE returns the whole VoxelCube.

TargetSize

default value is 'auto' that calculates the size in rows and columns of final array as mean of the single VoxelCubes sizes, otherwise user can set a numerical vector of length = 2, that sets number of rows and columns manually.

VirtualBiopsy

logical value, default is FALSE. If TRUE returns for each patient returns a number maximum number of VirtualBiopsyMaxNum of small sampling images with size VirtualBiopsyRay * 2 + 1.

VirtualBiopsyRay

a numeric vector of length 2, giving the width os extension of Virtual Biopsy around the centroid. Final dimension of biopsy is VirtualBiopsyRay * 2 + 1.

VirtualBiopsyMaxNum

a integer value setting the maqximum number of Virtual Biopsies to be sampled.

backgroud

the value of the pixel surrounding the ROI in the background: 'zero' is 0; 'min' is the minimum value in the ROI; 'mean' is the mean value in the ROI; 'runif' is a random uniform distribution between min and max values in the ROI; 'rnorm' is a random normal distrbution with mean is the mean value of ROI, sd is the standard distribution of ROI values.

bckwidth

a numeric value between 0 and 1: the width in the range of ROI values for runif background option or the multiplier of sd for rnorm background option.

threshold_filter

The threshold number of pixels per slice NA below which images are deleted. Default is 150 pixels.

ROImap

If available, the result of a map.ROI function, as an object of class ROImap given by moddicom package.

Value


kbolab/moddicom documentation built on Nov. 29, 2020, 9:11 p.m.