def __init__(self, src=None): self.handle = None self.name = 'NiftiImageData' if src is None: self.handle = pysirfreg.cSIRFReg_newObject(self.name) elif isinstance(src, str): self.handle = pysirfreg.cSIRFReg_objectFromFile(self.name, src) else: raise error('Wrong source in NiftiImageData constructor') check_status(self.handle)
def __init__(self, src1=None, src2=None, src3=None): self.handle = None self.name = 'NiftiImageData3DTensor' if src1 is None: self.handle = pysirfreg.cSIRFReg_newObject(self.name) elif isinstance(src1, str): self.handle = pysirfreg.cSIRFReg_objectFromFile(self.name, src1) elif isinstance(src1, NiftiImageData3D) and isinstance( src2, NiftiImageData3D) and isinstance(src3, NiftiImageData3D): self.handle = pysirfreg.cSIRFReg_NiftiImageData3DTensor_construct_from_3_components( self.name, src1.handle, src2.handle, src3.handle) else: raise error('Wrong source in NiftiImageData3DTensor constructor') check_status(self.handle)
def __init__(self, src=None): self.handle = None self.name = 'SIRFRegAffineTransformation' if src is None: self.handle = pysirfreg.cSIRFReg_newObject(self.name) elif isinstance(src, str): self.handle = pysirfreg.cSIRFReg_objectFromFile(self.name, src) elif isinstance(src, numpy.ndarray): if src.shape != (4, 4): raise AssertionError() self.handle = pysirfreg.cSIRFReg_SIRFRegAffineTransformation_construct_from_TM( src.ctypes.data) else: raise error('Wrong source in affine transformation constructor') check_status(self.handle)
def __init__(self): self.name = 'SIRFRegImageWeightedMean' self.handle = pysirfreg.cSIRFReg_newObject(self.name) check_status(self.handle)
def __init__(self): self.name = 'SIRFRegNiftyResample' self.handle = pysirfreg.cSIRFReg_newObject(self.name) check_status(self.handle)