series_name
doesn't work as expected
#5571
-
I have a directory full of DICOM files of different series:
I use the following code to read tfm = monai.transforms.LoadImage(series_name='42', series_meta=True)
pixel_arr, meta = tfm("path/to/dir/with/dicoms") Since I am dealing with DICOM files(don't have .dcm ending though), I would expect ITKReader to be the reader that will be used. However I get the following output: https://gist.github.com/markus-hinsche/c78278f462b10d72b4ccdd9cd14be712 I think the reason is that MONAI/monai/data/image_reader.py Line 265 in b030839 sets name = () (empty tuple) because GetFileNames doesn't work as expected.
In contrast when running tfm = monai.transforms.LoadImage()
pixel_arr, meta = tfm("path/to/dir/with/dicoms") I get 96 slices (because pixel_arr shape is Any idea how I can get a specific series name? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ITKReader accepts the argument You can initialize the reader and pass it to LoadImage. https://docs.monai.io/en/stable/data.html#itkreader
|
Beta Was this translation helpful? Give feedback.
ITKReader accepts the argument
series_name
.You can initialize the reader and pass it to LoadImage.
https://docs.monai.io/en/stable/data.html#itkreader