## distributed under the License is distributed on an "AS IS" BASIS, ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ## See the License for the specific language governing permissions and ## limitations under the License. __version__ = '0.1.0' # import engine module import pGadgetron as pMR # import further modules import os, numpy import matplotlib.pyplot as plt #%% GO TO MR FOLDER os.chdir(pMR.examples_data_path('MR')) #%% a definition of a Gaussian function def gaussian(x, mu, sigma): return numpy.exp(-numpy.power(x - mu, 2.) / (2 * numpy.power(sigma, 2.))) #%% GO TO MR FOLDER AND LOAD RAW MR DATA os.chdir(pMR.examples_data_path('MR')) acq_data = pMR.AcquisitionData('simulated_MR_2D_cartesian.h5') #%% GET SIZE OF K-SPACE DATA # Get size of current k-space data as tuple # (number of acquisitions, number of coils, number of samples) kdim = acq_data.dimensions()
# import engine module objects from pGadgetron import examples_data_path from pGadgetron import existing_filepath from pGadgetron import AcquisitionData from pGadgetron import AcquisitionDataProcessor from pGadgetron import Reconstructor from pGadgetron import ISMRMRD_IMTYPE_MAGNITUDE from pGadgetron import ImageDataProcessor from pGadgetron import error # process command-line options data_file = args['--file'] data_path = args['--path'] if data_path is None: data_path = examples_data_path('MR') sigma = float(args['--sigma']) show_plot = not args['--non-interactive'] def gaussian(x, mu, sigma): return numpy.exp(-numpy.power(x - mu, 2.) / (2 * numpy.power(sigma, 2.))) def main(): # Acquisitions will be read from this HDF file input_file = existing_filepath(data_path, data_file) acq_data = AcquisitionData(input_file) # Get size of current k-space data as tuple