def test_dicomweb_retrieve_study(test_dataset, test_dicom_store, capsys): dicomweb.dicomweb_store_instance( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, dcm_file) dicomweb.dicomweb_retrieve_study( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid) out, _ = capsys.readouterr() # Check that store instance worked assert 'Retrieved study with UID:' in out dicomweb.dicomweb_delete_study( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid)
def test_dicomweb_delete_study(test_dataset, test_dicom_store, capsys): dicomweb.dicomweb_store_instance(base_url, project_id, cloud_region, dataset_id, dicom_store_id, dcm_file) dicomweb.dicomweb_delete_study(base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid) out, _ = capsys.readouterr() # Check that store instance worked assert "Deleted study." in out
def test_dicomweb_retrieve_rendered(test_dataset, test_dicom_store, capsys): dicomweb.dicomweb_store_instance( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, dcm_file) dicomweb.dicomweb_retrieve_rendered( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid, series_uid, instance_uid) # Assert rendered image was downloaded assert os.path.isfile('rendered_image.png') out, _ = capsys.readouterr() # Check that retrieve rendered image worked assert 'Retrieved rendered image' in out # Delete downloaded rendered image os.remove('rendered_image.png') dicomweb.dicomweb_delete_study( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid)
def test_dicomweb_retrieve_study(test_dataset, test_dicom_store, capsys): dicomweb.dicomweb_store_instance( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, dcm_file) dicomweb.dicomweb_retrieve_study( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid) # Assert study was downloaded assert os.path.isfile('study.multipart') out, _ = capsys.readouterr() # Check that retrieve study worked assert 'Retrieved study' in out # Delete downloaded study os.remove('study.multipart') dicomweb.dicomweb_delete_study( service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid)
def test_dicomweb_search_instance_studies(test_dataset, test_dicom_store, capsys): dicomweb.dicomweb_store_instance(service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, dcm_file) dicomweb.dicomweb_search_instance(service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id) dicomweb.dicomweb_search_studies(service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id) out, _ = capsys.readouterr() # Check that search instance worked assert 'Instances:' in out # Check that search studies worked assert 'Patients found matching query' in out dicomweb.dicomweb_delete_study(service_account_json, base_url, project_id, cloud_region, dataset_id, dicom_store_id, study_uid)