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

Can't read MNC file #67

Open
muschellij2 opened this issue Nov 7, 2018 · 3 comments
Open

Can't read MNC file #67

muschellij2 opened this issue Nov 7, 2018 · 3 comments

Comments

@muschellij2
Copy link
Collaborator

Should ANTsRCore be able to read in MNC files? If so, tried one out with colin27 minc from http://www.bic.mni.mcgill.ca/ServicesAtlases/Colin27 and got an error.

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
destfile = tempfile(fileext = ".zip")
url = "http://packages.bic.mni.mcgill.ca/mni-models/colin27/mni_colin27_1998_minc1.zip"
download.file(url = url, destfile = destfile)

unz = unzip(zipfile = destfile, exdir = tempdir())
img_file = unz[grepl("lin[.]mnc", unz)]

And reading in get an exception:

antsImageRead(img_file)

with the following error

/private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmp33R8iu/R.INSTALL130672b38673/ITKR/src/itks/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c:1400 (from MINC): Unable to open file '/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmpcMWu95/colin27_t1_tal_lin.mnc'
ExceptionObject caught !

itk::ExceptionObject (0x7f965a3324e8)
Location: "unknown" 
File: /private/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T/Rtmp33R8iu/R.INSTALL130672b38673/ITKR/src/itks/Modules/IO/MINC/src/itkMINCImageIO.cxx
Line: 301
Description: itk::ERROR: MINCImageIO(0x7f965a30ca50): Could not open file "/var/folders/1s/wrtqcpxn685_zk570bnx9_rr0000gr/T//RtmpcMWu95/colin27_t1_tal_lin.mnc".


libc++abi.dylib: terminating with uncaught exception of type Rcpp::exception: ITK exception caught
Abort trap: 6

Created on 2018-11-07 by the reprex package (v0.2.1)

@stnava
Copy link
Member

stnava commented Nov 7, 2018 via email

@gdevenyi
Copy link

gdevenyi commented Nov 8, 2018

We are most certainly interested in ANTsR supporting MINC. We recently had some discussions on the RMINC github regarding moving closer to the ITK reader family to support more filetypes and one option brought up was to use the ANTsR core Mouse-Imaging-Centre/RMINC#239

@vfonov
Copy link

vfonov commented Nov 14, 2018

It's in MINC1 format. ITK (if using built-in MINC IO ) is only able to read/write MINC2 files.

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

4 participants