Skip to content

Commit

Permalink
Bunch more changes for v9210
Browse files Browse the repository at this point in the history
  • Loading branch information
dorianps committed Mar 17, 2019
1 parent ec7ec6f commit 3aecc96
Show file tree
Hide file tree
Showing 26 changed files with 422 additions and 206 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ Remotes: ANTsX/ANTsR,
ANTsX/ANTsRCore
LinkingTo: Rcpp, RcppArmadillo
NeedsCompilation: yes
RoxygenNote: 6.1.0.9000

RoxygenNote: 6.1.1.9000
Binary file modified LESYMAP.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export(BM)
export(BMfast2)
export(BMperm)
export(checkAntsInput)
export(checkAssumptions_ttest)
export(checkFilenameHeaders)
export(checkImageList)
export(checkMask)
Expand All @@ -24,6 +25,7 @@ export(lsm_svr)
export(lsm_ttest)
export(minSegDistance)
export(optimize_SCCANsparseness)
export(printInfo)
export(registerLesionToTemplate)
export(regresfast)
export(save.lesymap)
Expand All @@ -47,7 +49,9 @@ importFrom(stats,qnorm)
importFrom(stats,quantile)
importFrom(stats,residuals)
importFrom(stats,runif)
importFrom(stats,shapiro.test)
importFrom(stats,t.test)
importFrom(stats,var.test)
importFrom(utils,capture.output)
importFrom(utils,find)
importFrom(utils,getSrcDirectory)
Expand Down
9 changes: 6 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
==============
LESYMAP v0.0.0.9210 (Release date: 2019-03-15)
- Added new method 'svr' - Support Vector Regression (experimental)
- Added method 'svr' - Support Vector Regression (experimental)
- Added assumption checks for t-test analysis
- Fixed missing 'rawWeights.img' in SCCAN output
- Fixed missing 'sccan.ccasummary' in save.lesymap printout
- Switched default method from "BM" to "sccan"
- Some user inputs made case tolerant: i.e., 'FDR' is same as 'fdr'
- Documentation improvement
- Main arguments are now case insensitive ('FDR' same as 'fdr')
- Enabled correctLesSize='both' (voxel + behavior)
- New 'printInfo' function to route information display
- Documentation corrections

==============
LESYMAP v0.0.0.9202 (Release date: 2019-01-29)
Expand Down
2 changes: 1 addition & 1 deletion R/getLesionSize.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ getLesionSize <- function(lesions.list, showInfo=TRUE) {
}

if (inputtype == 'antsFiles' & showInfo)
cat(' Slow computation from filenames. Preload images with imageFileNames2ImageList() for faster processing.')
printInfo(' Slow computation from filenames. Preload images with imageFileNames2ImageList() for faster processing.', type='middle')

lessize = rep(NA, length(lesions.list))

Expand Down
6 changes: 3 additions & 3 deletions R/getUniqueLesionPatches.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ getUniqueLesionPatches <- function(lesions.list, mask=NA, returnPatchMatrix=F,
if (returnPatchMatrix) patchmatrix = lesmat[ , patindx==1]

if (showInfo) {
cat(paste(
printInfo(paste(
numpatches, 'unique patches,',
numvoxels, 'voxels -',
round(numvoxels/numpatches,1), 'times more voxels\n'
))
round(numvoxels/numpatches,1), 'times more voxels'
), type='tail')
}

output = list(
Expand Down
14 changes: 7 additions & 7 deletions R/lesyload_mricron.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,29 @@ lesyload_mricron <- function(valfile, imageFolder=NA, returnFilenames=F, checkHe
stop(paste0(' Some of the files are not found:\n', paste(basename(valdata$ImageName[!existindx]), collapse='\n')))
}

if (showInfo) cat('All files found.\n')
if (showInfo) printInfo('All files found.')

# all files are there, check their headers
if (checkHeaders) {
if (showInfo) cat('Checking for unusual images...')
if (showInfo) printInfo('Checking for unusual images...', type='head')
checkFilenameHeaders(files = valdata$ImageName, showError = F)
if (showInfo) cat('all headers identical.\n')
if (showInfo) printInfo('all headers identical.', type='tail')
}

# prepare lesions output
if (returnFilenames) {
if (showInfo) cat('Filenames will be returned.\n')
if (showInfo) printInfo('Filenames will be returned.')
lesions = valdata$ImageName
} else {
if (showInfo) cat('Image list will be returned, please wait...')
if (showInfo) printInfo('Image list will be returned, please wait...', type='head')
lesions = imageFileNames2ImageList(valdata$ImageName)
if (showInfo) cat('all loaded.\n')
if (showInfo) printInfo('all loaded.', type='tail')
}

# prepare behavior output
behavior = valdata[,2]

if (showInfo) cat('You can now run lesymap with these data.\n')
if (showInfo) printInfo('You can now run lesymap with these data.')

invisible(gc())
return(list(lesions=lesions,
Expand Down
Loading

0 comments on commit 3aecc96

Please sign in to comment.