From ptcougopinto at gmail.com Thu Apr 7 08:59:13 2016 From: ptcougopinto at gmail.com (Pedro Telles Cougo Pinto) Date: Thu, 7 Apr 2016 09:59:13 -0300 Subject: [MINC-users] nii2mnc - Analyze - Bad header size Message-ID: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> Dear all I?m trying to convert some DTI white matter data from Analyze format, with the following message. (Data downloaded from LONI: http://loni.usc.edu/atlases/). ptcougopinto$ nii2mnc ICBM_DTI_81_WMPM.img icbm_dti_81_wmpm.mnc Bad header size!! orient = 0 Segmentation fault: 11 From robert.d.vincent at mcgill.ca Thu Apr 7 09:03:21 2016 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 7 Apr 2016 09:03:21 -0400 Subject: [MINC-users] nii2mnc - Analyze - Bad header size In-Reply-To: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> References: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> Message-ID: Thanks for the report, I'll look into this today. -bert On Thu, Apr 7, 2016 at 8:59 AM, Pedro Telles Cougo Pinto < ptcougopinto at gmail.com> wrote: > Dear all > > I?m trying to convert some DTI white matter data from Analyze format, with > the following message. (Data downloaded from LONI: > http://loni.usc.edu/atlases/). > > ptcougopinto$ nii2mnc ICBM_DTI_81_WMPM.img icbm_dti_81_wmpm.mnc > Bad header size!! > orient = 0 > nifti_type = 'ANALYZE-7.5' > header_filename = 'ICBM_DTI_81_WMPM.hdr' > image_filename = 'ICBM_DTI_81_WMPM.img' > image_offset = '0' > ndim = '4' > nx = '181' > ny = '217' > nz = '181' > nt = '1' > dx = '1' > dy = '1' > dz = '1' > dt = '1' > datatype = '2' > datatype_name = 'UINT8' > nvox = '7109137' > nbyper = '1' > byteorder = 'LSB_FIRST' > descrip = '/usr/local/air-5.2.5_64_8/bin/reorient' > num_ext = '0' > /> > Segmentation fault: 11 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From gdevenyi at gmail.com Thu Apr 7 09:28:21 2016 From: gdevenyi at gmail.com (Gabriel A. Devenyi) Date: Thu, 7 Apr 2016 09:28:21 -0400 Subject: [MINC-users] nii2mnc - Analyze - Bad header size In-Reply-To: References: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> Message-ID: In the meantime, you could try ana2mnc -- Gabriel A. Devenyi B.Eng. Ph.D. Research Computing Associate Computational Brain Anatomy Laboratory Cerebral Imaging Center Douglas Mental Health University Institute McGill University t: 514.761.6131x4781 e: gdevenyi at gmail.com On Thu, Apr 7, 2016 at 9:03 AM, Robert D. Vincent < robert.d.vincent at mcgill.ca> wrote: > Thanks for the report, I'll look into this today. > > -bert > > > On Thu, Apr 7, 2016 at 8:59 AM, Pedro Telles Cougo Pinto < > ptcougopinto at gmail.com> wrote: > > > Dear all > > > > I?m trying to convert some DTI white matter data from Analyze format, > with > > the following message. (Data downloaded from LONI: > > http://loni.usc.edu/atlases/). > > > > ptcougopinto$ nii2mnc ICBM_DTI_81_WMPM.img icbm_dti_81_wmpm.mnc > > Bad header size!! > > orient = 0 > > > nifti_type = 'ANALYZE-7.5' > > header_filename = 'ICBM_DTI_81_WMPM.hdr' > > image_filename = 'ICBM_DTI_81_WMPM.img' > > image_offset = '0' > > ndim = '4' > > nx = '181' > > ny = '217' > > nz = '181' > > nt = '1' > > dx = '1' > > dy = '1' > > dz = '1' > > dt = '1' > > datatype = '2' > > datatype_name = 'UINT8' > > nvox = '7109137' > > nbyper = '1' > > byteorder = 'LSB_FIRST' > > descrip = '/usr/local/air-5.2.5_64_8/bin/reorient' > > num_ext = '0' > > /> > > Segmentation fault: 11 > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From robert.d.vincent at mcgill.ca Thu Apr 7 11:09:43 2016 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Thu, 7 Apr 2016 11:09:43 -0400 Subject: [MINC-users] nii2mnc - Analyze - Bad header size In-Reply-To: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> References: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> Message-ID: Hi all, Sorry about that. There was some old code in there to convert Analyze but it had not been tested lately. I just fixed it and verified that it converts the files I just downloaded from LONI. I pushed the fix to the develop branch of https://github.com/BIC-MNI/minc-tools I'll add a TODO to write some regression tests for this... -bert On Thu, Apr 7, 2016 at 8:59 AM, Pedro Telles Cougo Pinto < ptcougopinto at gmail.com> wrote: > Dear all > > I?m trying to convert some DTI white matter data from Analyze format, with > the following message. (Data downloaded from LONI: > http://loni.usc.edu/atlases/). > > ptcougopinto$ nii2mnc ICBM_DTI_81_WMPM.img icbm_dti_81_wmpm.mnc > Bad header size!! > orient = 0 > nifti_type = 'ANALYZE-7.5' > header_filename = 'ICBM_DTI_81_WMPM.hdr' > image_filename = 'ICBM_DTI_81_WMPM.img' > image_offset = '0' > ndim = '4' > nx = '181' > ny = '217' > nz = '181' > nt = '1' > dx = '1' > dy = '1' > dz = '1' > dt = '1' > datatype = '2' > datatype_name = 'UINT8' > nvox = '7109137' > nbyper = '1' > byteorder = 'LSB_FIRST' > descrip = '/usr/local/air-5.2.5_64_8/bin/reorient' > num_ext = '0' > /> > Segmentation fault: 11 > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From ptcougopinto at gmail.com Thu Apr 7 15:30:29 2016 From: ptcougopinto at gmail.com (Pedro Telles Cougo Pinto) Date: Thu, 7 Apr 2016 16:30:29 -0300 Subject: [MINC-users] nii2mnc - Analyze - Bad header size In-Reply-To: References: <34B84266-4BD9-4F24-8FA9-C9BD089490BD@gmail.com> Message-ID: <0E5A176C-581C-4737-82D9-C2BE37D1B453@gmail.com> Thanks everyone. ana2mnc worked. > On Apr 7, 2016, at 12:09, Robert D. Vincent wrote: > > Hi all, > > Sorry about that. There was some old code in there to convert Analyze but > it had not been tested lately. I just fixed it and verified that it > converts the files I just downloaded from LONI. I pushed the fix to the > develop branch of https://github.com/BIC-MNI/minc-tools > > I'll add a TODO to write some regression tests for this... > > -bert > > On Thu, Apr 7, 2016 at 8:59 AM, Pedro Telles Cougo Pinto < > ptcougopinto at gmail.com> wrote: > >> Dear all >> >> I?m trying to convert some DTI white matter data from Analyze format, with >> the following message. (Data downloaded from LONI: >> http://loni.usc.edu/atlases/). >> >> ptcougopinto$ nii2mnc ICBM_DTI_81_WMPM.img icbm_dti_81_wmpm.mnc >> Bad header size!! >> orient = 0 >> > nifti_type = 'ANALYZE-7.5' >> header_filename = 'ICBM_DTI_81_WMPM.hdr' >> image_filename = 'ICBM_DTI_81_WMPM.img' >> image_offset = '0' >> ndim = '4' >> nx = '181' >> ny = '217' >> nz = '181' >> nt = '1' >> dx = '1' >> dy = '1' >> dz = '1' >> dt = '1' >> datatype = '2' >> datatype_name = 'UINT8' >> nvox = '7109137' >> nbyper = '1' >> byteorder = 'LSB_FIRST' >> descrip = '/usr/local/air-5.2.5_64_8/bin/reorient' >> num_ext = '0' >> /> >> Segmentation fault: 11 >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From trisanna.sprung-much at mail.mcgill.ca Tue Apr 12 13:06:38 2016 From: trisanna.sprung-much at mail.mcgill.ca (Trisanna Sprung-Much) Date: Tue, 12 Apr 2016 13:06:38 -0400 Subject: [MINC-users] Freesurfer Message-ID: Hello I am a graduate student in the lab of Michael Petrides and I am curious as to whether anyone has a decent amount of knowledge about Freesurfer. I have been slowly learning how to use it, using the youtube videos and wiki page available, and also the email list. However, I have a specific question regarding some labels I have created in Display and the email list has not been successful. Any help would be greatly appreciated! best wishes Trisanna Sprung-Much -- Ph.D. Candidate McGill University Integrated Program in Neuroscience Psychology From mishkind at gmail.com Tue Apr 12 15:56:40 2016 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 12 Apr 2016 09:56:40 -1000 Subject: [MINC-users] Freesurfer In-Reply-To: References: Message-ID: Hi Trisanna, Best to actually post your question. I have a bit of experience but it is from 5 years ago now, so using FreeSurfer v4.5 and v5.0. mishkin On Tue, Apr 12, 2016 at 7:06 AM, Trisanna Sprung-Much wrote: > Hello > > I am a graduate student in the lab of Michael Petrides and I am curious as > to whether anyone has a decent amount of knowledge about Freesurfer. I have > been slowly learning how to use it, using the youtube videos and wiki page > available, and also the email list. However, I have a specific question > regarding some labels I have created in Display and the email list has not > been successful. > > Any help would be greatly appreciated! > > best wishes > > Trisanna Sprung-Much > > > -- > Ph.D. Candidate > McGill University > Integrated Program in Neuroscience > Psychology > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From trisanna.sprung-much at mail.mcgill.ca Tue Apr 12 16:30:32 2016 From: trisanna.sprung-much at mail.mcgill.ca (Trisanna Sprung-Much) Date: Tue, 12 Apr 2016 16:30:32 -0400 Subject: [MINC-users] Freesurfer In-Reply-To: References: Message-ID: Thanks Mishkin, I haven't had much luck with posting questions so was hoping I could meet with someone in person at the MNI: Specifically - I have labels that have been painted on the T1 volumes of several ICBM brains in Display. While I am going to be generating some probability maps using this data in MNI space, I would like to generate surfaces for the brains in Freesurfer (which I am in the process of doing) and generate probability maps using a surface-based registration, as I think the maps would be much more accurate. I have been told to use the *mrivol2surf command *to put the labels onto the Freesurfer surfaces, but need a .dat file containing information about the registration matrix to run this command: mri_vol2surf [] --src inputfile --out outpufile --srcreg registrationfile --hemi hemisphere I do not have any dat files when I run recon-all and so was told to generate the dat files using *mri152reg*. However, most of my ICBM brains are registered to the MNI305 template and so my labels are in this space. The mri152reg would only work for the 5 brains that I have that are registered to ICBM152 nonlinear template. (Essentially, these brains were passed on to me from another student and so are registered to various templates) *To start, any idea how to get the labels.mnc onto my Freesurfer surfaces?* thanks so much, Trisanna -- Ph.D. Candidate McGill University Integrated Program in Neuroscience Psychology On Tue, Apr 12, 2016 at 3:56 PM, Mishkin Derakhshan wrote: > Hi Trisanna, > Best to actually post your question. I have a bit of experience but it > is from 5 years ago now, so using FreeSurfer v4.5 and v5.0. > mishkin > > > On Tue, Apr 12, 2016 at 7:06 AM, Trisanna Sprung-Much > wrote: > > Hello > > > > I am a graduate student in the lab of Michael Petrides and I am curious > as > > to whether anyone has a decent amount of knowledge about Freesurfer. I > have > > been slowly learning how to use it, using the youtube videos and wiki > page > > available, and also the email list. However, I have a specific question > > regarding some labels I have created in Display and the email list has > not > > been successful. > > > > Any help would be greatly appreciated! > > > > best wishes > > > > Trisanna Sprung-Much > > > > > > -- > > Ph.D. Candidate > > McGill University > > Integrated Program in Neuroscience > > Psychology > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From mishkind at gmail.com Tue Apr 12 22:14:35 2016 From: mishkind at gmail.com (Mishkin Derakhshan) Date: Tue, 12 Apr 2016 16:14:35 -1000 Subject: [MINC-users] Freesurfer In-Reply-To: References: Message-ID: I'm afraid I don't have the specific answers to your mri_vol2surf questions but maybe this will help. When I did my analyses, I took the freesurfer surfaces and transformed them into my native mnc space (i.e., the space where your input T1.mnc.gz is in which should be the same as your labels.mnc). The key transformation, (really just a translation) that I needed was: ${cras} = `mri_info --cras T1.mnc`; chomp(${cras}); &cmd("param2xfm -translation ${cras} fs-to-minc.xfm"); And then I would apply that trasnformation to the freesurfer object to get that object into my native mnc space. Following that logic, all you might need to do is: ${cras} = `mri_info --cras T1.mnc`; chomp(${cras}); &cmd("param2xfm -translation ${cras} fs-to-minc.xfm"); &cmd("xfminvert fs-to-minc.xfm minc-to-fs.xfm"); And then minc-to-fs.xfm would be the transformation to take you from your native minc space into your native freesurfer space (i.e., the same space as your T1.mgz file). If the freesurfer tools don't accept a .xfm file, it shouldn't be hard to create a .dat file using the data in the .xfm. hth, mishkin On Tue, Apr 12, 2016 at 10:30 AM, Trisanna Sprung-Much wrote: > Thanks Mishkin, > > I haven't had much luck with posting questions so was hoping I could meet > with someone in person at the MNI: > > Specifically - I have labels that have been painted on the T1 volumes of > several ICBM brains in Display. While I am going to be generating some > probability maps using this data in MNI space, I would like to generate > surfaces for the brains in Freesurfer (which I am in the process of doing) > and generate probability maps using a surface-based registration, as I > think the maps would be much more accurate. > > I have been told to use the *mrivol2surf command *to put the labels onto > the Freesurfer surfaces, but need a .dat file containing information about > the registration matrix to run this command: > > mri_vol2surf [] --src inputfile --out outpufile --srcreg > registrationfile --hemi hemisphere > > I do not have any dat files when I run recon-all and so was told to > generate the dat files using *mri152reg*. However, most of my ICBM brains > are registered to the MNI305 template and so my labels are in this space. > The mri152reg would only work for the 5 brains that I have that are > registered to ICBM152 nonlinear template. (Essentially, these brains were > passed on to me from another student and so are registered to various > templates) > > *To start, any idea how to get the labels.mnc onto my Freesurfer surfaces?* > > thanks so much, > > Trisanna > > > > -- > Ph.D. Candidate > McGill University > Integrated Program in Neuroscience > Psychology > > > On Tue, Apr 12, 2016 at 3:56 PM, Mishkin Derakhshan > wrote: > >> Hi Trisanna, >> Best to actually post your question. I have a bit of experience but it >> is from 5 years ago now, so using FreeSurfer v4.5 and v5.0. >> mishkin >> >> >> On Tue, Apr 12, 2016 at 7:06 AM, Trisanna Sprung-Much >> wrote: >> > Hello >> > >> > I am a graduate student in the lab of Michael Petrides and I am curious >> as >> > to whether anyone has a decent amount of knowledge about Freesurfer. I >> have >> > been slowly learning how to use it, using the youtube videos and wiki >> page >> > available, and also the email list. However, I have a specific question >> > regarding some labels I have created in Display and the email list has >> not >> > been successful. >> > >> > Any help would be greatly appreciated! >> > >> > best wishes >> > >> > Trisanna Sprung-Much >> > >> > >> > -- >> > Ph.D. Candidate >> > McGill University >> > Integrated Program in Neuroscience >> > Psychology >> > _______________________________________________ >> > MINC-users at bic.mni.mcgill.ca >> > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> _______________________________________________ >> MINC-users at bic.mni.mcgill.ca >> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >> > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users From ptcougopinto at gmail.com Fri Apr 29 21:28:24 2016 From: ptcougopinto at gmail.com (Pedro Telles Cougo Pinto) Date: Fri, 29 Apr 2016 22:28:24 -0300 Subject: [MINC-users] Extract coord and voxel data Message-ID: Hi, everyone ? Mincextract exports voxel value, but is it possible to also extract the corresponding voxel coordinate data together with the scalar value? Thanks Pedro From robert.d.vincent at mcgill.ca Fri Apr 29 22:44:02 2016 From: robert.d.vincent at mcgill.ca (Robert D. Vincent) Date: Fri, 29 Apr 2016 22:44:02 -0400 Subject: [MINC-users] Extract coord and voxel data In-Reply-To: References: Message-ID: Hi, There is a tool called minctotag, which does exactly that: minctotag file.mnc file.tag extracts all values and into an MNI .tag format file, which is a fairly simple ASCII file. I think it outputs world coordinates rather than voxel coordinates, however. -bert On Fri, Apr 29, 2016 at 9:28 PM, Pedro Telles Cougo Pinto < ptcougopinto at gmail.com> wrote: > Hi, everyone ? > > Mincextract exports voxel value, but is it possible to also extract the > corresponding voxel coordinate data together with the scalar value? > > Thanks > Pedro > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > From sorench at gmail.com Sat Apr 30 13:30:47 2016 From: sorench at gmail.com (Soren Christensen) Date: Sat, 30 Apr 2016 10:30:47 -0700 Subject: [MINC-users] Extract coord and voxel data In-Reply-To: References: Message-ID: Hi, Alternatively I guess the output is implicitly ordered by voxel coordinate (fastest to slowest varying dim I assume). So the actual output index is the linear index of the voxel location and you then simply have to translate the line number to the voxel coordinate with the appropriate calculation. Soren On Fri, Apr 29, 2016 at 7:44 PM, Robert D. Vincent < robert.d.vincent at mcgill.ca> wrote: > Hi, > > There is a tool called minctotag, which does exactly that: > > minctotag file.mnc file.tag > > extracts all values and into an MNI .tag format file, which is a fairly > simple ASCII file. I think it outputs world coordinates rather than voxel > coordinates, however. > > -bert > > > > On Fri, Apr 29, 2016 at 9:28 PM, Pedro Telles Cougo Pinto < > ptcougopinto at gmail.com> wrote: > > > Hi, everyone ? > > > > Mincextract exports voxel value, but is it possible to also extract the > > corresponding voxel coordinate data together with the scalar value? > > > > Thanks > > Pedro > > _______________________________________________ > > MINC-users at bic.mni.mcgill.ca > > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users > > > _______________________________________________ > MINC-users at bic.mni.mcgill.ca > http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users >