Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/ailiop/idvf
Browse files Browse the repository at this point in the history
  • Loading branch information
ailiop committed Mar 25, 2019
2 parents 1237c40 + 2b9a679 commit 4e3be11
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 30 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ path][matlab-path]. All functions are organized in [packages][matlab-pkg].
### Testing


To test idvf, run the included demo scripts (`demo_inversion_2d`,
`demo_inversion_3d_z0`, `demo_inversion_3d_zsin`). Each script
demonstrates inversion of a sample forward DVF using 8 different feedback
control settings, and produces the following visualizations:
To test idvf, run `test_idvf` (which simply runs the included demo scripts
`demo_inversion_2d`, `demo_inversion_3d_z0`, and `demo_inversion_3d_zsin`).
Each demo performs inversion of a synthetic forward DVF using 8 different
feedback control settings, and produces the following visualizations:

- Deformation of a synthetic grid-like image by the forward DVF.
- Spectral measure maps of the forward DVF
Expand Down
10 changes: 5 additions & 5 deletions demo_inversion_2d.m
Original file line number Diff line number Diff line change
Expand Up @@ -329,21 +329,21 @@
%
% Alexandros-Stavros Iliopoulos [email protected]
%
% VERSION
% RELEASE
%
% 0.2 - December 21, 2018
% 1.0.2 - December 21, 2018
%
% CHANGELOG
%
% 0.2 (Dec 21, 2018) - Alexandros
% 1.0.2 (Dec 21, 2018) - Alexandros
% + added IC residual magnitude maps
% + added image-space error maps (reference image recovery)
% + added control scheme: pointwise optimal control values with
% local search, local acceleration, and two-scale iteration
% . changed synthetic reference image to smooth version
% . parameter clean-up and explicit visualization options
%
% 0.1 (Oct 08, 2018) - Alexandros
% . initial implementation
% 1.0.0 (Oct 08, 2018) - Alexandros
% . initial version
%
% ------------------------------------------------------------
15 changes: 9 additions & 6 deletions demo_inversion_3d_z0.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

fprintf( '...visualizing synthetic reference and study images...\n' );

IRef = util.imageGridSmooth( [szDom zdim], [15 15 5] );
IRef = util.imageGridSmooth( szDom, [15 15 5] );
IStd = dvf.imdeform( IRef, F );

hFig = vis.mfigure;
Expand Down Expand Up @@ -339,21 +339,24 @@
%
% Alexandros-Stavros Iliopoulos [email protected]
%
% VERSION
% RELEASE
%
% 0.2 - December 21, 2018
% 1.0.3 - December 21, 2018
%
% CHANGELOG
%
% 0.2 (Dec 21, 2018) - Alexandros
% 1.0.3 (Mar 23, 2019) - Alexandros
% ! fixed error in synthetic image generation
%
% 1.0.2 (Dec 21, 2018) - Alexandros
% + added IC residual magnitude maps
% + added image-space error maps (reference image recovery)
% + added control scheme: pointwise optimal control values with
% local search, local acceleration, and two-scale iteration
% . changed synthetic reference image to smooth version
% . parameter clean-up and explicit visualization options
%
% 0.1 (Oct 08, 2018) - Alexandros
% . initial implementation
% 1.0.1 (Oct 08, 2018) - Alexandros
% . initial version
%
% ------------------------------------------------------------
17 changes: 2 additions & 15 deletions demo_inversion_3d_zsin.m
Original file line number Diff line number Diff line change
Expand Up @@ -333,21 +333,8 @@
%
% Alexandros-Stavros Iliopoulos [email protected]
%
% VERSION
% RELEASE
%
% 0.2 - December 21, 2018
%
% CHANGELOG
%
% 0.2 (Dec 21, 2018) - Alexandros
% + added IC residual magnitude maps
% + added image-space error maps (reference image recovery)
% + added control scheme: pointwise optimal control values with
% local search, local acceleration, and two-scale iteration
% . changed synthetic reference image to smooth version
% . parameter clean-up and explicit visualization options
%
% 0.1 (Oct 08, 2018) - Alexandros
% . initial implementation
% 1.0.2 - December 21, 2018
%
% ------------------------------------------------------------
75 changes: 75 additions & 0 deletions test_idvf.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
% test_idvf.m
%
% Test idvf functionality by running the included demo scripts.
%
% ----------------------------------------------------------------------
%
% Copyright (C) 2019, Department of Computer Science, Duke University
%
% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License as published by the
% Free Software Foundation, either version 3 of the License, or (at your
% option) any later version.
%
% This program is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
% Public License for more details.
%
% You should have received a copy of the GNU General Public License along
% with this program. If not, see <https://www.gnu.org/licenses/>.
%
% ----------------------------------------------------------------------
%



%% ==================== (BEGIN)

fprintf( '\n***** BEGIN (%s) *****\n\n', mfilename );


%% ==================== RUN DEMO SCRIPTS

% ---------- 2D demo

fprintf( ' > press any key to run the 2D demo\n' );
fprintf( ' ! figures and workspace variables will be cleared !\n' );
pause

run( 'demo_inversion_2d' );

% ---------- 3D demo (zero z-displacement)

fprintf( ' > press any key to run the 3D demo (zero z-displacement)\n' );
fprintf( ' ! figures and workspace variables will be cleared !\n' );
pause

run( 'demo_inversion_3d_z0' );

% ---------- 3D demo (sinusoidal z-displacement)

fprintf( ' > press any key to run the 3D demo (sinusoidal z-displacement)\n' );
fprintf( ' ! figures and workspace variables will be cleared !\n' );
pause

run( 'demo_inversion_3d_zsin' );


%% ==================== (END)

fprintf( '\n***** END (%s) *****\n\n', mfilename );



%%------------------------------------------------------------
%
% AUTHORS
%
% Alexandros-Stavros Iliopoulos [email protected]
%
% RELEASE
%
% 1.0.3 - March 25, 2019
%
% ------------------------------------------------------------

0 comments on commit 4e3be11

Please sign in to comment.