Converts a data type to the size and what
for
readBin
, necessary for Base64Binary
and
GZipBase64Binary
formats
convert_binary_datatype(
datatype = c("NIFTI_TYPE_UINT8", "NIFTI_TYPE_INT32", "NIFTI_TYPE_UINT32",
"NIFTI_TYPE_FLOAT32")
)
datatype | data type from GIFTI image |
---|
List of length 2: with elements of size and what
convert_binary_datatype()
#> $size
#> [1] 1
#>
#> $what
#> integer(0)
#>
convert_binary_datatype('NIFTI_TYPE_INT32')
#> $size
#> [1] 4
#>
#> $what
#> integer(0)
#>
testthat::expect_error(convert_binary_datatype('NIFTI_TYPE_BLAH'))