From nawazktk99 at gmail.com Thu Dec 5 03:54:41 2019 From: nawazktk99 at gmail.com (Ali khattak) Date: Thu, 5 Dec 2019 13:54:41 +0500 Subject: [Neuroimaging] Loading dataset from directory to memory problem Message-ID: Hello respected all mailing community I am glad to ask question here in such a responsive environment [image: :blush:] I am working on *CNN based detection and classification of Alzheimer disease using MRI and Clinical data* For that I am using ADNI dataset where all the nifty MRI scans are not same shape. But the size of maximum number of files are (256,256,166). I collected data from ADNI website and I cleaned it and splitted into testing and training folder manually with their respective classes for training my modal in future. The data size is almost *17 GB* Now my task is to load and visualize all those .nii files from directory to the memory and convert them into *tensor torch* or *numpy array*. Both will be applicable in my case I am following data loading topics and already asked two question for data loading to my memory. I tried a lot my all tries find for exploring my problem here in Github My Github Files . It contains what I did in last two months but I still didn?t get the right direction. I think here in this forum someone worked on 3D datasets like ADNI, OSIS etc. need help for solving dataloading problem and many question about dataloading. *Question are:* 1- Loading 3D or 4D data in pytorch in not a big deal as they have strong libraries for computing this data. Beside dataloading tutorials anyone have such kinds of methods or code which load 3D data without any preprocessing and augmentation or subsampling?? 1- Is it important to convert each MRI file into patches for feed into my memory and further processing? 2- What is the best to subsample my MRI files? 3- Loading MRI files need preprocessing? 4- Does slicing make my work easy? My data dimension are 256, 256, 166 and it may varying for some images and the these files are in nii file format. *Note:* someone share his experiences but he is disappear from last week for loading such data I simply do *typically do is create a list of direct paths to the patient directories and then in the get_item method, I will index this list and directly read and convert the nifti to a torch Tensor*. but it didn?t work for me or i don?t know the code or something else but I failed to load the data in such way.[image: :disappointed:]. *So I am requesting with much respect that please help me someone in step by step way please* I have many question but the problem is that here in my institute no one sharing and explaining these things. everyone says that you have to solve by your own knowledge and google any problem. But I couldn?t find way to figure out my problem *Experts and my field related please help me* [image: :pray:] *Ali Nawaz* *Software Engineer* *Research Assistant * *University of Engineering and Technology Taxila, Pakistan* *Cell Phone & Whatsapp: 03358043653* -------------- next part -------------- An HTML attachment was scrubbed... URL: From markiewicz at stanford.edu Thu Dec 12 11:53:24 2019 From: markiewicz at stanford.edu (Christopher Markiewicz) Date: Thu, 12 Dec 2019 16:53:24 +0000 Subject: [Neuroimaging] ANN: Nibabel 3.0 Release Candidate (Please test!) In-Reply-To: References: Message-ID: Hi all, Just a quick note that I've made a second release candidate for nibabel 3.0. Another round of testing would be appreciated. Best, Chris ________________________________ From: Christopher Markiewicz Sent: Saturday, November 16, 2019 12:39 PM To: neuroimaging at python.org Subject: ANN: Nibabel 3.0 Release Candidate (Please test!) Hi all, The first release candidate for Nibabel 3.0 is out. As a major release, there are API changes and a greater than usual opportunity for pain. Therefore, I'm setting a minimum 1 month window (as proposed in https://github.com/nipy/nibabel/issues/734) to help us find bugs, and allow downstream tools to make any necessary adjustments. The only pull requests that will be accepted during this period will be bug fixes or documentation and testing improvements. This window can be extended if needed, so please let me know if you need more time. I would ask all downstream projects to add pre-release testing if they do not already. Pre-release testing requires specifically requesting pre-release packages from PyPI, so if you have not set up this up in continuous integration configuration, it is very likely that you will not install the correct package. To do this, use the `--pre` flag for pip when installing nibabel. Please report any issues to https://github.com/nipy/nibabel/issues. The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. Exercising these functionalities will be a valuable contribution during this release candidate phase. Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. And thanks in advance to your help in making this a smooth upgrade for users. Full changelog follows. ---- Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. References like "pr/298" refer to github pull request numbers. # 3.0.0rc1 (Saturday 16 November 2019) Release candidate for NiBabel 3.0, initiating a minimum one-month testing window. Downstream projects are requested to test against the release candidate by installing with ``pip install --pre nibabel``. New features ------------ * ArrayProxy method ``get_scaled()`` scales data with a dtype of a specified precision, promoting as necessary to avoid overflow. This is to used in ``img.get_fdata()`` to control memory usage. (pr/833) (CM, reviewed by Ross Markello) * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) (Hao-Ting Wang, reviewed by CM) * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron Riddell, reviewed by MB, CM) * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, reviewed by MB) Enhancements ------------ * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to ``np.float64`` when scaling parameters would otherwise promote the data type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) * ``ArraySequence`` now supports a large set of Python operators to combine or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) (Henry Braun, reviewed by CM) * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, reviewed by MB) Bug fixes --------- * Sliced ``Tractogram``s no longer ``apply_affine`` to the original ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM) Maintenance ----------- * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) * Manage versioning with slightly customized Versioneer (pr/786) (CM) * Reference Nipy Community Code and Nibabel Developer Guidelines in GitHub community documents (pr/778) (CM, reviewed by MB) API changes and deprecations ---------------------------- * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, which will return a copy. ``ArraySequence.data`` now returns a read-only view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 (pr/794, pr/809) (CM, reviewed by MB) -- Chris Markiewicz Center for Reproducible Neuroscience Stanford University -------------- next part -------------- An HTML attachment was scrubbed... URL: From markiewicz at stanford.edu Wed Dec 18 12:23:50 2019 From: markiewicz at stanford.edu (Christopher Markiewicz) Date: Wed, 18 Dec 2019 17:23:50 +0000 Subject: [Neuroimaging] ANN: NiBabel 3.0 Message-ID: Hi all, NiBabel 3.0 is out today! Thanks to everybody who tested the release candidates to help a smooth upgrade for users. The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. The data object also now fully supports the numpy __array__ interface, which means it can be cast directly. Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. Full changelog follows. ---- Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. References like "pr/298" refer to github pull request numbers. 3.0.0 (Wednesday 18 December 2019) ================================== New features ------------ * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly with a dtype (for example, ``numpy.float32(dataobj)``) to control the output type. Scale factors (slope, intercept) are applied, but may be cast to narrower types, to control memory usage. This is now the basis of ``img.get_fdata()``, which will scale data in single precision if the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro de la Vega, Ross Markello) * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) (Hao-Ting Wang, reviewed by CM) * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron Riddell, reviewed by MB, CM) * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, reviewed by MB) Enhancements ------------ * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed by Alejandro de la Vega) * Document ``SpatialImage.slicer`` interface (pr/846) (CM) * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to ``np.float64`` when scaling parameters would otherwise promote the data type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) * ``ArraySequence`` now supports a large set of Python operators to combine or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) (Henry Braun, reviewed by CM) * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, reviewed by MB) Bug fixes --------- * Sliced ``Tractogram``s no longer ``apply_affine`` to the original ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Re-import externals/netcdf.py from scipy to resolve numpy deprecation (pr/821) (CM) Maintenance ----------- * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM) * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) * Manage versioning with slightly customized Versioneer (pr/786) (CM) * Reference Nipy Community Code and Nibabel Developer Guidelines in GitHub community documents (pr/778) (CM, reviewed by MB) API changes and deprecations ---------------------------- * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) (CM) * The ``keep_file_open`` argument to file load operations and ``ArrayProxy``s no longer acccepts the value ``"auto"``, raising a ``ValueError``. (pr/852) (CM) * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, which will return a copy. ``ArraySequence.data`` now returns a read-only view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 (pr/794, pr/809) (CM, reviewed by MB) -- Chris Markiewicz Center for Reproducible Neuroscience Stanford University -------------- next part -------------- An HTML attachment was scrubbed... URL: From njvack at wisc.edu Wed Dec 18 14:04:34 2019 From: njvack at wisc.edu (Nate Vack) Date: Wed, 18 Dec 2019 13:04:34 -0600 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: <19998_1576695434_0Q2Q00DKZ1ZDBK60_BN6PR02MB3235E6C19BCFAF0A1ABE0BACA9530@BN6PR02MB3235.namprd02.prod.outlook.com> References: <19998_1576695434_0Q2Q00DKZ1ZDBK60_BN6PR02MB3235E6C19BCFAF0A1ABE0BACA9530@BN6PR02MB3235.namprd02.prod.outlook.com> Message-ID: Congratulations! nibabel is fantastic. -n On Wed, Dec 18, 2019 at 12:57 PM Christopher Markiewicz < markiewicz at stanford.edu> wrote: > Hi all, > > NiBabel 3.0 is out today! Thanks to everybody who tested the release > candidates to help a smooth upgrade for users. > > The most consequential changes in this release are the removal of Python 2 > support and the deprecation of the img.get_data() accessor method to > retrieve the image data block. The supported APIs for accessing data are > img.get_fdata(), which always casts to float, and img.dataobj, which > affords more control over the interpretation of the data object. The data > object also now fully supports the numpy __array__ interface, which means > it can be cast directly. > > Additionally, GIFTI images have a new agg_data() method that simplifies > the retrieval of DataArrays from GIFTI files into usable numpy arrays. > Most, if not all, filenames can now be passed as pathlib.Path objects. And > there are significant updates to the streamlines package. > > Many thanks to everbody who took the time to investigate and report bugs, > propose fixes, review pull requests and review the documentation, including > first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, > Dorota Jarecka, and Chris Gorgolewski. > > Full changelog follows. > > ---- > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris > Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben > Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko > (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan > Gerhard. > > References like "pr/298" refer to github pull request numbers. > > 3.0.0 (Wednesday 18 December 2019) > ================================== > > New features > ------------ > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > with a dtype (for example, ``numpy.float32(dataobj)``) to control the > output type. Scale factors (slope, intercept) are applied, but may be > cast to narrower types, to control memory usage. This is now the basis > of ``img.get_fdata()``, which will scale data in single precision if > the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > de la Vega, Ross Markello) > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > (Hao-Ting Wang, reviewed by CM) > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > Riddell, reviewed by MB, CM) > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > reviewed by MB) > > Enhancements > ------------ > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > by Alejandro de la Vega) > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > ``np.float64`` when scaling parameters would otherwise promote the data > type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > * ``ArraySequence`` now supports a large set of Python operators to combine > or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe > Poulin, > CM, MB) > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags > (pr/818) > (Henry Braun, reviewed by CM) > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > reviewed by MB) > > Bug fixes > --------- > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > Philippe Poulin, CM, MB) > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > (pr/821) (CM) > > Maintenance > ----------- > * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) > (CM) > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > * Reference Nipy Community Code and Nibabel Developer Guidelines in > GitHub community documents (pr/778) (CM, reviewed by MB) > > API changes and deprecations > ---------------------------- > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) > (CM) > * The ``keep_file_open`` argument to file load operations and > ``ArrayProxy``s > no longer acccepts the value ``"auto"``, raising a ``ValueError``. > (pr/852) > (CM) > * Deprecate ``ArraySequence.data`` in favor of > ``ArraySequence.get_data()``, > which will return a copy. ``ArraySequence.data`` now returns a read-only > view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > (pr/794, pr/809) (CM, reviewed by MB) > > > -- > > Chris Markiewicz > > Center for Reproducible Neuroscience > > Stanford University > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertrand.thirion at inria.fr Wed Dec 18 15:14:44 2019 From: bertrand.thirion at inria.fr (bthirion) Date: Wed, 18 Dec 2019 21:14:44 +0100 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: References: Message-ID: Congratulations and big thanks to the team ! Best, Bertrand On 18/12/2019 18:23, Christopher Markiewicz wrote: > Hi all, > > NiBabel 3.0 is out today! Thanks to everybody who tested the release > candidates to help a smooth upgrade for users. > > The most consequential changes in this release are the removal of > Python 2 support and the deprecation of the img.get_data() accessor > method to retrieve the image data block. The supported APIs for > accessing data are img.get_fdata(), which always casts to float, and > img.dataobj, which affords more control over the interpretation of the > data object. The data object also now fully supports the numpy > __array__ interface, which means it can be cast directly. > > Additionally, GIFTI images have a new agg_data() method that > simplifies the retrieval of DataArrays from GIFTI files into usable > numpy arrays. Most, if not all, filenames can now be passed as > pathlib.Path objects. And there are significant updates to the > streamlines package. > > Many thanks to everbody who took the time to investigate and report > bugs, propose fixes, review pull requests and review the > documentation, including first-time contributors Cameron Riddell, > Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. > > Full changelog follows. > > ---- > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris > Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben > Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav > Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian > Wassermann, and Stephan Gerhard. > > References like "pr/298" refer to github pull request numbers. > > 3.0.0 (Wednesday 18 December 2019) > ================================== > > New features > ------------ > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > ? ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > ? with a dtype (for example, ``numpy.float32(dataobj)``) to control the > ? output type. Scale factors (slope, intercept) are applied, but may be > ? cast to narrower types, to control memory usage. This is now the basis > ? of ``img.get_fdata()``, which will scale data in single precision if > ? the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > ? de la Vega, Ross Markello) > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > ? (Hao-Ting Wang, reviewed by CM) > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > ? Riddell, reviewed by MB, CM) > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > ? reviewed by MB) > > Enhancements > ------------ > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > ? by Alejandro de la Vega) > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > ? ``np.float64`` when scaling parameters would otherwise promote the data > ? type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > * ``ArraySequence`` now supports a large set of Python operators to > combine > ? or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, > Philippe Poulin, > ? CM, MB) > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags > (pr/818) > ? (Henry Braun, reviewed by CM) > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > ? reviewed by MB) > > Bug fixes > --------- > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > ? ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > ? Philippe Poulin, CM, MB) > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > ? (pr/821) (CM) > > Maintenance > ----------- > * Remove replicated metadata for packaged data from MANIFEST.in > (pr/845) (CM) > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > * Reference Nipy Community Code and Nibabel Developer Guidelines in > ? GitHub community documents (pr/778) (CM, reviewed by MB) > > API changes and deprecations > ---------------------------- > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. > (pr/852) (CM) > * The ``keep_file_open`` argument to file load operations and > ``ArrayProxy``s > ? no longer acccepts the value ``"auto"``, raising a ``ValueError``. > (pr/852) > ? (CM) > * Deprecate ``ArraySequence.data`` in favor of > ``ArraySequence.get_data()``, > ? which will return a copy. ``ArraySequence.data`` now returns a read-only > ? view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > ? (pr/794, pr/809) (CM, reviewed by MB) > > > -- > > Chris Markiewicz > > Center for Reproducible Neuroscience > > Stanford University > > > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbpoline at gmail.com Wed Dec 18 16:13:53 2019 From: jbpoline at gmail.com (JB Poline) Date: Wed, 18 Dec 2019 16:13:53 -0500 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: References: Message-ID: This is great ! thanks so much JB On Wed, Dec 18, 2019 at 3:15 PM bthirion wrote: > Congratulations and big thanks to the team ! > > Best, > > Bertrand > > On 18/12/2019 18:23, Christopher Markiewicz wrote: > > Hi all, > > NiBabel 3.0 is out today! Thanks to everybody who tested the release > candidates to help a smooth upgrade for users. > > The most consequential changes in this release are the removal of Python 2 > support and the deprecation of the img.get_data() accessor method to > retrieve the image data block. The supported APIs for accessing data are > img.get_fdata(), which always casts to float, and img.dataobj, which > affords more control over the interpretation of the data object. The data > object also now fully supports the numpy __array__ interface, which means > it can be cast directly. > > Additionally, GIFTI images have a new agg_data() method that simplifies > the retrieval of DataArrays from GIFTI files into usable numpy arrays. > Most, if not all, filenames can now be passed as pathlib.Path objects. And > there are significant updates to the streamlines package. > > Many thanks to everbody who took the time to investigate and report bugs, > propose fixes, review pull requests and review the documentation, including > first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, > Dorota Jarecka, and Chris Gorgolewski. > > Full changelog follows. > > ---- > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris > Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben > Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko > (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan > Gerhard. > > References like "pr/298" refer to github pull request numbers. > > 3.0.0 (Wednesday 18 December 2019) > ================================== > > New features > ------------ > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > with a dtype (for example, ``numpy.float32(dataobj)``) to control the > output type. Scale factors (slope, intercept) are applied, but may be > cast to narrower types, to control memory usage. This is now the basis > of ``img.get_fdata()``, which will scale data in single precision if > the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > de la Vega, Ross Markello) > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > (Hao-Ting Wang, reviewed by CM) > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > Riddell, reviewed by MB, CM) > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > reviewed by MB) > > Enhancements > ------------ > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > by Alejandro de la Vega) > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > ``np.float64`` when scaling parameters would otherwise promote the data > type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > * ``ArraySequence`` now supports a large set of Python operators to combine > or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe > Poulin, > CM, MB) > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags > (pr/818) > (Henry Braun, reviewed by CM) > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > reviewed by MB) > > Bug fixes > --------- > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > Philippe Poulin, CM, MB) > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > (pr/821) (CM) > > Maintenance > ----------- > * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) > (CM) > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > * Reference Nipy Community Code and Nibabel Developer Guidelines in > GitHub community documents (pr/778) (CM, reviewed by MB) > > API changes and deprecations > ---------------------------- > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) > (CM) > * The ``keep_file_open`` argument to file load operations and > ``ArrayProxy``s > no longer acccepts the value ``"auto"``, raising a ``ValueError``. > (pr/852) > (CM) > * Deprecate ``ArraySequence.data`` in favor of > ``ArraySequence.get_data()``, > which will return a copy. ``ArraySequence.data`` now returns a read-only > view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > (pr/794, pr/809) (CM, reviewed by MB) > > > -- > > Chris Markiewicz > > Center for Reproducible Neuroscience > > Stanford University > > _______________________________________________ > Neuroimaging mailing listNeuroimaging at python.orghttps://mail.python.org/mailman/listinfo/neuroimaging > > > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthew.brett at gmail.com Wed Dec 18 18:00:09 2019 From: matthew.brett at gmail.com (Matthew Brett) Date: Wed, 18 Dec 2019 23:00:09 +0000 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: References: Message-ID: Hi, Thanks very much - it's a big mileslone - 3.0. Cheers, Matthew On Wed, Dec 18, 2019 at 6:57 PM Christopher Markiewicz wrote: > > Hi all, > > NiBabel 3.0 is out today! Thanks to everybody who tested the release candidates to help a smooth upgrade for users. > > The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. The data object also now fully supports the numpy __array__ interface, which means it can be cast directly. > > Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. > > Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. > > Full changelog follows. > > ---- > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. > > References like "pr/298" refer to github pull request numbers. > > 3.0.0 (Wednesday 18 December 2019) > ================================== > > New features > ------------ > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > with a dtype (for example, ``numpy.float32(dataobj)``) to control the > output type. Scale factors (slope, intercept) are applied, but may be > cast to narrower types, to control memory usage. This is now the basis > of ``img.get_fdata()``, which will scale data in single precision if > the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > de la Vega, Ross Markello) > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > (Hao-Ting Wang, reviewed by CM) > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > Riddell, reviewed by MB, CM) > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > reviewed by MB) > > Enhancements > ------------ > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > by Alejandro de la Vega) > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > ``np.float64`` when scaling parameters would otherwise promote the data > type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > * ``ArraySequence`` now supports a large set of Python operators to combine > or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, > CM, MB) > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) > (Henry Braun, reviewed by CM) > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > reviewed by MB) > > Bug fixes > --------- > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > Philippe Poulin, CM, MB) > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > (pr/821) (CM) > > Maintenance > ----------- > * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM) > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > * Reference Nipy Community Code and Nibabel Developer Guidelines in > GitHub community documents (pr/778) (CM, reviewed by MB) > > API changes and deprecations > ---------------------------- > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) (CM) > * The ``keep_file_open`` argument to file load operations and ``ArrayProxy``s > no longer acccepts the value ``"auto"``, raising a ``ValueError``. (pr/852) > (CM) > * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, > which will return a copy. ``ArraySequence.data`` now returns a read-only > view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > (pr/794, pr/809) (CM, reviewed by MB) > > > -- > > Chris Markiewicz > > Center for Reproducible Neuroscience > > Stanford University > > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging From alexandre.gramfort at inria.fr Thu Dec 19 05:40:51 2019 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Thu, 19 Dec 2019 11:40:51 +0100 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: References: Message-ID: thanks so much guys for supporting this core building block of our tool stack ! Alex On Thu, Dec 19, 2019 at 12:01 AM Matthew Brett wrote: > > Hi, > > Thanks very much - it's a big mileslone - 3.0. > > Cheers, > > Matthew > > On Wed, Dec 18, 2019 at 6:57 PM Christopher Markiewicz > wrote: > > > > Hi all, > > > > NiBabel 3.0 is out today! Thanks to everybody who tested the release candidates to help a smooth upgrade for users. > > > > The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. The data object also now fully supports the numpy __array__ interface, which means it can be cast directly. > > > > Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. > > > > Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. > > > > Full changelog follows. > > > > ---- > > > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. > > > > References like "pr/298" refer to github pull request numbers. > > > > 3.0.0 (Wednesday 18 December 2019) > > ================================== > > > > New features > > ------------ > > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > > ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > > with a dtype (for example, ``numpy.float32(dataobj)``) to control the > > output type. Scale factors (slope, intercept) are applied, but may be > > cast to narrower types, to control memory usage. This is now the basis > > of ``img.get_fdata()``, which will scale data in single precision if > > the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > > de la Vega, Ross Markello) > > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > > (Hao-Ting Wang, reviewed by CM) > > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > > Riddell, reviewed by MB, CM) > > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > > reviewed by MB) > > > > Enhancements > > ------------ > > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > > by Alejandro de la Vega) > > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > > ``np.float64`` when scaling parameters would otherwise promote the data > > type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > > * ``ArraySequence`` now supports a large set of Python operators to combine > > or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, > > CM, MB) > > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) > > (Henry Braun, reviewed by CM) > > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > > reviewed by MB) > > > > Bug fixes > > --------- > > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > > ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > > Philippe Poulin, CM, MB) > > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > > (pr/821) (CM) > > > > Maintenance > > ----------- > > * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM) > > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > > * Reference Nipy Community Code and Nibabel Developer Guidelines in > > GitHub community documents (pr/778) (CM, reviewed by MB) > > > > API changes and deprecations > > ---------------------------- > > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) (CM) > > * The ``keep_file_open`` argument to file load operations and ``ArrayProxy``s > > no longer acccepts the value ``"auto"``, raising a ``ValueError``. (pr/852) > > (CM) > > * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, > > which will return a copy. ``ArraySequence.data`` now returns a read-only > > view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > > (pr/794, pr/809) (CM, reviewed by MB) > > > > > > -- > > > > Chris Markiewicz > > > > Center for Reproducible Neuroscience > > > > Stanford University > > > > _______________________________________________ > > Neuroimaging mailing list > > Neuroimaging at python.org > > https://mail.python.org/mailman/listinfo/neuroimaging > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging From gael.varoquaux at normalesup.org Thu Dec 19 18:21:40 2019 From: gael.varoquaux at normalesup.org (Gael Varoquaux) Date: Thu, 19 Dec 2019 18:21:40 -0500 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: References: Message-ID: <20191219232140.mmtmgdactjolx75a@phare.normalesup.org> Thanks a lot indeed! Nibabel forms the foundations of a wide community! Ga?l On Thu, Dec 19, 2019 at 11:40:51AM +0100, Alexandre Gramfort wrote: > thanks so much guys for supporting this core building block of our tool stack ! > Alex > On Thu, Dec 19, 2019 at 12:01 AM Matthew Brett wrote: > > Hi, > > Thanks very much - it's a big mileslone - 3.0. > > Cheers, > > Matthew > > On Wed, Dec 18, 2019 at 6:57 PM Christopher Markiewicz > > wrote: > > > Hi all, > > > NiBabel 3.0 is out today! Thanks to everybody who tested the release candidates to help a smooth upgrade for users. > > > The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. The data object also now fully supports the numpy __array__ interface, which means it can be cast directly. > > > Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. > > > Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. > > > Full changelog follows. > > > ---- > > > Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. > > > References like "pr/298" refer to github pull request numbers. > > > 3.0.0 (Wednesday 18 December 2019) > > > ================================== > > > New features > > > ------------ > > > * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing > > > ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly > > > with a dtype (for example, ``numpy.float32(dataobj)``) to control the > > > output type. Scale factors (slope, intercept) are applied, but may be > > > cast to narrower types, to control memory usage. This is now the basis > > > of ``img.get_fdata()``, which will scale data in single precision if > > > the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro > > > de la Vega, Ross Markello) > > > * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) > > > (Hao-Ting Wang, reviewed by CM) > > > * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron > > > Riddell, reviewed by MB, CM) > > > * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, > > > reviewed by MB) > > > Enhancements > > > ------------ > > > * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed > > > by Alejandro de la Vega) > > > * Document ``SpatialImage.slicer`` interface (pr/846) (CM) > > > * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to > > > ``np.float64`` when scaling parameters would otherwise promote the data > > > type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) > > > * ``ArraySequence`` now supports a large set of Python operators to combine > > > or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, > > > CM, MB) > > > * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) > > > (Henry Braun, reviewed by CM) > > > * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, > > > reviewed by MB) > > > Bug fixes > > > --------- > > > * Sliced ``Tractogram``s no longer ``apply_affine`` to the original > > > ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, > > > Philippe Poulin, CM, MB) > > > * Re-import externals/netcdf.py from scipy to resolve numpy deprecation > > > (pr/821) (CM) > > > Maintenance > > > ----------- > > > * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM) > > > * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) > > > * Manage versioning with slightly customized Versioneer (pr/786) (CM) > > > * Reference Nipy Community Code and Nibabel Developer Guidelines in > > > GitHub community documents (pr/778) (CM, reviewed by MB) > > > API changes and deprecations > > > ---------------------------- > > > * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) (CM) > > > * The ``keep_file_open`` argument to file load operations and ``ArrayProxy``s > > > no longer acccepts the value ``"auto"``, raising a ``ValueError``. (pr/852) > > > (CM) > > > * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, > > > which will return a copy. ``ArraySequence.data`` now returns a read-only > > > view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) > > > * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 > > > (pr/794, pr/809) (CM, reviewed by MB) > > > -- > > > Chris Markiewicz > > > Center for Reproducible Neuroscience > > > Stanford University > > > _______________________________________________ > > > Neuroimaging mailing list > > > Neuroimaging at python.org > > > https://mail.python.org/mailman/listinfo/neuroimaging > > _______________________________________________ > > Neuroimaging mailing list > > Neuroimaging at python.org > > https://mail.python.org/mailman/listinfo/neuroimaging > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging -- Gael Varoquaux Research Director, INRIA Visiting professor, McGill http://gael-varoquaux.info http://twitter.com/GaelVaroquaux From blaise.frederick at gmail.com Thu Dec 19 20:31:13 2019 From: blaise.frederick at gmail.com (Blaise Frederick) Date: Thu, 19 Dec 2019 20:31:13 -0500 Subject: [Neuroimaging] ANN: NiBabel 3.0 In-Reply-To: <20191219232140.mmtmgdactjolx75a@phare.normalesup.org> References: <20191219232140.mmtmgdactjolx75a@phare.normalesup.org> Message-ID: Yes - thanks! I wouldn?t get anything done without it. Blaise > On Dec 19, 2019, at 6:21 PM, Gael Varoquaux wrote: > > Thanks a lot indeed! Nibabel forms the foundations of a wide community! > > Ga?l > > On Thu, Dec 19, 2019 at 11:40:51AM +0100, Alexandre Gramfort wrote: >> thanks so much guys for supporting this core building block of our tool stack ! > >> Alex > >> On Thu, Dec 19, 2019 at 12:01 AM Matthew Brett wrote: > >>> Hi, > >>> Thanks very much - it's a big mileslone - 3.0. > >>> Cheers, > >>> Matthew > >>> On Wed, Dec 18, 2019 at 6:57 PM Christopher Markiewicz >>> wrote: > >>>> Hi all, > >>>> NiBabel 3.0 is out today! Thanks to everybody who tested the release candidates to help a smooth upgrade for users. > >>>> The most consequential changes in this release are the removal of Python 2 support and the deprecation of the img.get_data() accessor method to retrieve the image data block. The supported APIs for accessing data are img.get_fdata(), which always casts to float, and img.dataobj, which affords more control over the interpretation of the data object. The data object also now fully supports the numpy __array__ interface, which means it can be cast directly. > >>>> Additionally, GIFTI images have a new agg_data() method that simplifies the retrieval of DataArrays from GIFTI files into usable numpy arrays. Most, if not all, filenames can now be passed as pathlib.Path objects. And there are significant updates to the streamlines package. > >>>> Many thanks to everbody who took the time to investigate and report bugs, propose fixes, review pull requests and review the documentation, including first-time contributors Cameron Riddell, Hao-Ting Wang, Oscar Esteban, Dorota Jarecka, and Chris Gorgolewski. > >>>> Full changelog follows. > >>>> ---- > >>>> Most work on NiBabel so far has been by Matthew Brett (MB), Chris Markiewicz (CM), Michael Hanke (MH), Marc-Alexandre C?t? (MC), Ben Cipollini (BC), Paul McCarthy (PM), Chris Cheng (CC), Yaroslav Halchenko (YOH), Satra Ghosh (SG), Eric Larson (EL), Demian Wassermann, and Stephan Gerhard. > >>>> References like "pr/298" refer to github pull request numbers. > >>>> 3.0.0 (Wednesday 18 December 2019) >>>> ================================== > >>>> New features >>>> ------------ >>>> * ArrayProxy ``__array__()`` now accepts a ``dtype`` parameter, allowing >>>> ``numpy.array(dataobj, dtype=...)`` calls, as well as casting directly >>>> with a dtype (for example, ``numpy.float32(dataobj)``) to control the >>>> output type. Scale factors (slope, intercept) are applied, but may be >>>> cast to narrower types, to control memory usage. This is now the basis >>>> of ``img.get_fdata()``, which will scale data in single precision if >>>> the output type is ``float32``. (pr/844) (CM, reviewed by Alejandro >>>> de la Vega, Ross Markello) >>>> * GiftiImage method ``agg_data()`` to return usable data arrays (pr/793) >>>> (Hao-Ting Wang, reviewed by CM) >>>> * Accept ``os.PathLike`` objects in place of filenames (pr/610) (Cameron >>>> Riddell, reviewed by MB, CM) >>>> * Function to calculate obliquity of affines (pr/815) (Oscar Esteban, >>>> reviewed by MB) > >>>> Enhancements >>>> ------------ >>>> * Improve testing of data scaling in ArrayProxy API (pr/847) (CM, reviewed >>>> by Alejandro de la Vega) >>>> * Document ``SpatialImage.slicer`` interface (pr/846) (CM) >>>> * ``get_fdata(dtype=np.float32)`` will attempt to avoid casting data to >>>> ``np.float64`` when scaling parameters would otherwise promote the data >>>> type unnecessarily. (pr/833) (CM, reviewed by Ross Markello) >>>> * ``ArraySequence`` now supports a large set of Python operators to combine >>>> or update in-place. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, >>>> CM, MB) >>>> * Warn, rather than fail, on DICOMs with unreadable Siemens CSA tags (pr/818) >>>> (Henry Braun, reviewed by CM) >>>> * Improve clarity of coordinate system tutorial (pr/823) (Egor Panfilov, >>>> reviewed by MB) > >>>> Bug fixes >>>> --------- >>>> * Sliced ``Tractogram``s no longer ``apply_affine`` to the original >>>> ``Tractogram``'s streamlines. (pr/811) (MC, reviewed by Serge Koudoro, >>>> Philippe Poulin, CM, MB) >>>> * Re-import externals/netcdf.py from scipy to resolve numpy deprecation >>>> (pr/821) (CM) > >>>> Maintenance >>>> ----------- >>>> * Remove replicated metadata for packaged data from MANIFEST.in (pr/845) (CM) >>>> * Support Python >=3.5.1, including Python 3.8.0 (pr/787) (CM) >>>> * Manage versioning with slightly customized Versioneer (pr/786) (CM) >>>> * Reference Nipy Community Code and Nibabel Developer Guidelines in >>>> GitHub community documents (pr/778) (CM, reviewed by MB) > >>>> API changes and deprecations >>>> ---------------------------- >>>> * Fully remove deprecated ``checkwarns`` and ``minc`` modules. (pr/852) (CM) >>>> * The ``keep_file_open`` argument to file load operations and ``ArrayProxy``s >>>> no longer acccepts the value ``"auto"``, raising a ``ValueError``. (pr/852) >>>> (CM) >>>> * Deprecate ``ArraySequence.data`` in favor of ``ArraySequence.get_data()``, >>>> which will return a copy. ``ArraySequence.data`` now returns a read-only >>>> view. (pr/811) (MC, reviewed by Serge Koudoro, Philippe Poulin, CM, MB) >>>> * Deprecate ``DataobjImage.get_data()`` API, to be removed in nibabel 5.0 >>>> (pr/794, pr/809) (CM, reviewed by MB) > > >>>> -- > >>>> Chris Markiewicz > >>>> Center for Reproducible Neuroscience > >>>> Stanford University > >>>> _______________________________________________ >>>> Neuroimaging mailing list >>>> Neuroimaging at python.org >>>> https://mail.python.org/mailman/listinfo/neuroimaging >>> _______________________________________________ >>> Neuroimaging mailing list >>> Neuroimaging at python.org >>> https://mail.python.org/mailman/listinfo/neuroimaging >> _______________________________________________ >> Neuroimaging mailing list >> Neuroimaging at python.org >> https://mail.python.org/mailman/listinfo/neuroimaging > > -- > Gael Varoquaux > Research Director, INRIA Visiting professor, McGill > http://gael-varoquaux.info http://twitter.com/GaelVaroquaux > _______________________________________________ > Neuroimaging mailing list > Neuroimaging at python.org > https://mail.python.org/mailman/listinfo/neuroimaging