Can we register mri brain images that are brain extracted?

I have to align an image in the dwi space with an image in the T1 weighted image space (same subject). Is it possible to register the brain extracted images instead of the whole heads ? I wonder if the registration process is accurate in this way…

For linear registration, it is recommended to work on brain extracted images, whereas for non linear registration, you can use whole head images:

An exemple such a script with FSL:
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FNIRT/UserGuide#Example_uses