Exemple #1
0
def MR_extract_real_images(complex_images):
    handle = pygadgetron.cGT_newObject('ExtractRealImagesProcessor')
    _check_status(handle)
    real_images = ImagesContainer()
    real_images.handle = pygadgetron.cGT_processImages\
         (handle, complex_images.handle)
    _check_status(real_images.handle)
    pygadgetron.deleteObject(handle)
    return real_images
Exemple #2
0
def MR_remove_x_oversampling(input_data):
    handle = pygadgetron.cGT_newObject('RemoveOversamplingProcessor')
    _check_status(handle)
    output_data = AcquisitionsContainer()
    output_data.handle = pygadgetron.cGT_processAcquisitions\
         (handle, input_data.handle)
    _check_status(output_data.handle)
    pygadgetron.deleteObject(handle)
    return output_data
Exemple #3
0
 def calculate(self, acqs):
     if acqs.is_sorted() is False:
         print('WARNING: acquisitions may be in a wrong order')
     if self.handle is not None:
         pygadgetron.deleteObject(self.handle)
     self.handle = pygadgetron.cGT_CoilSensitivities('')
     _check_status(self.handle)
     _set_int_par\
         (self.handle, 'coil_sensitivity', 'smoothness', self.smoothness)
     handle = pygadgetron.cGT_computeCoilSensitivities\
         (self.handle, acqs.handle)
     _check_status(handle)
     pygadgetron.deleteDataHandle(handle)
Exemple #4
0
 def __del__(self):
     if self.handle is not None:
         pygadgetron.deleteObject(self.handle)
Exemple #5
0
 def __del__(self):
     if self.handle is not None:
         #print('deleting reconstructor object...')
         pygadgetron.deleteObject(self.handle)
Exemple #6
0
 def read(self, file):
     if self.handle is not None:
         pygadgetron.deleteObject(self.handle)
     self.handle = pygadgetron.cGT_CoilSensitivities(file)
     _check_status(self.handle)