Skip to content

Commit

Permalink
Fixing pixdim.
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Dec 8, 2017
1 parent 6942904 commit 72b1ded
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ exportMethods(emptyImageDimensionsMask)
exportMethods(maskEmptyImageDimensions)
exportMethods(origin)
exportMethods(ortho2)
exportMethods(pixdim)
exportMethods(resample_image)
exportMethods(resample_to_target)
exportMethods(subset_4d)
Expand Down Expand Up @@ -134,7 +133,6 @@ importFrom(ANTsRCore,smoothImage)
importFrom(R.matlab,readMat)
importFrom(R.matlab,writeMat)
importFrom(R.utils,extract.array)
importFrom(RNifti,pixdim)
importFrom(WhiteStripe,whitestripe)
importFrom(WhiteStripe,whitestripe_hybrid)
importFrom(WhiteStripe,whitestripe_norm)
Expand Down
7 changes: 5 additions & 2 deletions R/pixdim.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
#' @param object is an antsImage
#'
#' @importFrom oro.nifti pixdim
#' @importFrom RNifti pixdim
#' @importMethodsFrom oro.nifti pixdim
#'
#' @return Vector of numeric values
#' @export
#' @examples
#' library(ANTsRCore)
#' fn <- getANTsRData( "r16" )
#' fi <- antsImageRead( fn )
#' pixdim(fi)
setMethod("pixdim", "antsImage", function(object){
pdim = c(0, antsGetSpacing(object))
pdim = c(pdim, rep(1, length = max(0, 8 - length(pdim))))
Expand Down
6 changes: 6 additions & 0 deletions man/pixdim-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 72b1ded

Please sign in to comment.