diff --git a/models/Par0065/Parameters0065_Affine.txt b/models/Par0065/Parameters0065_Affine.txt new file mode 100644 index 0000000..2e7af94 --- /dev/null +++ b/models/Par0065/Parameters0065_Affine.txt @@ -0,0 +1,24 @@ +(AutomaticParameterEstimation "true") +(AutomaticScalesEstimation "true") +(CheckNumberOfSamples "true") +(DefaultPixelValue 0) +(FinalBSplineInterpolationOrder 3) +(FixedImagePyramid "FixedSmoothingImagePyramid") +(ImageSampler "RandomCoordinate") +(Interpolator "LinearInterpolator") +(MaximumNumberOfIterations 256) +(MaximumNumberOfSamplingAttempts 8) +(Metric "AdvancedMattesMutualInformation") +(MovingImagePyramid "MovingSmoothingImagePyramid") +(NewSamplesEveryIteration "true") +(NumberOfResolutions 4) +(NumberOfSamplesForExactGradient 4096) +(NumberOfSpatialSamples 2048) +(Optimizer "AdaptiveStochasticGradientDescent") +(Registration "MultiResolutionRegistration") +(ResampleInterpolator "FinalBSplineInterpolator") +(Resampler "DefaultResampler") +(ResultImageFormat "nii") +(Transform "AffineTransform") +(WriteIterationInfo "false") +(WriteResultImage "true") \ No newline at end of file diff --git a/models/Par0065/Parameters0065_Bspline.txt b/models/Par0065/Parameters0065_Bspline.txt new file mode 100644 index 0000000..2edf159 --- /dev/null +++ b/models/Par0065/Parameters0065_Bspline.txt @@ -0,0 +1,202 @@ +// Example parameter file for B-spline registration +// C-style comments: // + +// The internal pixel type, used for internal computations +// Leave to float in general. +// NB: this is not the type of the input images! The pixel +// type of the input images is automatically read from the +// images themselves. +// This setting can be changed to "short" to save some memory +// in case of very large 3D images. +(FixedInternalImagePixelType "float") +(MovingInternalImagePixelType "float") + +// The dimensions of the fixed and moving image +// NB: This has to be specified by the user. The dimension of +// the images is currently NOT read from the images. +// Also note that some other settings may have to specified +// for each dimension separately. +//no longer needed(FixedImageDimension 2) +//(MovingImageDimension 2) + +// Specify whether you want to take into account the so-called +// direction cosines of the images. Recommended: true. +// In some cases, the direction cosines of the image are corrupt, +// due to image format conversions for example. In that case, you +// may want to set this option to "false". +(UseDirectionCosines "true") + +// **************** Main Components ************************** + +// The following components should usually be left as they are: +//(Registration "MultiResolutionRegistration") +(Registration "MultiMetricMultiResolutionRegistration") +(Interpolator "BSplineInterpolator") +(ResampleInterpolator "FinalBSplineInterpolator") +(Resampler "DefaultResampler") + +// These may be changed to Fixed/MovingSmoothingImagePyramid. +// See the manual. +//(FixedImagePyramid "FixedRecursiveImagePyramid") +//(MovingImagePyramid "MovingRecursiveImagePyramid") +(FixedImagePyramid "FixedSmoothingImagePyramid") +(MovingImagePyramid "MovingSmoothingImagePyramid") + +// The following components are most important: +// The optimizer AdaptiveStochasticGradientDescent (ASGD) works +// quite ok in general. The Transform and Metric are important +// and need to be chosen careful for each application. See manual. +(Optimizer "AdaptiveStochasticGradientDescent") +(Transform "BSplineTransform") + +//(Metric "AdvancedMeanSquares") +(Metric "AdvancedNormalizedCorrelation") +//(Metric "AdvancedMattesMutualInformation") + + +//(Metric "AdvancedMattesMutualInformation" "BendingEnergyPenalty") +//(Metric "TransformBendingEnergyPenalty" "AdvancedMattesMutualInformation") + +//(Metric0Weight 1.0) +//(Metric1Weight 0.1) +//Metric1RelativeWeight + +// ***************** Transformation ************************** + +// The control point spacing of the bspline transformation in +// the finest resolution level. Can be specified for each +// dimension differently. Unit: mm. +// The lower this value, the more flexible the deformation. +// Low values may improve the accuracy, but may also cause +// unrealistic deformations. This is a very important setting! +// We recommend tuning it for every specific application. It is +// difficult to come up with a good 'default' value. +(FinalGridSpacingInVoxels 4) +//(FinalGridSpacingInPhysicalUnits 8) +//(FinalGridSpacingInPhysicalUnits 16) + + +// Alternatively, the grid spacing can be specified in voxel units. +// To do that, uncomment the following line and comment/remove +// the FinalGridSpacingInPhysicalUnits definition. +//(FinalGridSpacingInVoxels 16) + +// By default the grid spacing is halved after every resolution, +// such that the final grid spacing is obtained in the last +// resolution level. You can also specify your own schedule, +// if you uncomment the following line: +//(GridSpacingSchedule 4.0 4.0 2.0 1.0) +// This setting can also be supplied per dimension. + +(GridSpacingSchedule 8 8 8 4.0 4.0 4.0 2.0 2.0 2.0 1.0 1.0 1.0) + +// Whether transforms are combined by composition or by addition. +// In generally, Compose is the best option in most cases. +// It does not influence the results very much. +(HowToCombineTransforms "Compose") + +// ******************* Similarity measure ********************* + +// Number of grey level bins in each resolution level, +// for the mutual information. 16 or 32 usually works fine. +// You could also employ a hierarchical strategy: +//(NumberOfHistogramBins 16 32 64) +(NumberOfHistogramBins 32) + +// If you use a mask, this option is important. +// If the mask serves as region of interest, set it to false. +// If the mask indicates which pixels are valid, then set it to true. +// If you do not use a mask, the option doesn't matter. +(ErodeMask "false") + +// ******************** Multiresolution ********************** + +// The number of resolutions. 1 Is only enough if the expected +// deformations are small. 3 or 4 mostly works fine. For large +// images and large deformations, 5 or 6 may even be useful. +(NumberOfResolutions 4) + +// The downsampling/blurring factors for the image pyramids. +// By default, the images are downsampled by a factor of 2 +// compared to the next resolution. +// So, in 2D, with 4 resolutions, the following schedule is used: +//(ImagePyramidSchedule 8 8 4 4 2 2 1 1 ) +// And in 3D: +//(ImagePyramidSchedule 8 8 8 4 4 4 2 2 2 1 1 1 ) + +(ImagePyramidSchedule 8 8 8 4 4 4 2 2 2 1 1 1) + +// You can specify any schedule, for example: +//(ImagePyramidSchedule 4 4 4 3 2 1 1 1 ) +// Make sure that the number of elements equals the number +// of resolutions times the image dimension. + +// ******************* Optimizer **************************** + +// Maximum number of iterations in each resolution level: +// 200-2000 works usually fine for nonrigid registration. +// The more, the better, but the longer computation time. +// This is an important parameter! +//(MaximumNumberOfIterations 5000) +//(MaximumNumberOfIterations 1000) +(MaximumNumberOfIterations 2000) +//(MaximumNumberOfIterations 2000) +//(MaximumNumberOfIterations 2500) +//(MaximumNumberOfIterations 3000) + +// The step size of the optimizer, in mm. By default the voxel size is used. +// which usually works well. In case of unusual high-resolution images +// (eg histology) it is necessary to increase this value a bit, to the size +// of the "smallest visible structure" in the image: +(MaximumStepLength 0.3) + +// **************** Image sampling ********************** + +// Number of spatial samples used to compute the mutual +// information (and its derivative) in each iteration. +// With an AdaptiveStochasticGradientDescent optimizer, +// in combination with the two options below, around 2000 +// samples may already suffice. +//(NumberOfSpatialSamples 500) +//(NumberOfSpatialSamples 1000) +//(NumberOfSpatialSamples 2000) +//(NumberOfSpatialSamples 3000) +(NumberOfSpatialSamples 4000) +//(NumberOfSpatialSamples 5000) + +// Refresh these spatial samples in every iteration, and select +// them randomly. See the manual for information on other sampling +// strategies. +(NewSamplesEveryIteration "true") +(ImageSampler "RandomCoordinate") + +// ************* Interpolation and Resampling **************** + +// Order of B-Spline interpolation used during registration/optimisation. +// It may improve accuracy if you set this to 3. Never use 0. +// An order of 1 gives linear interpolation. This is in most +// applications a good choice. +(BSplineInterpolationOrder 1) + +// Order of B-Spline interpolation used for applying the final +// deformation. +// 3 gives good accuracy; recommended in most cases. +// 1 gives worse accuracy (linear interpolation) +// 0 gives worst accuracy, but is appropriate for binary images +// (masks, segmentations); equivalent to nearest neighbor interpolation. +(FinalBSplineInterpolationOrder 3) + +//Default pixel value for pixels that come from outside the picture: +(DefaultPixelValue 0) + +// Choose whether to generate the deformed moving image. +// You can save some time by setting this to false, if you are +// not interested in the final deformed moving image, but only +// want to analyze the deformation field for example. +(WriteResultImage "true") + +// The pixel type and format of the resulting deformed moving image +(ResultImagePixelType "float") +(ResultImageFormat "mha") + + diff --git a/models/Par0065/Parameters0065_Rigid.txt b/models/Par0065/Parameters0065_Rigid.txt new file mode 100644 index 0000000..6cf3e5d --- /dev/null +++ b/models/Par0065/Parameters0065_Rigid.txt @@ -0,0 +1,24 @@ +(AutomaticParameterEstimation "true") +(AutomaticScalesEstimation "true") +(CheckNumberOfSamples "true") +(DefaultPixelValue 0) +(FinalBSplineInterpolationOrder 3) +(FixedImagePyramid "FixedSmoothingImagePyramid") +(ImageSampler "RandomCoordinate") +(Interpolator "LinearInterpolator") +(MaximumNumberOfIterations 256) +(MaximumNumberOfSamplingAttempts 8) +(Metric "AdvancedMattesMutualInformation") +(MovingImagePyramid "MovingSmoothingImagePyramid") +(NewSamplesEveryIteration "true") +(NumberOfResolutions 4) +(NumberOfSamplesForExactGradient 4096) +(NumberOfSpatialSamples 2048) +(Optimizer "AdaptiveStochasticGradientDescent") +(Registration "MultiResolutionRegistration") +(ResampleInterpolator "FinalBSplineInterpolator") +(Resampler "DefaultResampler") +(ResultImageFormat "nii") +(Transform "EulerTransform") +(WriteIterationInfo "false") +(WriteResultImage "true") \ No newline at end of file diff --git a/models/Par0065/README.md b/models/Par0065/README.md new file mode 100644 index 0000000..7591dd1 --- /dev/null +++ b/models/Par0065/README.md @@ -0,0 +1,51 @@ +# Registration parameters for strain liver analysis. + +### Registration Description +interpatient; rigid, affine and bspline transform; advanced cross correlation + + +### Image data + + - 3D MRI T1 Data healthy volunteers + - Liver + - 3 different states: end-expiration, end-inspiration, drinking of 1.5l of water + - Resolution: 1.5x1.5x3mm^3 + +### Application + +These parameters are used to register the livers at end-inspiration and 1.5l water drinking to end-expiration. From the deformation field volumetric strain and octahedral shear strain [1] is determined. + +### Registration settings + +Livers are aligned using rigid transform first. Next an affine and bspline transform is performed on the livers. + +- Elastix version: 5.0.0 +- ITKElastix version: 0.21.0 + +Python call: + +Do rigid transform: +` +elastix_object = itk.ElastixRegistrationMethod.New(fixed_image, moving_image) +elastix_object.SetParameterObject(parameter_object_rigid) +elastix_object.UpdateLargestPossibleRegion() +transformed_image = elastix_object.GetOutput() +transformed_parameters = elastix_object.GetTransformParameterObject() +` + +Do affine, bspline transfrom: +` +elastix_object = itk.ElastixRegistrationMethod.New(fixed_image, transformed_image) +elastix_object.SetParameterObject(parameter_object_affine_bspline) +elastix_object.UpdateLargestPossibleRegion() +transformed_image = elastix_object.GetOutput() +transformed_parameters = elastix_object.GetTransformParameterObject() +` + +### Published in + +Noah Jaitner, Yasmine Safraou, Matthias Anders, Jakob Schattenfroh, Tom Meyer, Biru Huang, Jakob Jordan, Oliver Boehm, Alfonso Caiazzo, Tobias Schaeffter, Jing Guo, Ingolf Sack (2024), Non-invasive assessment of portal pressure by combined measurement of volumetric strain and stiffness of in vivo human liver (submitted) + +### References + +[1] McGarry, M.D.J., et al., An octahedral shear strain-based measure of SNR for 3D MR elastography. Physics in Medicine and Biology, 2011. 56(13): p. N153-N164. diff --git a/models/Par0065/Screenshot.PNG b/models/Par0065/Screenshot.PNG new file mode 100644 index 0000000..aa16056 Binary files /dev/null and b/models/Par0065/Screenshot.PNG differ