예제 #1
0
    def test_client_raw_input(self):

        # Give the filename of raw data to the client
        filename = GadgetronClient.raw_input_filename()
        data, header = client(filename)

        # Make sure the output is the same as when h5 is given
        true_output_data = GadgetronClient.true_output_data()
        assert (np.allclose(data, true_output_data))
예제 #2
0
    def test_client_ismrmrd_hdf5_input(self):

        # Load in the data so we can pass the client the ismrmrd.Dataset
        dataset = GadgetronClient.input_h5()
        data, header = client(dataset)

        # Make sure we still get the thing we expected
        true_output_data = GadgetronClient.true_output_data()
        assert (np.allclose(data, true_output_data))
예제 #3
0
    def test_client_filename(self):

        # Get the test input data path so we can send file to gadgetron
        filename = GadgetronClient.input_filename()
        data, header = client(filename)

        # Make sure we get the thing we expected
        true_output_data = GadgetronClient.true_output_data()
        assert (np.allclose(data, true_output_data))
예제 #4
0
    def test_use_default_config(self):
        # Give the filename of raw data to the client
        filename = GadgetronClient.raw_input_filename()

        # Send gadgetron the local default configuration file
        config = configs.default()
        # print(config)
        # data,header = client(filename,config_local=config.get_filename())
        data,header = client(filename,config_local=config.tostring())

        # Make sure the output is the same as when h5 is given
        true_output_data = GadgetronClient.true_output_data()
        self.assertTrue(np.allclose(data,true_output_data))
예제 #5
0
 def setUp(self):
     self.config = GadgetronConfig()
     self.filename = GadgetronClient.grappa_input_filename()
예제 #6
0
 def test_use_generic_cartesian_grappa_config(self):
     config = configs.generic_cartesian_grappa()
     filename = GadgetronClient.generic_cartesian_grappa_filename()
     # print(config.tostring())
     data,header = client(filename,config_local=config.tostring())