[MINC-users] miopen_volume not opening file

EJ Nikelski nikelski at bic.mni.mcgill.ca
Thu Mar 17 17:09:37 EDT 2011


Hi Thomas,

  Could you provide the output of the following:

(1) mincinfo -version
(2) uname -a
(3) file my_test_minc_volume.mnc
(4) mincinfo my_test_minc_volume.mnc

  Which version of Ubuntu are you using?

-jim



On Thu, Mar 17, 2011 at 12:09 PM, Thomas Funck
<thomas.funck at mail.mcgill.ca> wrote:
> Hi,
>
> So this is my second problem of the day. I'm writing a program that requires reading .mnc files. However when I try to use miopen_volume it returns -1. I even tried running the first mini-program included in the MINC2 tutorials (code included below) and miopen_volume did not work here either. I'm assuming the code from the tutorial is correct and that there is some underlying problem with HDF5 or MINC2. I just reinstalled the latest versions of MINC2 (version 2.1) and HDF5 (version 1.8.6) on my Ubuntu system. I also ran "make check" on both before installing and they passed all the tests, so both libraries seem to be happy with the system. I really can't figure out what's going on because the programs and code should both be okay. Any ideas?
>
> Best,
>
> Thomas
>
>
>
>
>
> #include <minc2.h>
> #include <stdio.h>
>
> int main(int argc, char **argv) {
>  mihandle_t    minc_volume;
>  double        voxel;
>  int           result;
>  unsigned long location[3];
>
>  /* open the volume - first and only command line argument */
>  result = miopen_volume(argv[1], MI2_OPEN_READ, &minc_volume);
>  /* check for error on opening */
>  if (result != MI_NOERROR) {
>    fprintf(stderr, "Error opening input file: %d.\n", result);
>  }
>
>  return(0);
> }
>

-- 
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University


More information about the MINC-users mailing list