def __init__(self, data, subject, xfmname, mask=None, **kwargs):
        """Three possible variables: raw, volume, movie, vertex. Enumerated with size:
        raw volume movie: (t, z, y, x, c)
        raw volume image: (z, y, x, c)
        reg volume movie: (t, z, y, x)
        reg volume image: (z, y, x)
        raw linear movie: (t, v, c)
        reg linear movie: (t, v)
        raw linear image: (v, c)
        reg linear image: (v,)
        """
        if isinstance(data, str):
            import nibabel
            nib = nibabel.load(data)
            data = nib.get_data().T

        self.data = data
        try:
            basestring
        except __HOLE__:
            subject = subject if isinstance(subject, str) else subject.decode('utf-8')
            xfmname = xfmname if isinstance(xfmname, str) else xfmname.decode('utf-8')
        self.subject = subject
        self.xfmname = xfmname
        self.attrs = kwargs
        
        self._check_size(mask)
        self.masked = Masker(self)

        #self.add_numpy_methods()
dataset/ETHPy150Open gallantlab/pycortex/cortex/dataset.py/VolumeData.__init__