From 6414c633ee92d8200cad8df3f41e269eda8769fa Mon Sep 17 00:00:00 2001 From: Nick Tustison Date: Sat, 6 Apr 2024 17:52:52 -0700 Subject: [PATCH] COMP: Deal with recent ANTsR/ANTsRCore changes. --- NAMESPACE | 30 ---------------------------- R/applyDBPN4x.R | 4 ---- R/randomImageTransformAugmentation.R | 3 --- R/randomlyTransformImageData.R | 2 -- R/reconstructImageFromPatches.R | 1 - R/unetUtilities.R | 1 - R/uvaSeg.R | 1 - 7 files changed, 42 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index f3841ccf..20d66369 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -204,36 +204,6 @@ export(weighted_categorical_crossentropy) export(wholeHeadInpainting) export(wmhSegmentation) import(keras) -importFrom(ANTsR,composeTransformsToField) -importFrom(ANTsR,getCenterOfMass) -importFrom(ANTsR,simulateDisplacementField) -importFrom(ANTsRCore,antsAverageImages) -importFrom(ANTsRCore,antsCopyImageInfo) -importFrom(ANTsRCore,antsGetDirection) -importFrom(ANTsRCore,antsGetOrigin) -importFrom(ANTsRCore,antsGetSpacing) -importFrom(ANTsRCore,antsImagePhysicalSpaceConsistency) -importFrom(ANTsRCore,antsSetSpacing) -importFrom(ANTsRCore,antsTransformIndexToPhysicalPoint) -importFrom(ANTsRCore,antsrTransformFromDisplacementField) -importFrom(ANTsRCore,applyAntsrTransform) -importFrom(ANTsRCore,as.antsImage) -importFrom(ANTsRCore,composeAntsrTransforms) -importFrom(ANTsRCore,createAntsrTransform) -importFrom(ANTsRCore,getAntsrTransformFixedParameters) -importFrom(ANTsRCore,getAntsrTransformParameters) -importFrom(ANTsRCore,iMath) -importFrom(ANTsRCore,labelStats) -importFrom(ANTsRCore,makeImage) -importFrom(ANTsRCore,mergeChannels) -importFrom(ANTsRCore,randomMask) -importFrom(ANTsRCore,readAntsrTransform) -importFrom(ANTsRCore,resampleImage) -importFrom(ANTsRCore,resampleImageToTarget) -importFrom(ANTsRCore,setAntsrTransformFixedParameters) -importFrom(ANTsRCore,setAntsrTransformParameters) -importFrom(ANTsRCore,smoothImage) -importFrom(ANTsRCore,splitChannels) importFrom(R6,R6Class) importFrom(Rcpp,cppFunction) importFrom(Rcpp,sourceCpp) diff --git a/R/applyDBPN4x.R b/R/applyDBPN4x.R index cb4dd5ba..b7a57466 100644 --- a/R/applyDBPN4x.R +++ b/R/applyDBPN4x.R @@ -73,10 +73,6 @@ linMatchIntensity <- function( fromImg, toImg, polyOrder = 1, truncate = TRUE, m #' plot(img) #' plot(simg) #' } -#' @importFrom ANTsRCore antsCopyImageInfo antsSetSpacing -#' @importFrom ANTsRCore splitChannels antsAverageImages -#' @importFrom ANTsRCore antsTransformIndexToPhysicalPoint -#' @importFrom ANTsRCore antsTransformIndexToPhysicalPoint #' @export applySuperResolutionModel applySuperResolutionModel <- function( image, diff --git a/R/randomImageTransformAugmentation.R b/R/randomImageTransformAugmentation.R index 72495b5c..4870229b 100644 --- a/R/randomImageTransformAugmentation.R +++ b/R/randomImageTransformAugmentation.R @@ -34,9 +34,6 @@ #' @seealso \code{\link{randomImageTransformBatchGenerator}} #' @importFrom mvtnorm rmvnorm #' @importFrom stats sd -#' @importFrom ANTsR getCenterOfMass -#' @importFrom ANTsRCore getAntsrTransformFixedParameters iMath resampleImageToTarget composeAntsrTransforms applyAntsrTransform antsGetSpacing antsImagePhysicalSpaceConsistency antsrTransformFromDisplacementField makeImage smoothImage setAntsrTransformFixedParameters getAntsrTransformParameters setAntsrTransformParameters readAntsrTransform createAntsrTransform randomMask mergeChannels -#' @importFrom ANTsR composeTransformsToField #' @importFrom stats rnorm #' @examples #' diff --git a/R/randomlyTransformImageData.R b/R/randomlyTransformImageData.R index b8fc1d3a..65834755 100644 --- a/R/randomlyTransformImageData.R +++ b/R/randomlyTransformImageData.R @@ -41,8 +41,6 @@ #' \"nearestNeighbor\". #' @return list (if no directory set) or boolean for success, failure #' @author Avants BB, Tustison NJ -#' @importFrom ANTsRCore getAntsrTransformFixedParameters iMath resampleImageToTarget applyAntsrTransform antsImagePhysicalSpaceConsistency antsrTransformFromDisplacementField makeImage smoothImage setAntsrTransformFixedParameters getAntsrTransformParameters setAntsrTransformParameters readAntsrTransform createAntsrTransform randomMask mergeChannels -#' @importFrom ANTsR composeTransformsToField simulateDisplacementField #' @importFrom stats rnorm #' @examples #' diff --git a/R/reconstructImageFromPatches.R b/R/reconstructImageFromPatches.R index e6a18ce7..abc36a7f 100644 --- a/R/reconstructImageFromPatches.R +++ b/R/reconstructImageFromPatches.R @@ -24,7 +24,6 @@ #' rm(image); gc() #' rm(patchSet); gc() #' rm(imageReconstructed); gc() -#' @importFrom ANTsRCore as.antsImage #' @export reconstructImageFromPatches <- function( patches, domainImage, strideLength = 1, domainImageIsMask = FALSE ) diff --git a/R/unetUtilities.R b/R/unetUtilities.R index 658cd7d3..8e7e418b 100644 --- a/R/unetUtilities.R +++ b/R/unetUtilities.R @@ -65,7 +65,6 @@ encodeUnet <- function( segmentationsArray, segmentationLabels = NULL ) #' @importFrom stats predict #' @importFrom stats kmeans #' @importFrom magrittr %>% -#' @importFrom ANTsRCore as.antsImage #' @export decodeUnet <- function( yPredicted, domainImage ) { diff --git a/R/uvaSeg.R b/R/uvaSeg.R index c6b98546..b573731d 100644 --- a/R/uvaSeg.R +++ b/R/uvaSeg.R @@ -307,7 +307,6 @@ uvaSegTrain <- function( patches, #' @export uvaSeg #' @importFrom Rcpp cppFunction sourceCpp #' @importFrom utils download.file -#' @importFrom ANTsRCore antsGetDirection antsGetOrigin resampleImage labelStats uvaSeg <- function( image, model,