ENH: Add convenience function ReadImage#2184
ENH: Add convenience function ReadImage#2184hjmjohnson merged 1 commit intoInsightSoftwareConsortium:masterfrom
Conversation
|
Review suggestion: ignore white space when comparing the files: https://github.com/InsightSoftwareConsortium/ITK/pull/2184/files?w=1 |
|
Nice! LGTM, but I think @dzenanz should have a look before merging. |
|
@hjmjohnson Thank you for your approval, Hans. An alternative could be to add the function as a That would also be OK to me. But I think people prefer to just call |
|
@thewtex we should definitely mention these convenience functions in 5.2.0 release notes. |
blowekamp
left a comment
There was a problem hiding this comment.
The behavior to the streaming test changes with this PR.
e1a671a to
56f39bb
Compare
Added `itk::ReadImage<TOutputImage>(const std::string & filename)`, to allows simplifying the C++ code for reading an image. Suggested by Dženan Zukić at InsightSoftwareConsortium#2102 (comment) Follow-up to: "ENH: add a convenience function WriteImage" Pull request: InsightSoftwareConsortium#2160 Commit: 60b0984 Replaced manual creation of `ImageFileReader` objects in Common tests by calls to the new `itk::ReadImage` function. Also removed related redundant try-catch blocks from SymmetricSecondRankTensorImage tests.
56f39bb to
3778f98
Compare
Requested change has been addressed
Good question @dzenanz but honestly I do not know. The function template is entirely implemented "header only" (implemented entiry in the .h file) so I thought an export macro wouldn't be necessary. What would the macro do? |
Tests that an image written by `itk::WriteImage` can be read back, without loss of data. Uses two recently added functions: - `itk::ReadImage`: pull request InsightSoftwareConsortium#2184 commit aeea88b - `operator==` for images: pull request InsightSoftwareConsortium#2188 commit 7f3337d (`operator==` is called internally by GoogleTest `EXPECT_EQ`.)
Tests that an image written by `itk::WriteImage` can be read back, without loss of data. Uses two recently added functions: - `itk::ReadImage`: pull request #2184 commit aeea88b - `operator==` for images: pull request #2188 commit 7f3337d (`operator==` is called internally by GoogleTest `EXPECT_EQ`.)
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#2184 commit InsightSoftwareConsortium/ITK@aeea88b "ENH: Add convenience function ReadImage", merged on on 22 December 2020, and included with ITK v5.2rc01.
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#2184 commit InsightSoftwareConsortium/ITK@aeea88b "ENH: Add convenience function ReadImage", merged on on 22 December 2020, and included with ITK v5.2rc01.
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#2184 commit InsightSoftwareConsortium/ITK@aeea88b "ENH: Add convenience function ReadImage", merged on on 22 December 2020, and included with ITK v5.2rc01.
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#2184 commit InsightSoftwareConsortium/ITK@aeea88b "ENH: Add convenience function ReadImage", merged on 22 December 2020, and included with ITK v5.2rc01
Follow-up to ITK pull request InsightSoftwareConsortium/ITK#2184 commit InsightSoftwareConsortium/ITK@aeea88b "ENH: Add convenience function ReadImage", merged on 22 December 2020, and included with ITK v5.2rc01
Added
itk::ReadImage<TOutputImage>(const std::string & filename), toallows simplifying the C++ code for reading an image.
Suggested by Dženan Zukić (@dzenanz) at
#2102 (comment)
Follow-up to:
"ENH: add a convenience function WriteImage"
Pull request: #2160
Commit: 60b0984
Replaced manual creation of
ImageFileReaderobjects in Common tests bycalls to the new
itk::ReadImagefunction. Also removed relatedredundant try-catch blocks from SymmetricSecondRankTensorImage tests.