[MINC-users] MINC-users Digest, Vol 68, Issue 24

Thomas Funck thomas.funck at mail.mcgill.ca
Mon Apr 4 10:24:03 EDT 2011


Hi, 

I'm having trouble creating a 4 dimensional volume with the function micreate_volume, the function returns -1 whenever I try to use it . I'm basically using the exact same code as is contained in the minc2 tutorials, except that I changed the type from ubyte to double (it doesn't work with either type). The strange thing is that the function works fine for 3 dimensional volumes. I'm sure that the dimensions are set correctly so that isn't the problem. Any ideas what's causing this? 

Many thanks,

Thomas


P.S.
Here are the lines of code in question:

  mihandle_t    minc_volume, new_volume;
  midimhandle_t dimensions[4];
  unsigned int  sizes[4];

  
   miopen_volume(argv[1], MI2_OPEN_READ, &minc_volume);

  miget_volume_dimensions(minc_volume, MI_DIMCLASS_ANY, MI_DIMATTR_ALL, MI_DIMORDER_FILE,  4, dimensions);
  miget_dimension_sizes(dimensions, 4, sizes);
 
  micreate_volume(argv[2], 4, dimensions, MI_TYPE_DOUBLE,MI_CLASS_REAL, NULL, &new_volume)


More information about the MINC-users mailing list