From anthony.galassi at nih.gov Mon Jun 7 15:21:22 2021 From: anthony.galassi at nih.gov (Galassi, Anthony (NIH/NIMH) [C]) Date: Mon, 7 Jun 2021 19:21:22 +0000 Subject: [Neuroimaging] EGAD ECAT! Message-ID: <1F0BAE29-239B-44D2-ABF1-B8B27F4D0177@nih.gov> Hiya, My co-worker reached out to Chris Markiewicz about ECAT?s and Nibabel and Chris recommended that I reach out to this email address with any questions or queries about that imaging format. I?m currently working with OpenNeuro to integrate PET data into BIDS and our own database. Unfortunately, much (almost all) of the data that?s coming off of Siemens is in the dreaded form of ECAT. We have a handful (two) bespoke tools of our own creation that we?re using to convert some of this imaging data into nifti -> bids. But we would like to focus our efforts on better supporting libraries/packages such as Nibabel and Pybids since they?re widely adopted and well maintained already (and we?re avid users and fans). I?m hoping that since this comment in nibabel?s ecat.py was written something has changedr: > There is very little documentation of the ECAT format, and many of the comments in this code come from a combination of trial and error and wild speculation. If there are any wizend wizards about ECAT or PET we would be happy to receive any wisdom or advice they had to share. In the meantime we will use our limited knowledge and leet hacker skills to submit PR?s and bug fixes relating to ECAT and Nibabel as we collect and solve them. Thank you, Galassi, Anthony (NIH/NIMH) [C] anthony.galassi at nih.gov N4 Solutions, LLC From klarnemann at gmail.com Mon Jun 7 17:24:00 2021 From: klarnemann at gmail.com (Katelyn Arnemann) Date: Mon, 7 Jun 2021 17:24:00 -0400 Subject: [Neuroimaging] EGAD ECAT! In-Reply-To: <1F0BAE29-239B-44D2-ABF1-B8B27F4D0177@nih.gov> References: <1F0BAE29-239B-44D2-ABF1-B8B27F4D0177@nih.gov> Message-ID: Hi, I recommend you reach out to someone at the Jagust lab, such as Suzanne Baker (SLBaker at lbl.gov). Best, Katie On Mon, Jun 7, 2021 at 4:49 PM Galassi, Anthony (NIH/NIMH) [C] via Neuroimaging wrote: > Hiya, > > My co-worker reached out to Chris Markiewicz about ECAT?s and Nibabel and > Chris recommended that I reach out to this email address with any questions > or queries about that imaging format. > > I?m currently working with OpenNeuro to integrate PET data into BIDS and > our own database. Unfortunately, much (almost all) of the data that?s > coming off of Siemens is in the dreaded form of ECAT. We have a handful > (two) bespoke tools of our own creation that we?re using to convert some of > this imaging data into nifti -> bids. But we would like to focus our > efforts on better supporting libraries/packages such as Nibabel and Pybids > since they?re widely adopted and well maintained already (and we?re avid > users and fans). > > I?m hoping that since this comment in nibabel?s ecat.py was written > something has changedr: > > > There is very little documentation of the ECAT format, and many of the > comments in this code come from a combination of trial and error and wild > speculation. > > If there are any wizend wizards about ECAT or PET we would be happy to > receive any wisdom or advice they had to share. > > In the meantime we will use our limited knowledge and leet hacker skills > to submit PR?s and bug fixes relating to ECAT and Nibabel as we collect and > solve them. > > Thank you, > > > Galassi, Anthony (NIH/NIMH) [C] > anthony.galassi at nih.gov > N4 Solutions, LLC > > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging > -- Katelyn Arnemann, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Tue Jun 8 04:30:43 2021 From: matthew.brett at gmail.com (Matthew Brett) Date: Tue, 8 Jun 2021 09:30:43 +0100 Subject: [Neuroimaging] EGAD ECAT! In-Reply-To: <1F0BAE29-239B-44D2-ABF1-B8B27F4D0177@nih.gov> References: <1F0BAE29-239B-44D2-ABF1-B8B27F4D0177@nih.gov> Message-ID: Hi, On Mon, Jun 7, 2021 at 9:49 PM Galassi, Anthony (NIH/NIMH) [C] via Neuroimaging wrote: > > Hiya, > > My co-worker reached out to Chris Markiewicz about ECAT?s and Nibabel and Chris recommended that I reach out to this email address with any questions or queries about that imaging format. > > I?m currently working with OpenNeuro to integrate PET data into BIDS and our own database. Unfortunately, much (almost all) of the data that?s coming off of Siemens is in the dreaded form of ECAT. We have a handful (two) bespoke tools of our own creation that we?re using to convert some of this imaging data into nifti -> bids. But we would like to focus our efforts on better supporting libraries/packages such as Nibabel and Pybids since they?re widely adopted and well maintained already (and we?re avid users and fans). > > I?m hoping that since this comment in nibabel?s ecat.py was written something has changedr: > > > There is very little documentation of the ECAT format, and many of the comments in this code come from a combination of trial and error and wild speculation. > > If there are any wizend wizards about ECAT or PET we would be happy to receive any wisdom or advice they had to share. I did do some work on ECAT that I didn't merge - back here: https://github.com/matthew-brett/nibabel/tree/ecat-ramblines I don't remember finding much documentation, but I'd love to finish up that work, and clean up the ECAT code. It would also be very good to make a database of ECAT images that we can test against. > In the meantime we will use our limited knowledge and leet hacker skills to submit PR?s and bug fixes relating to ECAT and Nibabel as we collect and solve them. That would be very good. Perhaps we should have an ECAT Zoom call or similar to plan work? Cheers, Matthew From redhatw at gmail.com Wed Jun 16 10:34:34 2021 From: redhatw at gmail.com (Ze Wang) Date: Wed, 16 Jun 2021 14:34:34 +0000 Subject: [Neuroimaging] change nifti header in nibabel Message-ID: Hi, Does anyone know how to change the dimension of the nifti image and save back to disk? My nifti files should be a 4D image but my c++ code wrongly set the dimensionality to be 3 rather than 4. The data were saved correctly and can be read using mricron. Certainly, FSL and SPM and nibabel can all only read the first volume. I tried the following way to read the data using nibabel: v=nib.load('file.nii.gz') v.header['dim'][0]=4 dat=v.get_fdata() But it still failed to read the 4D data. My question is: 1. how to let nibabel know that the updated header information should be used when read data? 2. how to save the new header back to the file without loading the data? Thanks Ze -------------- next part -------------- An HTML attachment was scrubbed... URL: From njvack at wisc.edu Wed Jun 16 14:28:14 2021 From: njvack at wisc.edu (Nate Vack) Date: Wed, 16 Jun 2021 13:28:14 -0500 Subject: [Neuroimaging] change nifti header in nibabel In-Reply-To: <78410_1623854099_0QUS05OIATUAGSD0_embe1c16cb-3463-4b8a-8f2f-de761dbcbe30@laptop-cm30trfu> References: <78410_1623854099_0QUS05OIATUAGSD0_embe1c16cb-3463-4b8a-8f2f-de761dbcbe30@laptop-cm30trfu> Message-ID: I might be mistaken here, but your easiest path forward might be to use your existing C++ code to to fix the dimensionality in the header and then read the files normally with nibabel. -n On Wed, Jun 16, 2021 at 9:34 AM wrote: > Hi, Does anyone know how to change the dimension of the nifti image and > save back to disk? My nifti files should be a 4D image but my c++ code > wrongly set the dimensionality to be 3 rather than 4. The data were saved > correctly and can be read using mricron. Certainly, FSL and SPM and nibabel > can all only read the first volume. > I tried the following way to read the data using nibabel: > v=nib.load('file.nii.gz') > v.header['dim'][0]=4 > dat=v.get_fdata() > But it still failed to read the 4D data. My question is: 1. how to let > nibabel know that the updated header information should be used when read > data? 2. how to save the new header back to the file without loading the > data? > > Thanks > Ze > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From redhatw at gmail.com Wed Jun 16 15:43:26 2021 From: redhatw at gmail.com (Ze Wang) Date: Wed, 16 Jun 2021 19:43:26 +0000 Subject: [Neuroimaging] change nifti header in nibabel In-Reply-To: References: <78410_1623854099_0QUS05OIATUAGSD0_embe1c16cb-3463-4b8a-8f2f-de761dbcbe30@laptop-cm30trfu> Message-ID: That is my final solution now. Btw, I have figured it out to trick SPM to read the other volumes by changing the volume field after using spm_vol to read the header of the nii.gz file. A simple trick is below (if anyone is interested): v=spm_vol('wrong4dfile.nii.gz'); v.dt=[n 1]; % read the n-th volume into memory dat=spm_read_vols(v); Thanks Ze ------ Original Message ------ From: "Nate Vack" To: "Ze Wang" ; "Neuroimaging analysis in Python" Sent: 6/16/2021 2:28:14 PM Subject: Re: [Neuroimaging] change nifti header in nibabel >I might be mistaken here, but your easiest path forward might be to use >your existing C++ code to to fix the dimensionality in the header and >then read the files normally with nibabel. > >-n > >On Wed, Jun 16, 2021 at 9:34 AM wrote: >>Hi, Does anyone know how to change the dimension of the nifti image >>and save back to disk? My nifti files should be a 4D image but my >>c++ code wrongly set the dimensionality to be 3 rather than 4. The >>data were saved correctly and can be read using mricron. Certainly, >>FSL and SPM and nibabel can all only read the first volume. >>I tried the following way to read the data using nibabel: >>v=nib.load('file.nii.gz') >>v.header['dim'][0]=4 >>dat=v.get_fdata() >>But it still failed to read the 4D data. My question is: 1. how to >>let nibabel know that the updated header information should be used >>when read data? 2. how to save the new header back to the file >>without loading the data? >> >>Thanks >>Ze >>_______________________________________________ >>Neuroimaging mailing list >>Neuroimaging at python.org >>https://mail.python.org/mailman/listinfo/neuroimaging -------------- next part -------------- An HTML attachment was scrubbed... URL: From sjabari at ut.ac.ir Tue Jun 29 01:42:25 2021 From: sjabari at ut.ac.ir (sjabari) Date: Tue, 29 Jun 2021 10:12:25 +0430 Subject: [Neuroimaging] dipy has problem Message-ID: <903b27f31057f05da43dd51a895e04cc@ut.ac.ir> Dear, I installed Dipy(with the command: python setup.py install) on windows 8.1 but I have error "ModuleNotFoundError: No module named 'dipy.reconst.recspeed' ". I saw the installation folder and found that "recspeed.py" file doesn't exist in reconst folder. What can I do? thanks, Somaye Jabari -------------- next part -------------- An HTML attachment was scrubbed... URL: