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)}"
for
baseImage
I'm assuming it should must return aScan
type? reason:the
baseImage.image
will only work ifbaseImage
is of typeScan
, and we can provide better logging/error handlingif so, should verify this type before proceeding with something like:
or something
_Originally posted by @jjjermiah in https://github.com/bhklab/readii/pull/31#discussion_r1722185902_