Skip to content

Commit

Permalink
Ready for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Jan 13, 2025
1 parent 35fd2a9 commit feacc0f
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 11 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ieegio
Title: File IO for Intracranial Electroencephalography
Version: 0.0.2.9011
Version: 0.0.3
Language: en-US
Encoding: UTF-8
Authors@R:
Expand Down
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# ieegio 0.0.3

* Cleaned `h5py` loader
* `mat_to_quaternion` always returns non-negative `w` now
* Added generics `dim` and `length` to volume object
* Fixed annotation issues in `EDF` format
* Time selection is double-sided using greater equal and less equal signs
* Added more sample data
* Supports colored (`RGB[A]`) formats
* Fixed color intensity when `cal_min` and `cal_max` is set
* Using `r3js` for visualizing surfaces
* Added `resample_volume` to sample images (currently only nearest neighbor)
* Added `burn_volume` to burn contacts (positions given in the image native `RAS` coordinate) with any given colors
* Fixed `io_h5_names` returning wrong names when using with `h5py`
* Exported internal class `LazyH5` for down-stream packages
* Added `as_ieegio_volume` and `as_ieegio_surface` to enclose volume or surface data
* Added a flag to disable using `Python`


# ieegio 0.0.2

* Added `h5py` as an alternative back-end support
Expand Down
7 changes: 5 additions & 2 deletions R/aaa-generics-surface.R
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,8 @@ plot.ieegio_surface <- function(
#' @param name name of the data; default is the file name
#' @param ... for \code{read_surface}, the arguments will be passed to
#' \code{io_read_fs} if the file is a 'FreeSurfer' file.
#' @returns A surface object container
#' @returns A surface object container for \code{read_surface}, and
#' the file path for \code{write_surface}
#' @examples
#'
#'
Expand Down Expand Up @@ -888,7 +889,7 @@ write_surface <- function(

if(format == "gifti") {
re <- io_write_gii(x = x, con = con, ...)
return(re)
return(invisible(re))
}

type <- match.arg(type)
Expand Down Expand Up @@ -981,6 +982,8 @@ write_surface <- function(
}
)

invisible(con)

}


Expand Down
7 changes: 5 additions & 2 deletions R/aaa-generics-volume.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ names.ieegio_volume <- function(x) {
#' @param datatype_code,xyzt_units,intent_code additional flags for
#' 'NIfTI' headers, for advanced users
#' @param ... passed to other methods
#' @returns imaging readers return \code{ieegio_volume} objects.
#' @returns Imaging readers return \code{ieegio_volume} objects. The writers
#' return the file path to where the file is saved to.
#'
#' @examples
#'
Expand Down Expand Up @@ -662,7 +663,7 @@ plot.ieegio_volume <- function(
main = main
)
}
vox_data <- t(vox_data)[ncol(vox_data):1L, , drop = FALSE]
vox_data <- t(vox_data)[rev(seq_len(ncol(vox_data))), , drop = FALSE]
if(!is.na(alpha)) {
alpha_255 <- floor(alpha * 255)
alpha_255[alpha_255 < 0] <- 0
Expand Down Expand Up @@ -845,6 +846,8 @@ length.ieegio_volume <- function(x) {
#' as array of colors; default is true when \code{x} is a raster matrix (
#' matrix of color strings) and false when \code{x} is not a character array.
#'
#' @returns An \code{ieegio} volume object; see \code{\link{imaging-volume}}
#'
#' @examples
#'
#'
Expand Down
4 changes: 3 additions & 1 deletion R/hdf5-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ h5FileValid <- function(filename){
}

#' @title Lazy 'HDF5' file loader
#' @description provides hybrid data structure for 'HDF5' file
#' @description Provides hybrid data structure for 'HDF5' file. The class is
#' not intended for direct-use. Please see \code{\link{io_read_h5}} and
#' \code{\link{io_write_h5}}.
#' @export
LazyH5 <- R6::R6Class(
classname = 'LazyH5',
Expand Down
2 changes: 1 addition & 1 deletion R/math-volume.R
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ resample_vox2ras <- function(vox2ras, old_dim, new_dim) {
#' is an array
#' @param preview indices (integer) of the position to visualize; default is
#' \code{NULL} (no preview)
#' @returns Color image that is burnt
#' @returns Color image that is burnt; see \code{\link{imaging-volume}}.
#'
#' @examples
#'
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Neuroimaging
PyNWB
RAS
YAML
affine
cloneable
iEEG
json
4 changes: 3 additions & 1 deletion man/LazyH5.Rd

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

3 changes: 3 additions & 0 deletions man/as_ieegio_volume.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/burn_volume.Rd

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

3 changes: 2 additions & 1 deletion man/imaging-surface.Rd

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

3 changes: 2 additions & 1 deletion man/imaging-volume.Rd

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

0 comments on commit feacc0f

Please sign in to comment.