Skip to content
Snippets Groups Projects
Commit e3597787 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

apply refactoring of a name change

parent fbe2deeb
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ import argparse ...@@ -2,7 +2,7 @@ import argparse
import os import os
from typing import List from typing import List
from mu_map.file.dicom import dcm_type from mu_map.file.dicom import DICOM
def get_files_recursive(_dir: str) -> List[str]: def get_files_recursive(_dir: str) -> List[str]:
...@@ -24,19 +24,19 @@ def get_files_recursive(_dir: str) -> List[str]: ...@@ -24,19 +24,19 @@ def get_files_recursive(_dir: str) -> List[str]:
return files return files
def is_scatter_corrected(dcm: dcm_type) -> bool: def is_scatter_corrected(dcm: DICOM) -> bool:
return not ("NoSC" in dcm.SeriesDescription) return not ("NoSC" in dcm.SeriesDescription)
def is_attenuation_corrected(dcm: dcm_type) -> bool: def is_attenuation_corrected(dcm: DICOM) -> bool:
return not ("NoAC" in dcm.SeriesDescription) return not ("NoAC" in dcm.SeriesDescription)
def shows_segments(dcm: dcm_type) -> bool: def shows_segments(dcm: DICOM) -> bool:
return "PolarMapSeg" in dcm.SeriesDescription return "PolarMapSeg" in dcm.SeriesDescription
def get_type(dcm: dcm_type) -> str: def get_type(dcm: DICOM) -> str:
description = dcm.SeriesDescription.lower() description = dcm.SeriesDescription.lower()
if "syn" in description: if "syn" in description:
return "synthetic" return "synthetic"
...@@ -65,7 +65,7 @@ if __name__ == "__main__": ...@@ -65,7 +65,7 @@ if __name__ == "__main__":
from mu_map.data.prepare import get_protocol from mu_map.data.prepare import get_protocol
from mu_map.data.prepare import headers as meta_headers from mu_map.data.prepare import headers as meta_headers
from mu_map.file.dicom import load_dcm, DCM_TAG_PIXEL_SCALE_FACTOR, dcm_type from mu_map.file.dicom import load_dcm, DCM_TAG_PIXEL_SCALE_FACTOR, DICOM
from mu_map.logging import add_logging_args, get_logger_by_args from mu_map.logging import add_logging_args, get_logger_by_args
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
...@@ -242,3 +242,4 @@ if __name__ == "__main__": ...@@ -242,3 +242,4 @@ if __name__ == "__main__":
data = data.sort_values(by=[headers.id, headers.file]) data = data.sort_values(by=[headers.id, headers.file])
data.to_csv(args.csv, index=False) data.to_csv(args.csv, index=False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment