dwi2mask: Fix clean filter on cropped data
dwi2mask: Fix clean filter on cropped data

Because the mask cleaning filter operates only on an input mask, and ignores whatever data were used to generate that mask, it is possible for the output of that filter to include voxels that should never be a part of the mask. This includes cases where the image data are not spatially smooth, but instead possess a sharp transition between valid and invalid data; for instance following motion correction where part of the brain is zero-filled due to moving outside of the field of view in at least one volume. This change ensures that DWI voxels that should never be included in the output mask (e.g. filled with zeroes or NaNs) do not get erroneously included in the mask due to use of the mask cleaning filter.

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3