Module Expr Str Import alias Import alias Import alias Import alias identifier Import alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str If BoolOpAnd Call NameLoad NameLoad Str CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Return Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If CompareEq NameLoad Str body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If UnaryOpNot Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad BinOpAdd Str Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias If UnaryOpNot Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Str Return Call NameLoad NameLoad Call AttributeLoad Call NameLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return BinOpMod Str Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler body Pass Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice Num Str Return NameLoad decorator_list
N/A N/A 
Neuroimaging file input and output.
 N/A copy N/A gc N/A collections N/A numpy np N/A nibabel compat _basestring _safe_get_data N/A N/A img N/A N/A N/A  Get the data in the image without having a side effect on the
        Nifti1Image object
     N/A N/A N/A hasattr img _data_cache N/A N/A img _data_cache None N/A N/A img N/A N/A copy deepcopy img N/A N/A N/A gc collect N/A N/A N/A img get_data N/A _get_data_dtype N/A N/A img N/A N/A N/A Returns the dtype of an image.
    If the image is non standard (no get_data_dtype member), this function
    relies on the data itself.
     N/A N/A N/A N/A N/A img get_data_dtype N/A N/A N/A AttributeError N/A N/A N/A N/A N/A img get_data dtype N/A _get_target_dtype N/A N/A dtype target_dtype N/A N/A N/A Returns a new dtype if conversion is needed

    Parameters
    ----------

    dtype: dtype
        Data type of the original data

    target_dtype: {None, dtype, "auto"}
        If None, no conversion is required. If a type is provided, the
        function will check if a conversion is needed. The "auto" mode will
        automatically convert to int32 if dtype is discrete and float32 if it
        is continuous.

    Returns
    -------

    dtype: dtype
        The data type toward which the original data should be converted.
     N/A N/A target_dtype None N/A N/A None N/A N/A target_dtype auto N/A N/A N/A N/A dtype kind i N/A N/A target_dtype N/A np int32 N/A N/A target_dtype N/A np float32 N/A N/A target_dtype dtype N/A N/A None N/A target_dtype N/A load_niimg N/A N/A niimg dtype N/A None N/A N/A Load a niimg, check if it is a nibabel SpatialImage and cast if needed

    Parameters:
    -----------

    niimg: Niimg-like object
        See http://nilearn.github.io/manipulating_images/manipulating_images.html#niimg.
        Image to load.

    dtype: {dtype, "auto"}
        Data type toward which the data should be converted. If "auto", the
        data will be converted to int32 if dtype is discrete and float32 if it
        is continuous.

    Returns:
    --------
    img: image
        A loaded image object.
     image new_img_like N/A N/A isinstance niimg _basestring N/A N/A niimg N/A N/A nibabel load niimg N/A N/A N/A N/A isinstance niimg N/A N/A nibabel spatialimages SpatialImage N/A N/A N/A TypeError N/A Data given cannot be loaded because it is not compatible with nibabel format:
 N/A short_repr niimg N/A dtype N/A _get_target_dtype N/A _get_data_dtype niimg dtype N/A N/A dtype None N/A N/A niimg N/A new_img_like niimg N/A N/A N/A N/A niimg get_data astype dtype N/A N/A niimg get_affine N/A niimg N/A copy_img N/A N/A img N/A N/A N/A Copy an image to a nibabel.Nifti1Image.

    Parameters
    ==========
    img: image
        nibabel SpatialImage object to copy.

    Returns
    =======
    img_copy: image
        copy of input (data, affine and header)
     image new_img_like N/A N/A N/A isinstance img N/A N/A nibabel spatialimages SpatialImage N/A N/A N/A ValueError Input value is not an image N/A N/A new_img_like img N/A N/A N/A _safe_get_data img copy N/A N/A N/A N/A img get_affine copy copy_header True N/A _repr_niimgs N/A N/A niimgs N/A N/A N/A  Pretty printing of niimg or niimgs.
     N/A N/A isinstance niimgs _basestring N/A N/A niimgs N/A N/A isinstance niimgs N/A collections Iterable N/A N/A N/A [%s] N/A N/A ,  join N/A N/A _repr_niimgs niimg N/A niimg niimgs N/A N/A N/A filename N/A N/A niimgs get_filename N/A N/A filename None N/A N/A N/A %s('%s') N/A N/A N/A niimgs __class__ __name__ filename N/A N/A N/A %s(
shape=%s,
affine=%s
) N/A N/A N/A niimgs __class__ __name__ N/A repr N/A niimgs shape N/A repr N/A N/A niimgs get_affine N/A N/A N/A N/A N/A N/A repr niimgs N/A short_repr N/A N/A niimg N/A N/A N/A Gives a shorten version on niimg representation
     N/A this_repr N/A _repr_niimgs niimg N/A N/A N/A len this_repr 20 N/A N/A this_repr N/A N/A this_repr N/A 18 ... N/A this_repr N/A