Module Expr Str ImportFrom alias alias ImportFrom alias alias identifier Import alias identifier Import alias identifier ImportFrom alias Assign TupleStore NameStore NameStore NameStore Call NameLoad Str Import alias identifier ImportFrom alias alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias alias ImportFrom alias Assign NameStore Call NameLoad UnaryOpNot NameLoad Str Assign NameStore Call NameLoad Call NameLoad NameLoad Str FunctionDef arguments args defaults body Expr Call NameLoad Call NameLoad Num Num Expr Call NameLoad Call NameLoad ListLoad Num Num Num BinOpMult Call AttributeLoad NameLoad attr Num Num Num Expr Call NameLoad Call NameLoad Num Num Expr Call NameLoad Call NameLoad BinOpMult Call AttributeLoad NameLoad attr Num Num Num ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Expr Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num ListLoad Num Num Num Expr Call NameLoad Call NameLoad NameLoad Num NameLoad Expr Call NameLoad Call NameLoad NameLoad Num ListLoad ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num ListLoad Num Num Num Num Num Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num ListLoad Num Num Num Num Expr Call NameLoad Call NameLoad NameLoad Num NameLoad Expr Call NameLoad Call NameLoad NameLoad Num ListLoad ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num ListLoad Num Num Num Expr Call NameLoad Call NameLoad NameLoad Num ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num ListLoad Num Num Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num ListLoad Num Num Expr Call NameLoad Call NameLoad NameLoad Num NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num For NameStore TupleLoad Num Num Num body Assign NameStore Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index TupleLoad NameLoad Num Num Assign NameStore Call NameLoad NameLoad TupleLoad Num Num Num Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TupleLoad TupleLoad Num Num Num NameLoad Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Num Slice Num SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Slice Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Num Slice Num SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Slice Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Slice SubscriptLoad NameLoad ExtSlice Slice Num Slice Slice Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Str Assign SubscriptStore NameLoad ExtSlice Index Num Slice Slice SubscriptLoad NameLoad ExtSlice Index Num Slice Slice Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Slice SubscriptLoad NameLoad ExtSlice Index Num Slice Slice Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad Num Num Num ListLoad Num Num Num keyword Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Num Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Assign SubscriptStore NameLoad ExtSlice Slice Num Slice Num Slice Num SubscriptLoad NameLoad ExtSlice Slice Num Slice Num Slice Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Slice Index Num NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Assign NameStore Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Slice Index Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult Num Num attr TupleLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num Num Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad For NameStore TupleLoad NameLoad Num ListLoad Num Num Num body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Num ExtSlice Ellipsis Index NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index TupleLoad Num Num Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index TupleLoad Num Num ExtSlice Ellipsis Index NameLoad Index NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Num Num Num Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad NameLoad NameLoad For TupleStore NameStore NameStore NameStore NameStore NameStore Call NameLoad body Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore BinOpAdd NameLoad BinOpMult TupleLoad Num BinOpSub Num NameLoad If UnaryOpNot CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad BinOpMult TupleLoad Num BinOpSub Num NameLoad Assert CompareEq Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult TupleLoad Num BinOpSub Num NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad BinOpDiv Num Num BinOpDiv Num Num BinOpDiv Num Num keyword TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num Num ListLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call NameLoad BinOpDiv AttributeLoad NameLoad attr Num ListLoad Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore TupleLoad Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num BinOpMult Num Call AttributeLoad NameLoad attr BinOpDiv AttributeLoad NameLoad attr Num ListLoad Num Num Num Num ListLoad Num Num Num Num ListLoad Num Num Num Num Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword Num attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword Num attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword Str attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad keyword Str Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad keyword NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad ListLoad Num Num Num attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad ListLoad Num Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr ListLoad Num Num Num ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Expr Call NameLoad AttributeLoad Call NameLoad NameLoad ListLoad Num Num Num attr NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num keyword Str Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad ListLoad Num Num attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad ListLoad Num Num Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpMult Num Num attr TupleLoad Num Num Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd Call NameLoad NameLoad ListLoad Num keyword Str Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num attr NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num keyword Str attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num keyword Str keyword Num attr NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num keyword NameLoad attr NameLoad Expr Call NameLoad AttributeLoad Call NameLoad NameLoad Num keyword NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr TupleLoad Num Num Num Num Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpBitOr CompareLt NameLoad Num CompareGt Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad Num Num Num Assign NameStore Call NameLoad NameLoad ListLoad Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Ellipsis Index Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad keyword Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Num keyword Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list NameLoad
N/A N/A  Testing processing module
 __future__ division print_function os.path dirname join pjoin N/A numpy np N/A numpy.linalg npl nibabel.optpkg optional_package N/A N/A spnd have_scipy _ N/A optional_package scipy.ndimage N/A nibabel nib nibabel.processing sigma2fwhm fwhm2sigma adapt_affine resample_from_to resample_to_output smooth_image nibabel.nifti1 Nifti1Image nibabel.nifti2 Nifti2Image nibabel.orientations flip_axis inv_ornt_aff nibabel.affines AffineError from_matvec to_matvec apply_affine nibabel.eulerangles euler2mat numpy.testing assert_almost_equal assert_array_equal numpy.testing.decorators skipif nose.tools assert_true assert_false assert_raises assert_equal assert_not_equal nibabel.tests.test_spaces assert_all_in get_outspace_params nibabel.testing assert_allclose_safely N/A needs_scipy N/A skipif N/A have_scipy These tests need scipy N/A DATA_DIR N/A pjoin N/A dirname __file__ data test_sigma2fwhm N/A N/A N/A N/A N/A N/A assert_almost_equal N/A sigma2fwhm 1 2.35482 N/A N/A assert_almost_equal N/A sigma2fwhm N/A 1 2 3 N/A N/A N/A np arange 1 4 2.35482 N/A N/A assert_almost_equal N/A fwhm2sigma 2.35482 1 N/A N/A assert_almost_equal N/A fwhm2sigma N/A N/A N/A np arange 1 4 2.35482 N/A 1 2 3 N/A fwhm N/A N/A np arange 1.0 5.0 0.1 N/A sigma N/A N/A np arange 1.0 5.0 0.1 N/A N/A assert_true N/A N/A np allclose N/A sigma2fwhm N/A fwhm2sigma fwhm fwhm N/A N/A assert_true N/A N/A np allclose N/A fwhm2sigma N/A sigma2fwhm sigma sigma N/A test_adapt_affine N/A N/A N/A N/A N/A aff_3d N/A from_matvec N/A N/A N/A N/A np arange 9 reshape N/A 3 3 N/A 11 12 13 N/A N/A assert_array_equal N/A adapt_affine aff_3d 3 aff_3d N/A N/A assert_array_equal N/A adapt_affine aff_3d 4 N/A N/A 0 1 2 0 11 N/A 3 4 5 0 12 N/A 6 7 8 0 13 N/A 0 0 0 1 0 N/A 0 0 0 0 1 N/A aff_4d N/A from_matvec N/A N/A N/A N/A np arange 16 reshape N/A 4 4 N/A 11 12 13 14 N/A N/A assert_array_equal N/A adapt_affine aff_4d 4 aff_4d N/A N/A assert_array_equal N/A adapt_affine aff_3d 2 N/A N/A 0 1 11 N/A 3 4 12 N/A 6 7 13 N/A 0 0 1 N/A N/A assert_array_equal N/A adapt_affine aff_3d 1 N/A N/A 0 11 N/A 3 12 N/A 6 13 N/A 0 1 N/A aff_2d N/A from_matvec N/A N/A N/A N/A np arange 4 reshape N/A 2 2 N/A 11 12 N/A N/A assert_array_equal N/A adapt_affine aff_2d 2 aff_2d N/A test_resample_from_to N/A N/A N/A N/A N/A data N/A N/A N/A N/A np arange 24 reshape N/A 2 3 4 N/A affine N/A N/A np diag N/A -4 5 6 1 N/A img N/A Nifti1Image data affine N/A N/A N/A img header N/A descrip red shirt image N/A out N/A resample_from_to img img N/A N/A assert_almost_equal N/A img dataobj N/A out dataobj N/A N/A assert_array_equal N/A img affine N/A out affine N/A flip_ornt N/A N/A np array N/A N/A 0 1 N/A 1 1 N/A 2 1 N/A axis N/A 0 1 2 N/A N/A ax_flip_ornt N/A N/A flip_ornt copy N/A N/A ax_flip_ornt N/A N/A axis 1 -1 N/A aff_flip_i N/A inv_ornt_aff ax_flip_ornt N/A 2 3 4 N/A flipped_img N/A Nifti1Image N/A flip_axis data axis N/A N/A np dot affine aff_flip_i N/A out N/A resample_from_to flipped_img N/A N/A 2 3 4 affine N/A N/A assert_almost_equal N/A img dataobj N/A out dataobj N/A N/A assert_array_equal N/A img affine N/A out affine N/A trans_aff N/A from_matvec N/A N/A np diag N/A -4 5 6 N/A 4 -5 -6 N/A trans_img N/A Nifti1Image data trans_aff N/A out N/A resample_from_to trans_img img N/A exp_out N/A N/A np zeros_like data N/A N/A exp_out N/A N/A -1 N/A -1 N/A -1 N/A data N/A N/A 1 N/A 1 N/A 1 N/A N/A assert_almost_equal N/A out dataobj exp_out N/A out N/A resample_from_to img trans_img N/A trans_exp_out N/A N/A np zeros_like data N/A N/A trans_exp_out N/A N/A 1 N/A 1 N/A 1 N/A data N/A N/A -1 N/A -1 N/A -1 N/A N/A assert_almost_equal N/A out dataobj trans_exp_out N/A trans1_aff N/A from_matvec N/A N/A np diag N/A -4 5 6 N/A 4 0 0 N/A trans1_img N/A Nifti1Image data trans1_aff N/A out N/A resample_from_to img trans1_img N/A exp_out N/A N/A np zeros_like data N/A N/A exp_out N/A N/A 1 N/A N/A N/A data N/A N/A -1 N/A N/A N/A N/A assert_almost_equal N/A out dataobj exp_out N/A out N/A resample_from_to img trans1_img mode nearest N/A N/A exp_out N/A N/A 0 N/A N/A N/A exp_out N/A N/A 1 N/A N/A N/A N/A assert_almost_equal N/A out dataobj exp_out N/A trans_p_25_aff N/A from_matvec N/A N/A np diag N/A -4 5 6 N/A 1 0 0 N/A trans_p_25_img N/A Nifti1Image data trans_p_25_aff N/A out N/A resample_from_to img trans_p_25_img order 0 N/A exp_out N/A N/A np zeros_like data N/A N/A exp_out N/A N/A 1 N/A N/A N/A data N/A N/A 1 N/A N/A N/A N/A assert_almost_equal N/A out dataobj exp_out N/A out N/A resample_from_to img trans_p_25_img N/A exp_out N/A N/A spnd affine_transform data N/A 1 1 1 N/A -0.25 0 0 order 3 N/A N/A assert_almost_equal N/A out dataobj exp_out N/A out N/A resample_from_to img trans_img cval 99 N/A exp_out N/A N/A N/A np zeros_like data 99 N/A N/A exp_out N/A N/A 1 N/A 1 N/A 1 N/A data N/A N/A -1 N/A -1 N/A -1 N/A N/A assert_almost_equal N/A out dataobj exp_out N/A out N/A resample_from_to img trans_img N/A N/A assert_equal N/A out __class__ Nifti1Image N/A n1_img N/A Nifti2Image data affine N/A out N/A resample_from_to n1_img trans_img N/A N/A assert_equal N/A out __class__ Nifti1Image N/A out N/A resample_from_to img trans_img out_class Nifti2Image N/A N/A assert_equal N/A out __class__ Nifti2Image N/A out N/A resample_from_to n1_img trans_img out_class None N/A N/A assert_equal N/A out __class__ Nifti2Image N/A n1_trans_img N/A Nifti2Image data trans_aff N/A out N/A resample_from_to img n1_trans_img out_class None N/A N/A assert_equal N/A out __class__ Nifti1Image N/A img_2d N/A Nifti1Image N/A data N/A N/A N/A N/A 0 affine N/A N/A assert_raises AffineError resample_from_to img_2d img N/A out N/A resample_from_to img img_2d N/A N/A assert_array_equal N/A out dataobj N/A data N/A N/A N/A N/A 0 N/A out N/A resample_from_to img N/A N/A img_2d shape N/A img_2d affine N/A N/A assert_array_equal N/A out dataobj N/A data N/A N/A N/A N/A 0 N/A data_4d N/A N/A N/A N/A np arange N/A 24 5 reshape N/A 2 3 4 5 N/A img_4d N/A Nifti1Image data_4d affine N/A out N/A resample_from_to img_4d img_4d N/A N/A assert_almost_equal data_4d N/A out dataobj N/A N/A assert_array_equal N/A img_4d affine N/A out affine N/A N/A assert_raises ValueError resample_from_to img_4d img N/A N/A assert_raises ValueError resample_from_to img img_4d N/A needs_scipy test_resample_to_output N/A N/A N/A N/A N/A data N/A N/A N/A N/A np arange 24 reshape N/A 2 3 4 N/A img N/A Nifti1Image data N/A N/A np eye 4 N/A img2 N/A resample_to_output img N/A N/A assert_array_equal N/A img2 shape N/A 2 3 4 N/A N/A assert_array_equal N/A img2 affine N/A N/A np eye 4 N/A N/A assert_array_equal N/A img2 dataobj data N/A vox_sizes N/A None 1 N/A 1 1 1 N/A N/A img2 N/A resample_to_output img vox_sizes N/A N/A assert_array_equal N/A img2 shape N/A 2 3 4 N/A N/A assert_array_equal N/A img2 affine N/A N/A np eye 4 N/A N/A assert_array_equal N/A img2 dataobj data N/A img2 N/A resample_to_output img vox_sizes N/A img_2d N/A Nifti1Image N/A data N/A 0 N/A N/A np eye 4 N/A img3 N/A resample_to_output img_2d N/A N/A assert_array_equal N/A img3 shape N/A 3 4 1 N/A N/A assert_array_equal N/A img3 affine N/A N/A np eye 4 N/A N/A assert_array_equal N/A img3 dataobj N/A N/A data N/A 0 N/A N/A N/A None N/A img_1d N/A Nifti1Image N/A data N/A N/A 0 0 N/A N/A np eye 4 N/A img3 N/A resample_to_output img_1d N/A N/A assert_array_equal N/A img3 shape N/A 4 1 1 N/A N/A assert_array_equal N/A img3 affine N/A N/A np eye 4 N/A N/A assert_array_equal N/A img3 dataobj N/A N/A data N/A N/A 0 0 N/A N/A N/A None N/A None N/A img_4d N/A Nifti1Image N/A N/A data reshape 2 3 2 2 N/A N/A np eye 4 N/A N/A assert_raises ValueError resample_to_output img_4d N/A N/A in_shape in_aff vox out_shape out_aff N/A get_outspace_params N/A N/A in_n_dim N/A len in_shape N/A N/A in_n_dim 3 N/A N/A in_shape N/A in_shape N/A N/A 1 N/A 3 in_n_dim N/A N/A N/A vox None N/A N/A vox N/A vox N/A N/A 1 N/A 3 in_n_dim N/A N/A N/A len out_shape in_n_dim N/A out_shape N/A out_shape N/A N/A 1 N/A 3 in_n_dim N/A img N/A Nifti1Image N/A N/A np ones in_shape in_aff N/A out_img N/A resample_to_output img vox N/A N/A assert_all_in in_shape in_aff N/A out_img shape N/A out_img affine N/A N/A assert_equal N/A out_img shape out_shape N/A N/A assert_almost_equal N/A out_img affine out_aff N/A out_img N/A resample_to_output N/A Nifti1Image data N/A N/A np diag N/A -1 1 1 1 N/A N/A assert_array_equal N/A out_img dataobj N/A N/A np flipud data N/A out_img N/A resample_to_output N/A Nifti1Image data N/A N/A np diag N/A 4 5 6 1 N/A exp_out N/A N/A spnd affine_transform data N/A N/A 1 4 N/A 1 5 N/A 1 6 output_shape N/A 5 11 19 N/A N/A assert_array_equal N/A out_img dataobj exp_out N/A out_img N/A resample_to_output N/A Nifti1Image data N/A N/A np diag N/A 4 5 6 1 N/A 4 5 6 N/A N/A assert_array_equal N/A out_img dataobj data N/A rot_3 N/A from_matvec N/A euler2mat N/A N/A np pi 4 N/A 0 0 0 N/A rot_3_img N/A Nifti1Image data rot_3 N/A out_img N/A resample_to_output rot_3_img N/A exp_shape N/A 4 4 4 N/A N/A assert_equal N/A out_img shape exp_shape N/A exp_aff N/A N/A np array N/A N/A 1 0 0 N/A -2 N/A N/A np cos N/A N/A np pi 4 N/A 0 1 0 0 N/A 0 0 1 0 N/A 0 0 0 1 N/A N/A assert_almost_equal N/A out_img affine exp_aff N/A N/A rzs trans N/A to_matvec N/A N/A np dot N/A N/A npl inv rot_3 exp_aff N/A exp_out N/A N/A spnd affine_transform data rzs trans exp_shape N/A N/A assert_almost_equal N/A out_img dataobj exp_out N/A N/A assert_almost_equal N/A N/A resample_to_output rot_3_img order 0 dataobj N/A N/A spnd affine_transform data rzs trans exp_shape order 0 N/A N/A assert_almost_equal N/A N/A resample_to_output rot_3_img cval 99 dataobj N/A N/A spnd affine_transform data rzs trans exp_shape cval 99 N/A N/A assert_almost_equal N/A N/A resample_to_output rot_3_img mode nearest dataobj N/A N/A spnd affine_transform data rzs trans exp_shape mode nearest N/A img_ni1 N/A Nifti2Image data N/A N/A np eye 4 N/A img_ni2 N/A Nifti2Image data N/A N/A np eye 4 N/A N/A assert_equal N/A N/A resample_to_output img_ni2 __class__ Nifti1Image N/A N/A assert_equal N/A N/A resample_to_output img_ni1 out_class Nifti2Image __class__ Nifti2Image N/A N/A assert_equal N/A N/A resample_to_output img_ni2 out_class None __class__ Nifti2Image N/A needs_scipy test_smooth_image N/A N/A N/A N/A N/A data N/A N/A N/A N/A np arange 24 reshape N/A 2 3 4 N/A aff N/A N/A np diag N/A -4 5 6 1 N/A img N/A Nifti1Image data aff N/A out_img N/A smooth_image img 0 N/A N/A assert_array_equal N/A out_img affine N/A img affine N/A N/A assert_array_equal N/A out_img shape N/A img shape N/A N/A assert_array_equal N/A out_img dataobj data N/A sd N/A fwhm2sigma N/A N/A np true_divide 8 N/A 4 5 6 N/A exp_out N/A N/A spnd gaussian_filter data sd mode nearest N/A N/A assert_array_equal N/A N/A smooth_image img 8 dataobj exp_out N/A N/A assert_array_equal N/A N/A smooth_image img N/A 8 8 8 dataobj exp_out N/A N/A assert_raises ValueError smooth_image img N/A 8 8 N/A mixed_sd N/A fwhm2sigma N/A N/A np true_divide N/A 8 7 6 N/A 4 5 6 N/A exp_out N/A N/A spnd gaussian_filter data mixed_sd mode nearest N/A N/A assert_array_equal N/A N/A smooth_image img N/A 8 7 6 dataobj exp_out N/A img_2d N/A Nifti1Image N/A data N/A 0 aff N/A exp_out N/A N/A spnd gaussian_filter N/A data N/A 0 N/A sd N/A 2 mode nearest N/A N/A assert_array_equal N/A N/A smooth_image img_2d 8 dataobj exp_out N/A N/A assert_array_equal N/A N/A smooth_image img_2d N/A 8 8 dataobj exp_out N/A N/A assert_raises ValueError smooth_image img_2d N/A 8 8 8 N/A data_4d N/A N/A N/A N/A np arange N/A 24 5 reshape N/A 2 3 4 5 N/A img_4d N/A Nifti1Image data_4d aff N/A exp_out N/A N/A spnd gaussian_filter data_4d N/A N/A list sd N/A 0 mode nearest N/A N/A assert_array_equal N/A N/A smooth_image img_4d 8 dataobj exp_out N/A N/A assert_raises ValueError smooth_image img_4d N/A 8 8 8 N/A exp_out N/A N/A spnd gaussian_filter data sd mode constant N/A N/A assert_array_equal N/A N/A smooth_image img 8 mode constant dataobj exp_out N/A exp_out N/A N/A spnd gaussian_filter data sd mode constant cval 99 N/A N/A assert_array_equal N/A N/A smooth_image img 8 mode constant cval 99 dataobj exp_out N/A img_ni1 N/A Nifti2Image data N/A N/A np eye 4 N/A img_ni2 N/A Nifti2Image data N/A N/A np eye 4 N/A N/A assert_equal N/A N/A smooth_image img_ni2 0 __class__ Nifti1Image N/A N/A assert_equal N/A N/A smooth_image img_ni1 0 out_class Nifti2Image __class__ Nifti2Image N/A N/A assert_equal N/A N/A smooth_image img_ni2 0 out_class None __class__ Nifti2Image N/A needs_scipy assert_spm_resampling_close N/A N/A from_img our_resampled spm_resampled N/A N/A N/A  Assert our resampling is close to SPM's, allowing for edge effects
     N/A to_img_shape N/A spm_resampled shape N/A to_img_affine N/A spm_resampled affine N/A to_vox_coords N/A N/A N/A N/A np indices to_img_shape transpose N/A 1 2 3 0 N/A to_to_from N/A N/A N/A N/A npl inv N/A from_img affine dot to_img_affine N/A resamp_coords N/A apply_affine to_to_from to_vox_coords N/A outside_vol N/A N/A np any N/A N/A resamp_coords 0 N/A N/A N/A np subtract resamp_coords N/A from_img shape -1 axis -1 N/A spm_res N/A N/A np where outside_vol N/A np nan N/A N/A np array N/A spm_resampled dataobj N/A N/A assert_allclose_safely N/A our_resampled dataobj spm_res N/A N/A assert_almost_equal N/A our_resampled affine N/A spm_resampled affine 5 N/A test_against_spm_resample N/A N/A N/A N/A N/A anat N/A N/A nib load N/A pjoin DATA_DIR anatomical.nii N/A func N/A N/A nib load N/A pjoin DATA_DIR functional.nii N/A some_rotations N/A euler2mat 0.1 0.2 0.3 N/A extra_affine N/A from_matvec some_rotations N/A 3 4 5 N/A moved_anat N/A N/A nib Nifti1Image N/A N/A N/A N/A anat get_data astype float N/A N/A extra_affine dot N/A anat affine N/A anat header N/A one_func N/A N/A nib Nifti1Image N/A N/A func dataobj N/A N/A N/A 0 N/A func affine N/A func header N/A moved2func N/A resample_from_to moved_anat one_func order 1 cval N/A np nan N/A spm_moved N/A N/A nib load N/A pjoin DATA_DIR resampled_anat_moved.nii N/A N/A assert_spm_resampling_close moved_anat moved2func spm_moved N/A moved2output N/A resample_to_output moved_anat 4 order 1 cval N/A np nan N/A spm2output N/A N/A nib load N/A pjoin DATA_DIR reoriented_anat_moved.nii N/A N/A assert_spm_resampling_close moved_anat moved2output spm2output N/A needs_scipy