Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operations on multi-channel images #90

Open
muschellij2 opened this issue Jun 19, 2019 · 0 comments
Open

Operations on multi-channel images #90

muschellij2 opened this issue Jun 19, 2019 · 0 comments

Comments

@muschellij2
Copy link
Collaborator

Need to extend scalars to vector of same length for multi-channel images:

library(ANTsRCore)
#> 
#> Attaching package: 'ANTsRCore'
#> The following objects are masked from 'package:stats':
#> 
#>     sd, var
#> The following objects are masked from 'package:base':
#> 
#>     all, any, apply, max, min, prod, range, sum
fname = system.file("extdata", "multi_component_image.nii.gz", package="ANTsRCore")
img = ANTsRCore::antsImageRead(fname)
img > 0
#> Invalid S4 object type in itk::Image<float,2>::Pointer Rcpp::as()
#> [1] NA
img > c(0, 0)
#> antsImage
#>   Pixel Type          : float 
#>   Components Per Pixel: 3 
#>   Dimensions          : 30x30 
#>   Voxel Spacing       : 1xNA 
#>   Origin              : 0 NA 
#>   Direction           : 1 0 0 1

Created on 2019-06-19 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant