Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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
Exemplo n.º 4
0
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
Exemplo n.º 5
0
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