{"id":22204730,"url":"https://github.com/taha-parsayan/xml-metadata-extractor","last_synced_at":"2025-03-25T02:45:18.151Z","repository":{"id":253780361,"uuid":"844515076","full_name":"taha-parsayan/xml-metadata-extractor","owner":"taha-parsayan","description":"Extracting metadata related to MRI and PET images from xml files","archived":false,"fork":false,"pushed_at":"2024-08-19T12:44:15.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T03:45:42.920Z","etag":null,"topics":["brain","metadata","metadata-extraction","mri","pet","xml","xmlfile"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taha-parsayan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T12:21:52.000Z","updated_at":"2024-08-19T13:18:36.000Z","dependencies_parsed_at":"2024-08-19T13:57:19.713Z","dependency_job_id":"95178b10-62cc-455f-8b85-4a8abc531e09","html_url":"https://github.com/taha-parsayan/xml-metadata-extractor","commit_stats":null,"previous_names":["mohammadtaha-parsayan/xml-metadata-extractor","taha-parsayan/xml-metadata-extractor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taha-parsayan%2Fxml-metadata-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taha-parsayan%2Fxml-metadata-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taha-parsayan%2Fxml-metadata-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taha-parsayan%2Fxml-metadata-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taha-parsayan","download_url":"https://codeload.github.com/taha-parsayan/xml-metadata-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245388760,"owners_count":20607163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brain","metadata","metadata-extraction","mri","pet","xml","xmlfile"],"created_at":"2024-12-02T17:19:21.671Z","updated_at":"2025-03-25T02:45:18.123Z","avatar_url":"https://github.com/taha-parsayan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XML metadata extractor\n\n### Description\nTypically, MRI and PET images contain metadata within xml files. Each subject has it's own xml file and therefore, it would be time-consumming to open all the files one by one and read their information to report in an article.\nIn here, I provided 2 python files to automatiically open and read the xml files for MRI and PET metadata within the related folders.\n\n### Extracted information for MRI:\n\nManufacturer: The name of the manufacturer of the imaging equipment.\n\nPixel Spacing X: The pixel spacing in the X direction.\n\nPixel Spacing Y: The pixel spacing in the Y direction.\n\nSlice Thickness: The thickness of the imaging slices.\n\nMatrix X: The number of pixels in the X dimension of the image matrix.\n\nMatrix Y: The number of pixels in the Y dimension of the image matrix.\n\nMatrix Z: The number of pixels in the Z dimension of the image matrix.\n\nMfg Model: The model of the imaging equipment.\n\nPulse Sequence: The pulse sequence used in the imaging.\n\nTE (Echo Time): The echo time parameter used in the imaging.\n\nTR (Repetition Time): The repetition time parameter used in the imaging.\n\nCoil: The type of coil used in the imaging.\n\nImage Resolution: A string combining Matrix X, Matrix Y, Matrix Z, Pixel Spacing X, Pixel Spacing Y, and Slice Thickness into a descriptive format.\n\n\n\n### Extracted information for PET:\n\nManufacturer: The name of the manufacturer of the imaging equipment.\n\nImage Resolution:\n\nNumber of Rows: Number of rows in the image matrix.\n\nNumber of Columns: Number of columns in the image matrix.\n\nNumber of Slices: Number of slices in the image stack.\n\nPixel Spacing X: The pixel spacing in the X direction.\n\nPixel Spacing Y: The pixel spacing in the Y direction.\n\nSlice Thickness: Thickness of each image slice.\n\nImage Resolution Format: Combines the number of rows, columns, slices, pixel spacings, and slice thickness into a single descriptive string.\n\nMfg Model: The model of the imaging equipment.\n\nReconstruction: The type of reconstruction used in the imaging process.\n\n---\n\n### How to use\nPut all the MRI and PET xml files in two separate folders. There are two codes provided in here, one for MRI and one for PET.\nwithin the codes, set the address of the folders in:\n\nDefine the directory where your XML files are located\n\ndirectory = 'E:\\SDU_University\\PhD Project\\Paper - KAN\\Metadata\\METADATA-PET-ALL'\n\nRun the code. The 'pd' variable contains the information in a dataframe.\n\nEnjoy.\n\n---\nYou are free to:\n- Share — copy and redistribute the material in any medium or format\n- Adapt — remix, transform, and build upon the material\n- for any purpose, even commercially.\n\nUnder the following terms:\n- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaha-parsayan%2Fxml-metadata-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaha-parsayan%2Fxml-metadata-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaha-parsayan%2Fxml-metadata-extractor/lists"}