-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add python algebra test #853
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d47dcac
added python tests for SIRF DataContainer Algebra
paskino 19eb336
remove comment
paskino 6265575
added test algebra between datacontainers
paskino 2a634b2
Merge remote-tracking branch 'origin' into add_python_algebra_test
paskino e91c9ed
address codacy complaints
paskino bf613af
added fill number and MR algebra tests
paskino 2549841
split the algebra tests
paskino c42f5a3
removed tests in common
paskino 13b60f1
Merge remote-tracking branch 'origin' into add_python_algebra_test
paskino ab0136d
[ci skip] Update src/common/tests/CMakeLists.txt
paskino 6c41dbf
[ci skip] fixed headers and removed Gadgetron tests from STIR dir
paskino d0a2c46
Merge branch 'add_python_algebra_test' of https://github.com/SyneRBI/…
paskino 8a44c60
Move TestDataContainerAlgebra to Utilities.py
paskino 860b7fa
add multiplication and division to NiftiImageData
paskino 6841618
removed empty tests in common directory
paskino b9288b2
added multiplication and division in cSIRF for NiftiImageData
paskino d771609
test catch division by zero
paskino daf4000
test for zero division exception
paskino c698c00
move catch of ZeroDivisionError up
paskino 66bc040
[ci skip] updates dates in headers
paskino 75b0752
rename members to make them private
paskino 0500127
Merge remote-tracking branch 'origin' into add_python_algebra_test
paskino 170c068
algebra tests are equal in Gadgetron STIR and Reg
paskino 9ab2819
in travis unittest fail because cwd is missing
paskino 980c74e
use AcquisitionData for test on AcquisitionData
paskino 87caf35
removed chdir in tests. Added tests for storage scheme
paskino 0794f8a
update the tests
paskino c2bfb76
removed single quote
paskino 4d66087
gadgetron python tests fixed
paskino a4bf83c
use variables in the scope
paskino 7620751
fixed PET algebra tests
paskino 6ceb6d1
skip test if SPM not available
paskino 634893e
probably all test pass
paskino 0950033
temporary enable tests from builds/SIRF/build
paskino 0a98e67
codacy fixes
paskino 613a001
[ci skip] reinstate original .travis.yml
paskino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#======================================================================== | ||
# Copyright 2021 Science Technology Facilities Council | ||
# | ||
# This file is part of the SyneRBI Synergistic Image Reconstruction Framework (SIRF). | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0.txt | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
#========================================================================= | ||
|
||
import os | ||
import unittest | ||
import sirf.Reg as reg | ||
from sirf.Utilities import examples_data_path, TestDataContainerAlgebra | ||
|
||
|
||
class TestNiftiImageDataAlgebra(unittest.TestCase, TestDataContainerAlgebra): | ||
|
||
def setUp(self): | ||
image1 = reg.ImageData(os.path.join( | ||
examples_data_path('Registration'),'test2.nii.gz') | ||
) | ||
image2 = reg.ImageData(os.path.join( | ||
examples_data_path('Registration'),'test2.nii.gz') | ||
) | ||
|
||
self.image1 = image1 | ||
self.image2 = image2 | ||
|
||
def tearDown(self): | ||
#shutil.rmtree(self.cwd) | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure if this is what's expected. It's possibly that division should silently fail, generating
NaN
orinf
. Might be good to check behaviour of some other libraries (or indeed SIRF)