File: example.bat

package info (click to toggle)
elastix 4.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 51,444 kB
  • ctags: 11,825
  • sloc: cpp: 35,827; python: 530; sh: 227; makefile: 23
file content (71 lines) | stat: -rw-r--r-- 2,979 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

@echo # This batch file shows an example of how to call elastix.
@echo # Run "elastix -help" for more information.
@echo #
@echo # This example requires elastix to be in your PATH.
@echo #
@echo # Here we perform a registration by doing sequentially:
@echo #  1) a rigid registration
@echo #  2) a bspline registration
@echo # We write all output in the exampleoutput directory.
@echo #

mkdir exampleoutput

elastix -f exampleinput/fixed.mhd -m exampleinput/moving.mhd -out exampleoutput -p exampleinput/parameters_Rigid.txt -p exampleinput/parameters_BSpline.txt


@echo # In the following way we may mask the input images,
@echo # to prevent background pixels to be taken into account:
@echo #
@echo # elastix -f exampleinput/fixed.mhd -m exampleinput/moving.mhd -fMask exampleinput/mask_fixed.mhd -mMask exampleinput/mask_moving.mhd -out exampleoutput -p exampleinput/parameters_Rigid.txt -p exampleinput/parameters_BSpline.txt

@echo #
@echo # See /exampleoutput/ for the results:
@echo #  1) elastix.log = the logfile
@echo #  2) result.0.mhd = the rigidly transformed result
@echo #  3) result.1.mhd = the bspline transformed result
@echo #  4) TransformParameters.0.txt = the found translation+rotations
@echo #  5) TransformParameters.1.txt = the found bspline parameters
@echo #
@echo # You may compare result.1.mhd to the solution, which is located in
@echo # ./exampleinput: solution_deformedmovingimage.mhd
@echo #
@echo # After doing the registration, we could apply the found deformation
@echo # to the moving mask. In that case, it would be necessary to change
@echo # the FinalBSplineInterpolationOrder to 0 first (see manual) in the
@echo # TransformParameters.1.txt file.
@echo # Once that has been done, call transformix as follows:
@echo #

rem transformix -in exampleinput/mask_moving.mhd -out exampleoutput -tp exampleoutput/TransformParameters.1.txt

@echo #
@echo # The /exampleoutput/ would then contain the following results:
@echo #  6) transformix.log = the logfile
@echo #  7) result.mhd = the transformed mask
@echo #

@echo # Transformix can also be used to generate a deformation field,
@echo # or the "jacobian determinant" field (which indicates the amount
@echo # of compression/expansion.
@echo #
@echo # In this example, we generate the jacobian determinant field:
@echo #

transformix -jac all -out exampleoutput -tp exampleoutput/TransformParameters.1.txt

@echo #
@echo # The /exampleoutput/ directory now additionally contains:
@echo #  8) transformix.log = the logfile
@echo #  9) spatialJacobian.mhd = the jacobian determinant image
@echo #
@echo # Please consult the website, FAQ, and manual for more information.
@echo # type elastix --help or transformix --help for an overview
@echo # of the command line arguments.
@echo #
@echo # If you have any questions, please register for the elastix
@echo # user mailing-list and post your question to the community!
@echo # In that way you will also be kept informed on updates.
@echo #