Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyfeeds-tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
pyfeeds-tests
Merge requests
!61
Unit tests for vecreg
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Unit tests for vecreg
mnt/vecreg
into
master
Overview
0
Commits
1
Pipelines
6
Changes
2
Merged
Paul McCarthy
requested to merge
mnt/vecreg
into
master
1 year ago
Overview
0
Commits
1
Pipelines
6
Changes
1
Expand
Primarily testing the new
--premat
/
--postmat
options (see
fdt!23 (merged)
)
0
0
Merge request reports
Compare
version 2
version 3
baf8eb24
1 year ago
version 2
79c803fd
1 year ago
version 1
63f2f133
1 year ago
master (base)
and
version 3
latest version
4ab6198c
1 commit,
1 year ago
version 3
baf8eb24
1 commit,
1 year ago
version 2
79c803fd
1 commit,
1 year ago
version 1
63f2f133
1 commit,
1 year ago
Show latest version
1 file
+
28
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
unit_tests/fdt/vecreg/feedsRun
+
28
−
3
Options
@@ -34,7 +34,7 @@ def main():
# create a copy of the diff2std warp
# which does not encode the diff2std
# affine
diff2std_warp_no_premat = outdir/'diff2std_
no_pm_warp
.nii.gz'
diff2std_warp_no_premat = outdir/'diff2std_
warp_no_premat
.nii.gz'
convertwarp(diff2std_warp_no_premat, std,
warp1=diff2std_warp,
premat=std2diff,
@@ -56,10 +56,35 @@ def main():
warpfield=diff2std_warp_no_premat,
premat=diff2std)
# compare the result
dyads1 = Image(dyads_std).data
dyads2 = Image(dyads_std_with_premat).data
diff = cmpVectorArrays(dyads1, dyads2)
assert np.isclose(diff, 0), diff
diff = cmpVectorArrays(dyads1, dyads2)
assert np.isclose(diff, 0, atol=1e-4), diff
# Create a nonsense warp field with a postmat
diff2std_warp_postmat = outdir/'diff2std_warp_postmat.nii.gz'
convertwarp(diff2std_warp_postmat, std,
warp1=diff2std_warp_no_premat,
premat=diff2std,
postmat=std2diff)
# Warp dyads with the nonsense warp
dyads_postmat1 = outdir/'dyads_postmat1.nii.gz'
vecreg(dyads, dyads_postmat1, std,
warpfield=diff2std_warp_postmat)
# And with the original warp+premat+postmat
dyads_postmat2 = outdir/'dyads_postmat2.nii.gz'
vecreg(dyads, dyads_postmat2, std,
warpfield=diff2std_warp_no_premat,
premat=diff2std, postmat=std2diff)
# And check that the results are equivalent
dyads1 = Image(dyads_postmat1).data
dyads2 = Image(dyads_postmat2).data
diff = cmpVectorArrays(dyads1, dyads2)
assert np.isclose(diff, 0, atol=1e-4), diff
if __name__ == '__main__':
Loading