Skip to content

Commit

Permalink
updated the thing
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Oct 17, 2018
1 parent 7c8c4c6 commit bf35472
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Authors@R: c(person("Jon","Clayden",role=c("cre","aut"),email="code@clayden.org"
person("Kate","Fissell",role="ctb"),
person("Jean-loup","Gailly",role="cph"),
person("Mark","Adler",role="cph"))
Imports: Rcpp (>= 0.11.0)
Imports: Rcpp (>= 0.11.0), methods
Suggests: testthat (>= 0.11.0), covr, reportr
Enhances: oro.nifti, tractor.base
LinkingTo: Rcpp
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export(voxelToWorld)
export(worldToVoxel)
export(writeNifti)
export(xform)
exportClasses(internalImage)
exportClasses(niftiImage)
import(methods)
importFrom(Rcpp,evalCpp)
importFrom(utils,object.size)
useDynLib(RNifti)
10 changes: 9 additions & 1 deletion R/image.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#' @param ... Additional parameters to methods. Currently unused.
#'
#' @author Jon Clayden <code@@clayden.org>
#' @aliases internalImage
#' @rdname internalImage
#' @export
dim.internalImage <- function (x)
Expand All @@ -27,6 +26,15 @@ dim.internalImage <- function (x)
stop("Dimensions of an internal image cannot be changed")
}


#' @name internalImage-class
#' @aliases internalImage
#'
#' @rdname internalImage
#' @exportClass internalImage
setOldClass("internalImage")


#' @rdname internalImage
#' @export
as.array.internalImage <- function (x, ...)
Expand Down
2 changes: 1 addition & 1 deletion R/is_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @export
#'
#' @examples
#' file = system.file("extdata", "example.nii.gz")
#' file = system.file("extdata", "example.nii.gz", package = "RNifti")
#' is.niftiImage(file)
#' img = readNifti(file)
#' is.niftiImage(img)
Expand Down
11 changes: 11 additions & 0 deletions R/niftiImage_class.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#' "niftiImage" class
#'
#' @name niftiImage-class
#' @aliases niftiImage
#' @family niftiImage
#'
#' @import methods
#'
#' @exportClass niftiImage
setOldClass("niftiImage")

3 changes: 2 additions & 1 deletion man/internalImage.Rd

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

2 changes: 1 addition & 1 deletion man/is_class.Rd

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

10 changes: 10 additions & 0 deletions man/niftiImage-class.Rd

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

0 comments on commit bf35472

Please sign in to comment.