Did I find the right examples for you? yes no

All Samples(16)  |  Call(9)  |  Derive(0)  |  Import(7)

src/n/i/nibabel-1.3.0/nibabel/freesurfer/mghformat.py   nibabel(Download)
from nibabel.volumeutils import allopen, array_to_file, array_from_file,  \
     Recoder
from nibabel.spatialimages import HeaderDataError, ImageFileError, SpatialImage
from nibabel.fileholders import FileHolder,  copy_file_map
from nibabel.filename_parser import types_filenames, TypesFilenamesError
        # check size
        if len(binaryblock) != self.template_dtype.itemsize:
            raise HeaderDataError('Binary block is wrong size')
        hdr = np.ndarray(shape=(),
                         dtype=self.template_dtype,
        zooms = np.asarray(zooms)
        if len(zooms) != len(hdr['delta']):
            raise HeaderDataError('Expecting %d zoom values for ndim'
                                  % hdr['delta'])
        if np.any(zooms < 0):
            raise HeaderDataError('zooms must be positive')
        shape = header.get_data_shape()
        if data.shape != shape:
            raise HeaderDataError('Data should be shape (%s)' %
                                  ', '.join(str(s) for s in shape))
        offset = header.get_data_offset()

src/n/i/nibabel-HEAD/nibabel/freesurfer/mghformat.py   nibabel(Download)
 
from nibabel.volumeutils import (array_to_file, array_from_file, Recoder)
from nibabel.spatialimages import HeaderDataError, ImageFileError, SpatialImage
from nibabel.fileholders import FileHolder,  copy_file_map
from nibabel.filename_parser import types_filenames, TypesFilenamesError
        # check size
        if len(binaryblock) != self.template_dtype.itemsize:
            raise HeaderDataError('Binary block is wrong size')
        hdr = np.ndarray(shape=(),
                         dtype=self.template_dtype,
        zooms = np.asarray(zooms)
        if len(zooms) != len(hdr['delta']):
            raise HeaderDataError('Expecting %d zoom values for ndim'
                                  % hdr['delta'])
        if np.any(zooms < 0):
            raise HeaderDataError('zooms must be positive')
        shape = header.get_data_shape()
        if data.shape != shape:
            raise HeaderDataError('Data should be shape (%s)' %
                                  ', '.join(str(s) for s in shape))
        offset = header.get_data_offset()

src/n/i/nipy-0.3.0/nipy/io/files.py   nipy(Download)
 
import nibabel as nib
from nibabel.spatialimages import HeaderDataError
 
from ..core.image.image import is_image
            ana_img = nib.Spm2AnalyzeImage.from_image(ni_img)
        except HeaderDataError:
            raise HeaderDataError('SPM analyze does not support datatype %s' %
                                  ni_img.get_header().get_data_dtype())
        ana_img.to_filename(filename)

src/d/c/dcmstack-HEAD/src/dcmstack/dcmstack.py   dcmstack(Download)
import nibabel as nb
from nibabel.nifti1 import Nifti1Extensions
from nibabel.spatialimages import HeaderDataError
from nibabel.orientations import (io_orientation, 
                                  apply_orientation, 

src/d/c/dcmstack-HEAD/src/dcmstack/dcmmeta.py   dcmstack(Download)
import nibabel as nb
from nibabel.nifti1 import Nifti1Extension
from nibabel.spatialimages import HeaderDataError
 
try:

src/n/i/nipy-0.3.0/nipy/io/tests/test_nifti_ref.py   nipy(Download)
import nibabel as nib
from nibabel.affines import from_matvec
from nibabel.spatialimages import HeaderDataError
 
from ...core.api import (Image,

src/n/i/nipy-0.3.0/nipy/io/tests/test_image_io.py   nipy(Download)
import numpy as np
 
from nibabel.spatialimages import ImageFileError, HeaderDataError
from nibabel import Nifti1Header