Skip to content

read_dicom_auto can return any one of (Scan | PET | StructureSet | Dose | Segmentation | None) #32

@strixy16

Description

@strixy16
          `read_dicom_auto` can return any one of `(Scan | PET | StructureSet | Dose | Segmentation | None)`

for baseImage I'm assuming it should must return a Scan type?
reason:

the baseImage.image will only work if baseImage is of type Scan, and we can provide better logging/error handling

segMasks = makeMask(
    segImage,
    baseImage.image,
    existing_roi_indices={"background": 0},
    ignore_missing_regex=False,
)

if so, should verify this type before proceeding with something like:

from imgtools.modules import scan
...
baseImage = read_dicom_auto(baseImageDirPath)
assert isinstance(baseImage, scan.Scan), f"baseImage is not a Scan object. has type {type(baseImage)}"

or something

Originally posted by @jjjermiah in #31 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions