Did I find the right examples for you? yes no

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

src/p/y/pypreprocess-HEAD/pypreprocess/external/nipy_labs/mask.py   pypreprocess(Download)
    if output_filename is not None:
        header['descrip'] = 'mask'
        output_image = nifti1.Nifti1Image(mask.astype(np.uint8),
                                            affine=affine,
                                            header=header)
            affine = np.eye(4)
        header['descrip'] = 'mask image'
        output_image = nifti1.Nifti1Image(grp_mask.astype(np.uint8),
                                            affine=affine,
                                            header=header,

src/n/i/nipy-0.3.0/nipy/labs/mask.py   nipy(Download)
    if output_filename is not None:
        header['descrip'] = 'mask'
        output_image = nifti1.Nifti1Image(mask.astype(np.uint8),
                                            affine=affine,
                                            header=header)
            affine = np.eye(4)
        header['descrip'] = 'mask image'
        output_image = nifti1.Nifti1Image(grp_mask.astype(np.uint8),
                                            affine=affine,
                                            header=header,

src/n/e/neurosynth-HEAD/neurosynth/base/imageutils.py   neurosynth(Download)
        valid = valid[:, ::-1]
        data[tuple(valid.T)] = 1
    return nifti1.Nifti1Image(data, None, header=header)
 
 
        return result
    else:
        img = nifti1.Nifti1Image(result, None, img.get_header())
        img.to_filename(save)
 
        header = mask.get_header()
    header.set_data_dtype(data.dtype)  # Avoids loss of precision
    img = nifti1.Nifti1Image(mask.unmask(data), None, header)
    img.to_filename(filename)
 

src/n/e/neurosynth-0.3.1/neurosynth/base/imageutils.py   neurosynth(Download)
        data[tuple(valid.T)] = 1
    # affine = header.get_sform() if header else None
    return nifti1.Nifti1Image(data, None, header=header)
 
 
        return result
    else:
        img = nifti1.Nifti1Image(result, None, img.get_header())
        img.to_filename(save)
 
        header = mask.get_header()
    header.set_data_dtype(data.dtype)  # Avoids loss of precision
    img = nifti1.Nifti1Image(mask.unmask(data), None, header)
    img.to_filename(filename)
 

src/n/e/neurosynth-HEAD/neurosynth/base/mask.py   neurosynth(Download)
        if image.shape == self.volume.shape:
            if output == 'image':
                return nb.nifti1.Nifti1Image(image, None, self.get_header())
            elif output == 'array':
                return image
            return image
 
        return nb.nifti1.Nifti1Image(image, None, self.get_header())
 
 

src/d/c/dcmstack-HEAD/src/dcmstack/dcmstack.py   dcmstack(Download)
    aff = reference.nii_img.get_affine().copy()
    aff[:3, 3] = [iop[1], iop[0], iop[2]]
    nii_img = nb.nifti1.Nifti1Image(data, aff)
    hdr = nii_img.get_header()
    hdr.set_xyzt_units('mm', 'sec')

src/d/c/dcmstack-HEAD/src/dcmstack/dcmmeta.py   dcmstack(Download)
 
        #Create the nifti image and set header data
        nii_img = nb.nifti1.Nifti1Image(data, affine)
        hdr = nii_img.get_header()
        hdr.set_xyzt_units('mm', 'sec')