From colm.mcginnity at kcl.ac.uk Fri May 28 09:56:24 2021 From: colm.mcginnity at kcl.ac.uk (McGinnity, Colm) Date: Fri, 28 May 2021 13:56:24 +0000 Subject: [MINC-users] mnc2nii floating point exception Message-ID: Dear Experts, I am getting a 'Floating point exception' error when trying to convert a 4D .mnc file to a .nii file using mnc2nii. Can anyone tell me how to fix this, please? Thanks and best wishes, Colm From gabriel.devenyi at mcgill.ca Fri May 28 10:00:44 2021 From: gabriel.devenyi at mcgill.ca (Gabriel A. Devenyi) Date: Fri, 28 May 2021 10:00:44 -0400 Subject: [MINC-users] mnc2nii floating point exception In-Reply-To: References: Message-ID: Hi, Can you please open an issue with full technical details at https://github.com/BIC-MNI/minc-tools -------------------------------------------------------- Asking for technical help? Get help fast: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html http://www.catb.org/~esr/faqs/smart-questions.html#beprecise https://en.wikipedia.org/wiki/XY_problem https://stackoverflow.com/help/minimal-reproducible-example -- Gabriel A. Devenyi Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute Affiliate, Department of Psychiatry McGill University t: 514.761.6131x4781 e: gabriel.devenyi at mcgill.ca On Fri, 28 May 2021 at 09:56, McGinnity, Colm wrote: > Dear Experts, > > I am getting a 'Floating point exception' error when trying to convert a > 4D .mnc file to a .nii file using mnc2nii. Can anyone tell me how to fix > this, please? > Thanks and best wishes, > Colm > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > https://mailman.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From vladimir.fonov at gmail.com Fri May 28 14:00:28 2021 From: vladimir.fonov at gmail.com (Vladimir S. FONOV) Date: Fri, 28 May 2021 14:00:28 -0400 Subject: [MINC-users] mnc2nii floating point exception In-Reply-To: References: Message-ID: Are you using 1.9.18 version of minc-toolkit? It might have been fixed in https://github.com/BIC-MNI/minc-tools/issues/109 On Fri, May 28, 2021 at 9:57 AM McGinnity, Colm wrote: > Dear Experts, > > I am getting a 'Floating point exception' error when trying to convert a > 4D .mnc file to a .nii file using mnc2nii. Can anyone tell me how to fix > this, please? > Thanks and best wishes, > Colm > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > https://mailman.bic.mni.mcgill.ca/mailman/listinfo/minc-users > -- Best regards, Vladimir S. Fonov ~ vladimir fonov gmail com From zijdenbos at gmail.com Mon May 31 23:30:47 2021 From: zijdenbos at gmail.com (Alex Zijdenbos) Date: Mon, 31 May 2021 23:30:47 -0400 Subject: [MINC-users] Odd behaviour with recent versions of dcm2mnc/mincreshape Message-ID: Hi all, Stumbled into something rather strange: $ dcm2mnc DICOM/ADNI_126_S_0709_MR_IR-FSPGR-Repeat MINC_dcm2mnc_2.3.01 $ mincheader MINC_dcm2mnc_2.3.01/*/*mnc | grep spacing xspace:spacing = "regular__" ; yspace:spacing = "regular__" ; zspace:spacing = "regular__" ; $ mincreshape MINC_dcm2mnc_2.3.01/*/*mnc MINC_dcm2mnc_2.3.01/reshaped.mnc $ mincheader MINC_dcm2mnc_2.3.01/reshaped.mnc | grep spacing xspace:spacing = "yspace" ; yspace:spacing = "yspace" ; zspace:spacing = "yspace" ; In other words, the :spacing attribute gets mangled by what *should* be a no-op. This is using: $ dcm2mnc -version program: 2.3.01 built Dec 10 2020 01:01:35 libminc: 2.4.03 netcdf : 4.5.0 of Jun 26 2018 10:58:21 $ HDF5 : 1.8.20 If I do the exact same thing with this older version: $ dcm2mnc -version program: 2.0.07 built Mar 19 2014 16:54:51 libminc: 2.2.00 netcdf : 3.6.1 of Mar 19 2014 16:53:18 $ HDF5 : 1.8.9 All seems to work as expected (all :spacing attributes remain "regular__"). Doing a quick comparison of the headers of the MINC volumes generated by these two versions of dcm2mnc, a few differences appear: $ diff <( mincheader MINC_dcm2mnc_2.0.07/*/*.mnc | grep spac | sort) <( mincheader MINC_dcm2mnc_2.3.01/*/*.mnc | grep spac | sort) 3c3 < double xspace(xspace) ; --- > double xspace ; 10d9 < xspace = -100.899, -99.6994, -98.4994, -97.2994, -96.0994, -94.8994, 11a11 > xspace = 97.1005 ; 14d13 < xspace:dimorder = "xspace" ; Further, if I use the "new" mincreshape on the "old" volume or vice versa, the spacing attributes remain "regular__". It's only the combination of both "new" dcm2mnc and "new" mincreshape that results in this. Unfortunately I can't actually distribute the source data, but it is ADNI data, and this is not an isolated case - this pretty much happens on most volumes that I pick up. Anybody any idea what we might be looking at here? Thanks, -- A