def __init__(self, xfm, reference):
        self.xfm = xfm
        self.reference = None

        if isstr(reference):
            import nibabel
            try:
                self.reference = nibabel.load(reference)
                self.shape = self.reference.shape[:3][::-1]
            except __HOLE__:
                self.reference = reference
        elif isinstance(reference, tuple):
            self.shape = reference
        else:
            self.reference = reference
            self.shape = self.reference.shape[:3][::-1]
dataset/ETHPy150Open gallantlab/pycortex/cortex/xfm.py/Transform.__init__