Skip to content

ENH: compare outputs of itkResampleImageTest2Streaming to determine success#480

Merged
thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
romangrothausmann:compRes4StreamingTest
Mar 28, 2019
Merged

ENH: compare outputs of itkResampleImageTest2Streaming to determine success#480
thewtex merged 1 commit intoInsightSoftwareConsortium:masterfrom
romangrothausmann:compRes4StreamingTest

Conversation

@romangrothausmann
Copy link
Member

relates to #392
and intends to not only take the return value into account but also the comparison of the output with the expected results.

@thewtex in relation to #392 (comment): Since it is necessary for streaming to write to MHAs (not PNGs as originally the case), the output is uncoupled from itkResampleImageTest2, so I guess we do not need the DEPENDS property.
I am not sure though if it is critical that the second input comes from PNG circle.png, which is not available as MHA. I noticed that you changed the first input from PNG to MHA cthead1.mha. Is that necessary for successful streaming and would the same apply for the reference image?
Just using cthead1.mha as second input again is probably not good in conjunction with the comparison because there would be no resampling if the reference image is the same as the main input.

@thewtex
Copy link
Member

thewtex commented Feb 7, 2019

@romangrothausmann awesome, thanks for the follow-up! 💯 🥇

Yes, if the outputs and inputs of the tests are independent, we do not need the DEPENDS property. 👍

Since PNG's cannot stream, the entire image will be read on the first pipeline update -- we should use MHA for these streaming tests.

@romangrothausmann
Copy link
Member Author

Since PNG's cannot stream, the entire image will be read on the first pipeline update -- we should use MHA for these streaming tests.

OK, so either adding a circle.mha to the set of input data or using cthead1.mha also as the 2nd input but then all expected output MHAs would need to be updated and I have doubts that this will lead to actual resampling (not sure about the itkResampleImageFilter details there), since circle.png is used by the other itkResampleImageTest2 tests. So I would g for the first option, if you agree.

@thewtex
Copy link
Member

thewtex commented Feb 8, 2019

+1 for adding circle.mha.

It can be generated with:

import itk
image = itk.imread('circle.png')
itk.imwrite(image, 'circle.mha')

Then, upload the data.

@thewtex
Copy link
Member

thewtex commented Mar 28, 2019

Rebasing on master...

@dzenanz
Copy link
Member

dzenanz commented Mar 28, 2019

Tests are now passing

@thewtex
Copy link
Member

thewtex commented Mar 28, 2019

Merging...

@thewtex thewtex changed the title WIP: ENH: compare outputs of itkResampleImageTest2Streaming to determine success ENH: compare outputs of itkResampleImageTest2Streaming to determine success Mar 28, 2019
@thewtex thewtex merged commit 3ddd0ac into InsightSoftwareConsortium:master Mar 28, 2019
@romangrothausmann romangrothausmann deleted the compRes4StreamingTest branch May 17, 2019 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants