def get_info(self): """Return the geom info as string""" handle = pysirf.cSIRF_GeomInfo_get(self.handle) check_status(handle) info = pyiutil.charDataFromHandle(handle) pyiutil.deleteDataHandle(handle) return info
def get_original_datatype(self): """Get original image datatype (internally everything is converted to float).""" if self.handle is None: raise AssertionError() handle = pysirfreg.cSIRFReg_NiftiImageData_get_original_datatype( self.handle) check_status(handle) datatype = pyiutil.charDataFromHandle(handle) pyiutil.deleteDataHandle(handle) return datatype
def value_of_gadget_property(self, id, prop): ''' Returns the string representation of the value of specified property. id : gadget id prop: property name (string) ''' hg = _parameterHandle(self.handle, 'gadget_chain', id) hv = _parameterHandle(hg, 'gadget', prop) value = pyiutil.charDataFromHandle(hv) pyiutil.deleteDataHandle(hg) pyiutil.deleteDataHandle(hv) return value
def _char_par_sirf(handle, set_, par): h = pysirfreg.cSIRFReg_parameter(handle, set_, par) check_status(h, inspect.stack()[1]) value = pyiutil.charDataFromHandle(h) pyiutil.deleteDataHandle(h) return value
def _char_par(handle, set, par): h = pygadgetron.cGT_parameter(handle, set, par) check_status(h) value = pyiutil.charDataFromHandle(h) pyiutil.deleteDataHandle(h) return value