File: RImageListArguments.R

package info (click to toggle)
simpleitk 1.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 75,056 kB
  • sloc: cpp: 25,403; python: 3,060; sh: 1,131; ansic: 369; java: 260; cs: 215; makefile: 51; ruby: 47; tcl: 22
file content (18 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
## tests of image pixel access.
## helps to check whether the rtype entries for std:vector in R.i are OK.
library(SimpleITK)

imsize <- 64
img1 = Image(imsize, imsize, "sitkFloat32")
img2 = Image(imsize, imsize, "sitkFloat32")

arglist <- list(img1, img2, img1)

h<-Tile(arglist, c(length(arglist),1))
sz <- h$GetSize()

if (any(sz != c(imsize*length(arglist), imsize)))
{
    cat("Failure in tiling with image list arguments\n")
    quit(save="no", status=1)
}