Commit 0c5e90bf authored by inhuszar's avatar inhuszar
Browse files

Bugfix in TImage destructor, updated config files.

parent b819164b
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
"logfile": null, "logfile": null,
"paramlogfile": null, "paramlogfile": null,
"verbose": false, "verbose": false,
"outputdir": "/Users/inhuszar/temp/example/stage1", "outputdir": "/home/inhuszar/Desktop/example/stage1",
"stages": ["rotation", "rigid", "affine", "nonlinear"], "stages": ["rotation", "rigid", "affine", "nonlinear"],
"warnings": false, "warnings": false,
"isotropic": true "isotropic": true
}, },
"histology": { "histology": {
"file": "/Users/inhuszar/temp/example/1_histology/histology.tif", "file": "/home/inhuszar/Desktop/example/1_histology/histology.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.008, "resolution": 0.008,
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"snapshot": true "snapshot": true
}, },
"block": { "block": {
"file": null, "file": "/home/inhuszar/Desktop/example/2_tissue_block/tissue_block.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -122,4 +122,4 @@ ...@@ -122,4 +122,4 @@
"visualise": false "visualise": false
} }
} }
} }
\ No newline at end of file
...@@ -9,15 +9,15 @@ ...@@ -9,15 +9,15 @@
"direction": "b2s", "direction": "b2s",
"system": "linux", "system": "linux",
"loglevel": "debug", "loglevel": "debug",
"logfile": null, "logfile": "/home/inhuszar/Desktop/example/stage2/logfile.log",
"paramlogfile": null, "paramlogfile": "/home/inhuszar/Desktop/example/stage2/paramlog.log",
"verbose": false, "verbose": false,
"outputdir": "", "outputdir": "/home/inhuszar/Desktop/example/stage2",
"stages": ["rigid", "affine", "nonlinear"], "stages": ["rigid", "affine", "nonlinear"],
"warnings": false "warnings": false
}, },
"block": { "block": {
"file": "/Users/inhuszar/temp/example/2_tissue_block/tissue_block.tif", "file": "/home/inhuszar/Desktop/example/2_tissue_block/tissue_block.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"snapshot": true "snapshot": true
}, },
"slice": { "slice": {
"file": "/Users/inhuszar/temp/example/3_brain_slice/0.tif", "file": "/home/inhuszar/Desktop/example/3_brain_slice/0.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"ub": null "ub": null
} }
}, },
"sites": "", "sites": "/home/inhuszar/Desktop/example/3_brain_slice/sites/sites.txt",
"jiggle": { "jiggle": {
"scale": 0.1, "scale": 0.1,
"xrange": [10.0, 10.0], "xrange": [10.0, 10.0],
...@@ -125,4 +125,4 @@ ...@@ -125,4 +125,4 @@
"visualise": false "visualise": false
} }
} }
} }
\ No newline at end of file
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
"system": "linux", "system": "linux",
"loglevel": "debug", "loglevel": "debug",
"logfile": null, "logfile": null,
"paramlogfile": "/Users/inhuszar/temp/example/stage3/paramlogs.log", "paramlogfile": "/home/inhuszar/Desktop/example/stage3/paramlogs.log",
"verbose": false, "verbose": false,
"outputdir": "/Users/inhuszar/temp/example/stage3", "outputdir": "/home/inhuszar/Desktop/example/stage3",
"stages": [1, 2, 3, 4, 5, 3, 4, 5], "stages": [1, 2, 3, 4, 5, 3, 4, 5],
"isotropic": true, "isotropic": true,
"cost": "MIND", "cost": "MIND",
"warnings": false "warnings": false
}, },
"slice": { "slice": {
"file": "/Users/inhuszar/temp/example/3_brain_slice/0.tif", "file": "/home/inhuszar/Desktop/example/3_brain_slice/0.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"snapshot": true "snapshot": true
}, },
"volume": { "volume": {
"file": "/Users/inhuszar/temp/example/4_mri/mri.nii.gz", "file": "/home/inhuszar/Desktop/example/4_mri/mri.nii.gz",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": null, "resolution": null,
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
"centre": [2.2, 66.99, -6.3], "centre": [2.2, 66.99, -6.3],
"normal": [0, 1, 0], "normal": [0, 1, 0],
"offset": 0, "offset": 0,
"thickness": 20, "thickness": 10,
"n_positions": 11, "n_positions": 5,
"range": [0, 20, 20], "range": [0, 0, 0],
"n_orientations": [1, 5, 5] "n_orientations": [1, 1, 1]
}, },
"iterations": 1, "iterations": 1,
"n_cpu": 1, "n_cpu": -1,
"top": 0.3, "top": 0.3,
"slice_scaling": [2, 1], "slice_scaling": [2, 1],
"slice_smoothing": [0, 0], "slice_smoothing": [0, 0],
...@@ -221,4 +221,4 @@ ...@@ -221,4 +221,4 @@
} }
} }
} }
} }
\ No newline at end of file
{ {
"header": { "header": {
"title": "TIRL (Stage 1) Histology-to-block image registration routine", "title": "TIRL MND (Stage 1) Histology-to-block image registration routine",
"description": "Sparse histology-to-MRI registration pipeline; stage 1.", "description": "Developed for the Oxford MND Post-Mortem Imaging Biomarkers study.",
"author": "Istvan N Huszar" "author": "Istvan N Huszar"
}, },
"general": { "general": {
"name": "histology_to_block", "name": "histology_to_block",
"direction": "h2b", "direction": "h2b",
"system": "linux", "system": "linux",
"verbosity": "debug", "loglevel": "debug",
"logfile": null, "logfile": null,
"paramlogfile": null, "paramlogfile": null,
"outputdir": "/storage/code/tirl/tirl/example/stage1", "verbose": false,
"outputdir": "/home/inhuszar/Desktop/example/stage1",
"stages": ["rotation", "rigid", "affine", "nonlinear"], "stages": ["rotation", "rigid", "affine", "nonlinear"],
"warnings": false "warnings": false,
"isotropic": true
}, },
"histology": { "histology": {
"file": "/storage/code/tirl/tirl/example/1_histology/histology.tif", "file": "/home/inhuszar/Desktop/example/1_histology/histology.tif",
"storage": "mem", "storage": "mem",
"dtype": "<f4", "dtype": "f4",
"resolution": 0.008, "resolution": 0.008,
"mask": { "mask": {
"file": null, "file": null,
...@@ -34,14 +36,14 @@ ...@@ -34,14 +36,14 @@
"snapshot": true "snapshot": true
}, },
"block": { "block": {
"file": "/storage/code/tirl/tirl/example/2_tissue_block/tissue_block.tif", "file": "/home/inhuszar/Desktop/example/2_tissue_block/tissue_block.tif",
"storage": "mem", "storage": "mem",
"dtype": "<f4", "dtype": "f4",
"resolution": 0.050, "resolution": 0.05,
"mask": { "mask": {
"file": "/storage/code/tirl/tirl/example/2_tissue_block/tissue_block_mask.tif", "file": null,
"normalise": true, "normalise": true,
"function": null, "function": "dilated_object_mask",
"automask": { "automask": {
"thr": 0, "thr": 0,
"uthr": 1 "uthr": 1
...@@ -52,15 +54,15 @@ ...@@ -52,15 +54,15 @@
"snapshot": false "snapshot": false
}, },
"preprocessing": { "preprocessing": {
"histology": ["match_block_resolution", "histology_preprocessing"], "histology": ["match_block_resolution", "histology_preprocessing", "pad"],
"block": ["block_preprocessing"] "block": ["block_preprocessing"]
}, },
"regparams": { "regparams": {
"init": { "init": {
"scale": { "scale": {
"x0": [1.0, 1.0], "x0": 1.0,
"lb": [0.9, 0.9], "lb": 0.9,
"ub": [1.1, 1.1] "ub": 1.1
}, },
"rotation": { "rotation": {
"x0": 0.0, "x0": 0.0,
...@@ -75,8 +77,8 @@ ...@@ -75,8 +77,8 @@
}, },
"affine": { "affine": {
"x0": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0], "x0": [1.0, 0.0, 0.0, 0.0, 1.0, 0.0],
"lb": [0.8, -1.0, -5.0, -1.0, 0.8, -5.0], "lb": [0.95, -0.2, -1.0, -0.2, 0.95, -1.0],
"ub": [1.2, 1.0, 5.0, 1.0, 1.2, 5.0] "ub": [1.05, 0.2, 1.0, 0.2, 1.05, 1.0]
}, },
"nonlinear": { "nonlinear": {
"x0": 0.0, "x0": 0.0,
...@@ -85,36 +87,36 @@ ...@@ -85,36 +87,36 @@
} }
}, },
"rotsearch": { "rotsearch": {
"coarse": 90, "coarse": 30,
"scale": 0.1, "scale": 0.125,
"visualise": false, "visualise": false,
"xtol_rel": 0.01, "xtol_rel": 0.01,
"xtol_abs": [0.01, 0.001, 0.001, 0.1, 0.1], "xtol_abs": [0.001, 0.001, 0.001, 0.001],
"opt_step": [0.1, 0.01, 0.01, 1.0, 1.0] "opt_step": 0.5
}, },
"rigid": { "rigid": {
"scaling": [30, 20], "scaling": [16, 8, 4],
"smoothing": [0, 0], "smoothing": [0, 0, 0],
"xtol_rel": 0.01, "xtol_rel": 0.01,
"xtol_abs": [0.01, 0.001, 0.001, 0.1, 0.1], "xtol_abs": [0.001, 0.001, 0.001, 0.001],
"opt_step": [0.1, 0.01, 0.01, 1.0, 1.0], "opt_step": 0.1,
"visualise": false "visualise": false
}, },
"affine": { "affine": {
"scaling": [20, 10, 5, 2], "scaling": [8, 4],
"smoothing": [0, 0, 0, 0], "smoothing": [0, 0],
"xtol_rel": 0.01, "xtol_rel": 0.01,
"xtol_abs": [0.001, 0.1, 0.1, 0.1, 0.001, 0.1], "xtol_abs": [0.001, 0.001, 0.001, 0.001, 0.001, 0.001],
"opt_step": [0.01, 0.01, 1, 0.01, 0.01, 1], "opt_step": 0.1,
"visualise": false "visualise": false
}, },
"nonlinear": { "nonlinear": {
"scaling": [30, 20, 10, 5], "scaling": [16, 8, 4],
"smoothing": [0, 0, 0, 0], "smoothing": [0, 0, 0],
"sigma": 1, "sigma": 1,
"truncate": 1.5, "truncate": 1.5,
"regweight": 0.3, "regweight": 0.3,
"maxiter": [20, 20, 20, 20], "maxiter": [20, 20, 20, 20, 5],
"xtol_abs": 0.1, "xtol_abs": 0.1,
"xtol_rel": 0.01, "xtol_rel": 0.01,
"visualise": false "visualise": false
......
{ {
"header": { "header": {
"title": "TIRL (Stage 2) Block-to-slice image registration routine", "title": "TIRL MND (Stage 2) Block-to-slice image registration routine",
"description": "Sparse histology-to-MRI registration pipeline; stage 2.", "description": "Developed for the Oxford MND Post-Mortem Imaging Biomarkers study.",
"author": "Istvan N Huszar" "author": "Istvan N Huszar"
}, },
"general": { "general": {
"name": "block_to_slice", "name": "block_to_slice",
"direction": "b2s", "direction": "b2s",
"system": "linux", "system": "linux",
"verbosity": "debug", "loglevel": "debug",
"logfile": null, "logfile": "/home/inhuszar/Desktop/example/stage2/logfile.log",
"paramlogfile": null, "paramlogfile": "/home/inhuszar/Desktop/example/stage2/paramlog.log",
"outputdir": "/storage/code/tirl/tirl/example/stage2", "verbose": false,
"outputdir": "/home/inhuszar/Desktop/example/stage2",
"stages": ["rigid", "affine", "nonlinear"], "stages": ["rigid", "affine", "nonlinear"],
"warnings": false "warnings": false
}, },
"block": { "block": {
"file": "/storage/code/tirl/tirl/example/2_tissue_block/tissue_block.tif", "file": "/home/inhuszar/Desktop/example/2_tissue_block/tissue_block.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
"mask": { "mask": {
"file": "/storage/code/tirl/tirl/example/2_tissue_block/tissue_block_mask.tif", "file": null,
"normalise": true, "normalise": true,
"function": null, "function": null,
"automask": { "automask": {
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
"snapshot": true "snapshot": true
}, },
"slice": { "slice": {
"file": "/storage/code/tirl/tirl/example/3_brain_slice/0.tif", "file": "/home/inhuszar/Desktop/example/3_brain_slice/0.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -84,7 +85,7 @@ ...@@ -84,7 +85,7 @@
"ub": null "ub": null
} }
}, },
"sites": "/storage/code/tirl/tirl/example/3_brain_slice/sites/sites.txt", "sites": "/home/inhuszar/Desktop/example/3_brain_slice/sites/sites.txt",
"jiggle": { "jiggle": {
"scale": 0.1, "scale": 0.1,
"xrange": [10.0, 10.0], "xrange": [10.0, 10.0],
...@@ -113,15 +114,15 @@ ...@@ -113,15 +114,15 @@
"visualise": false "visualise": false
}, },
"nonlinear": { "nonlinear": {
"scaling": [20, 10], "scaling": [20, 10, 5],
"smoothing": [0, 0], "smoothing": [0, 0, 0],
"sigma": 1, "sigma": 1,
"truncate": 1.5, "truncate": 1.5,
"regweight": 0.6, "regweight": 0.3,
"maxiter": [20, 20, 20, 20], "maxiter": [20, 20, 20],
"xtol_abs": 0.1, "xtol_abs": 0.1,
"xtol_rel": 0.01, "xtol_rel": 0.01,
"visualise": true "visualise": false
} }
} }
} }
{ {
"header": { "header": {
"title": "TIRL (Stage 3) Unified slice-to-volume image registration routine", "title": "TIRL MND (Stage 3) Unified slice-to-volume image registration routine",
"description": "Registration of coronal brain slices to whole-brain MRI.", "description": "Developed for the Oxford MND Post-Mortem Imaging Biomarkers study.",
"author": "Istvan N Huszar" "author": "Istvan N Huszar"
}, },
"general": { "general": {
"name": "mnd.coronal", "name": "mnd.coronal",
"verbosity": "debug",
"system": "linux", "system": "linux",
"loglevel": "debug",
"logfile": null, "logfile": null,
"paramlogfile": null, "paramlogfile": "/home/inhuszar/Desktop/example/stage3/paramlogs.log",
"outputdir": "/storage/code/tirl/tirl/example/stage3", "verbose": false,
"stages": [1, 2, 3, 4], "outputdir": "/home/inhuszar/Desktop/example/stage3",
"stages": [1, 2, 3, 4, 5, 3, 4, 5],
"isotropic": true, "isotropic": true,
"cost": "MIND", "cost": "MIND",
"warnings": false "warnings": false
}, },
"slice": { "slice": {
"file": "/storage/code/tirl/tirl/example/3_brain_slice/0.tif", "file": "/home/inhuszar/Desktop/example/3_brain_slice/0.tif",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": 0.05, "resolution": 0.05,
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
"snapshot": true "snapshot": true
}, },
"volume": { "volume": {
"file": "/storage/code/tirl/tirl/example/4_mri/mri.nii.gz", "file": "/home/inhuszar/Desktop/example/4_mri/mri.nii.gz",
"storage": "mem", "storage": "mem",
"dtype": "f4", "dtype": "f4",
"resolution": null, "resolution": null,
...@@ -78,24 +79,24 @@ ...@@ -78,24 +79,24 @@
"centre": [2.2, 66.99, -6.3], "centre": [2.2, 66.99, -6.3],
"normal": [0, 1, 0], "normal": [0, 1, 0],
"offset": 0, "offset": 0,
"thickness": 30, "thickness": 10,
"n_positions": 11, "n_positions": 5,
"range": [0, 20, 20], "range": [0, 0, 0],
"n_orientations": [1, 5, 5] "n_orientations": [1, 1, 1]
}, },
"iterations": 2, "iterations": 1,
"n_cpu": -1, "n_cpu": -1,
"top": 0.5, "top": 0.3,
"slice_scaling": [4, 2, 1], "slice_scaling": [2, 1],
"slice_smoothing": [0, 0, 0], "slice_smoothing": [0, 0],
"volume_scaling": [4, 2, 1], "volume_scaling": [2, 1],
"volume_smoothing": [0, 0, 0], "volume_smoothing": [0, 0],
"constrained": true, "constrained": true,
"try_unconstrained": true, "try_unconstrained": false,
"opt_step": 0.1, "opt_step": 0.1,
"stage_1a": { "stage_1a": {
"scale2d_lower_delta": 0.2, "scale2d_lower_delta": 0.05,
"scale2d_upper_delta": 0.2, "scale2d_upper_delta": 0.05,
"rot2d_lower_delta": 20.0, "rot2d_lower_delta": 20.0,
"rot2d_upper_delta": 20.0, "rot2d_upper_delta": 20.0,
"trans2d_lower_delta": [10.0, 10.0], "trans2d_lower_delta": [10.0, 10.0],
...@@ -103,8 +104,8 @@ ...@@ -103,8 +104,8 @@
"xtol_abs": [0.01, 0.01, 0.01, 0.01] "xtol_abs": [0.01, 0.01, 0.01, 0.01]