Closed muschellij2 closed 1 month ago
R.matlab
says:
> readMat( "/mnt/c/Users/bavants/Downloads/matlab.mat")
Error in readMat5(con, firstFourBytes = firstFourBytes, maxLength = maxLength) :
Reading of MAT v7.3 files is not supported. If possible, save the data in MATLAB using 'save -V6'.
probably the same thing here but with a much worse message. reading a .mat written by ANTsR seems to work still.
Fails also with MAT version 6.0 files from MATLAB mv6.mat.gz :
R.matlab::readMat
workslibrary(R.matlab)
#> R.matlab v3.6.2 (2018-09-26) successfully loaded. See ?R.matlab for help.
#>
#> Attaching package: 'R.matlab'
#> The following objects are masked from 'package:base':
#>
#> getOption, isOpen
v = readMat("mv6.mat")
v$regcorr.chain[,,1:3]
#> , , 1
#>
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#>
#> , , 2
#>
#> [,1] [,2] [,3]
#> [1,] 1.000000000 0.00000000 0
#> [2,] 0.000000000 1.00000000 0
#> [3,] -0.005032132 -0.01083869 1
#>
#> , , 3
#>
#> [,1] [,2] [,3]
#> [1,] 1.000000000 0.00000000 0
#> [2,] 0.000000000 1.00000000 0
#> [3,] 0.009389645 0.01300057 1
Created on 2019-04-17 by the reprex package (v0.2.1)
library(ANTsRCore)
Attaching package: ‘ANTsRCore’
The following object is masked from ‘package:stats’:
var
The following objects are masked from ‘package:base’:
all, any, apply, max, min, prod, range, sum
readAntsrTransform("mv6.mat")
ITK ExceptionObject caught !
itk::ExceptionObject (0x7fab37061a20) Location: "unknown" File: /private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/RtmpgjAHcE/R.INSTALL101940f742b3/ITKR/src/itks/Modules/IO/TransformBase/src/itkTransformFileReader.cxx Line: 144 Description: itk::ERROR: TransformFileReaderTemplate(0x7fab372b0a90): Transform IO: MatlabTransformIOTemplate failed to read file: mv6.mat
libc++abi.dylib: terminating with uncaught exception of type Rcpp::exception: ITK exception caught Abort trap: 6
i dont think this is a proper transform file. at least not according to antsr/ants .... how was it created?
It's not one from ANTsR. I'm saying that ITK has a read function for MATLAB mat files that I thought ANTsR used to be able to read but the linking doesn't seem to work now. John
On Wed, Apr 17, 2019 at 3:47 PM stnava notifications@github.com wrote:
i dont think this is a proper transform file. at least not according to antsr/ants .... how was it created?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsRCore/issues/81#issuecomment-484234777, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIGPLVJ2SLQKZHCFCFX533PQ55EXANCNFSM4HGWTWEQ .
Ok: maybe test to see if old versions work?
On Wed, Apr 17, 2019 at 4:02 PM John Muschelli notifications@github.com wrote:
It's not one from ANTsR. I'm saying that ITK has a read function for MATLAB mat files that I thought ANTsR used to be able to read but the linking doesn't seem to work now. John
On Wed, Apr 17, 2019 at 3:47 PM stnava notifications@github.com wrote:
i dont think this is a proper transform file. at least not according to antsr/ants .... how was it created?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsRCore/issues/81#issuecomment-484234777, or mute the thread < https://github.com/notifications/unsubscribe-auth/AAIGPLVJ2SLQKZHCFCFX533PQ55EXANCNFSM4HGWTWEQ
.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsRCore/issues/81#issuecomment-484239603, or mute the thread https://github.com/notifications/unsubscribe-auth/AATyfmByopJ6WPZ_ETuFUbFv5iUYmMbSks5vh329gaJpZM4c1p2J .
--
brian
Couldn't read MATLAB transform with current ITKR/ANTsRCore build (installed using
devtools::install_github
):Tried locally on OSX machine (also installed using
devtools::install_github
)matlab.mat.gz