We assume there is a quality or related measure that will let us compute distances between different time points and that these distances relate to how similar two images are. Note that the measurement may not relate to quality at all but should map images into a similar metric space based on appearance or some other objective quality that leads to the same value when images are the same and changes continuously as images differ.

assembleTestRetest(
  dataIn,
  qualitycolumns,
  subjectID,
  visitID,
  whichVisit,
  measureToRepeat,
  uniqueID,
  covariates,
  nozeroes = FALSE
)

Arguments

dataIn

Input data frame with the old name within

qualitycolumns

the name(s) of quality-related column measurements

subjectID

the unique subject id column name

visitID

the column name that gives the visit / date; typically we look for data the exists on the same visit.

whichVisit

optional visit to use for the analysis

measureToRepeat

the measurement to assemble for computing trt stats (e.g. ICC)

uniqueID

optional column to contatenate to trt dataframe

covariates

optional additional column name(s) to add to dataframe

nozeroes

optional boolean - do not allow zero distance time

Value

data frame with test-retest friendly organization ... trt0 and trt1 show the row indices of the test retest data

Author

Avants BB

Examples

mydf = generateSubtyperData( 100 )
rbfnames = names(mydf)[grep("Random",names(mydf))]
mytrt = assembleTestRetest( mydf, rbfnames[1], 'Id', 'visit' )