def to_file(self, outpath):
if not self.has_mask() and not self.is_smoothed():<EOL><INDENT>save_niigz(outpath, self.img)<EOL><DEDENT>else:<EOL><INDENT>save_niigz(outpath, self.get_data(masked=True, smoothed=True),<EOL>self.get_header(), self.get_affine())<EOL><DEDENT>
Save this object instance in outpath.

        Parameters
        ----------
        outpath: str
            Output file path