Skip to content

Commit

Permalink
pass pipeline name into load dicom
Browse files Browse the repository at this point in the history
  • Loading branch information
louisblankemeier committed Nov 30, 2023
1 parent 10c50ec commit f93d6be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comp2comp/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def __call__(self, inference_pipeline):
segmentations_output_dir, "converted_dcm.nii.gz"
),
reorient_nifti=False,
pipeline_name=self.pipeline_name,
)
inference_pipeline.dicom_series_path = str(self.input_path)
inference_pipeline.dicom_ds = ds
Expand All @@ -118,7 +119,7 @@ def __call__(self, inference_pipeline):
def series_selector(dicom_path, pipeline_name=None):
ds = pydicom.filereader.dcmread(dicom_path)
image_type_list = list(ds.ImageType)
if pipeline_name and (pipeline_name != "aaa"):
if pipeline_name != "aaa":
if not any("primary" in s.lower() for s in image_type_list):
raise ValueError("Not primary image type")
if not any("original" in s.lower() for s in image_type_list):
Expand Down

0 comments on commit f93d6be

Please sign in to comment.