New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python readimage improvement series imageio #258
Python readimage improvement series imageio #258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome @fbudin69500 !
A minor documentation comment and probably want to update the commit message for the second commit -- as I see it, we just pass an array into itk.imread
for a series, 👍 , instead of needing a different API call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement! Everything looks good to me.
When using itk.ImageFileReader to automatically select the image type based on the image information, the user can now
itkTemplate image reading mechanism allows the user to not have to select image type (pixel type and dimension). The same mechanism now also works for image series.
If `itk.imread()` first argument is a list or a tuple, it will read it as an image series. This can be used in combination with `itk.NumericSeriesFileNames` for example.
65c4a6a
to
379702b
Compare
@fbudin69500 How does this differ from #259 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR improves how images and image series are read using ITK Python.
Image series can now be read the same way single image files could already be read, relying on the automatic pixel type and image dimension detection. This can be done both by explicitly calling itk.ImageSeriesReader.New(FileNames=["xxx", "yyy"]) or by using the Pythonic function itk.imread(["xxx", "yyy"]) providing a list of images to the function.
When using itk.ImageFileReader.New() or itk.ImageSeriesReader.New() to read an image for which the pixel type and image dimension is automatically detected, one can now specify which image IO is going to be used. Previously, this could only be done if the pixel type and image dimension were manually specified; Otherwise, the image IO was selected automatically.