civet.getFilename: Get Selected Civet Filenames

Description Usage Arguments Details Value Author(s) Examples

View source: R/civet.R

Description

Returns either one or more Civet filenames, depending on file type.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
civet.getFilenameClassify(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameGrayMatterPve(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameWhiteMatterPve(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameCsfPve(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameStxT1(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameCerebrumMask(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameSkullMask(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameGrayMatterSurfaces(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameWhiteMatterSurfaces(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameMidSurfaces(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameCorticalThickness(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameMeanSurfaceCurvature(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameLinearTransform(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)
civet.getFilenameNonlinearTransform(scanID, baseDir, civetVersion="1.1.9", fullPath=TRUE)

Arguments

scanID

A string specifying the unique scan-id (and thus sub-directory) within the Civet root output directory.

baseDir

A string specifying the Civet root output directory. This directory will, in turn, contain all of the scanIDs.

civetVersion

An optional string specifying the version of Civet used to create the output. This is significant since filenames and directory structures may change across difference versions of Civet.

fullPath

A boolean specifying whether the function is to return either a fully-qualified path (TRUE) or just the filename without path (FALSE).

Details

The purpose of this function is to facilitate writing code requiring manipulation of Civet products. To this purpose, we have written a number of convenience functions which, given the type of file desired and a path to the Civet output directory, are able to determine and return the actual filename(s). With regard to design, the decision to include the type of file requested in the function name rather than as a passed argument, was driven by the fact that inclusion in the function name permits the user to easily view all file types available via an IDEs Tab-Completion mechanism. Thus, for example, using the OS X built-in GUI (R.app), I can type “civet.<tab>”, and see all possible completions for all supported file types.

Value

Either a string or a list is returned, depending on the number of filenames returned. Specifically, a single filename is returned as a string, whereas multiple filenames are returned as named lists.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## Not run: 
library(rmincIO)

# set Civet root path and scan-identifier
basePath <- "~/tmp/ADNI/civet/pipeOut"
scanID = "0221-M-AD"

# get the name of the aggregate tissue classification volume
# ... and then read it
classifyVolname <- civet.getFilenameClassify(scanID, basePath)
classifyVol <- mincIO.readVolume(classifyVolname)

# get the left and right gray matter surface filenames and then 
# ... print the names
gmSurfName <- civet.getFilenameGrayMatterSurfaces(scanID, basePath)
print(gmSurfName$left)
print(gmSurfName$right)

# get the various transformation file filenames
lin.xfmName <- civet.getFilenameLinearTransform(scanID, basePath)
print(lin.xfmName)
nlin.xfmNames <- civet.getFilenameNonlinearTransform(scanID, basePath)
print(nlin.xfmNames$xfm)		# name of the nlin xfm file
print(nlin.xfmNames$grid)		# name of the nlin grid file

## End(Not run)

jnikelski/rmincIO documentation built on May 19, 2019, 2:58 p.m.