From anthonin at biospective.com Mon May 10 22:27:44 2010 From: anthonin at biospective.com (Anthonin Reilhac) Date: Mon, 10 May 2010 22:27:44 -0400 Subject: [MINC-development] MINC1 & MINC2 Message-ID: Hi All, I have the following code that I like to be able to read minc1 and minc2 file using the minc1 API. ----------------------------------------------------------------------------------------------------------- #include #include [...] /* Open the minc file */ unc_infile = expand_filename(infile); if((fd = miopen(unc_infile, NC_NOWRITE)) == MI_ERROR) { fprintf(stderr, "Cannot open file %s.\n", unc_infile); return(NULL); } free(unc_infile); /* Get information about the image dimensions*/ if((vid = ncvarid(fd, MIimage)) == MI_ERROR) { fprintf(stderr, "Cannot find variable MIimage in minc file.\n"); return NULL; } [...] ----------------------------------------------------------------------------------------------------------------- I compiled it and linked it with libminc2, libvolume_io2, libnetcdf & libhdf5 It works fine with minc1 file but fails with minc2 files -> ncvarid: ncid 67108864: Not a netCDF id Interestingly enough this code also generates an output file (through the volume_io2 API though) which is in minc2. I understood from previous comments that the minc1 API should deal with minc2 files. Any clue^^ Thx. Anthonin -------------- next part -------------- An HTML attachment was scrubbed... URL: