Final voxel size

50 views
Skip to first unread message

mfk16

unread,
Jan 4, 2023, 8:43:28 AM1/4/23
to elastix-imageregistration
Hi,

I'm new to using Elastix, but have been successful using a MATLAB wrapper I've found (https://sourcesup.renater.fr/projects/elxfrommatlab/)

My question is: what parameter do I have to set to ensure that the voxel size of my output moving image matches the voxel size of my input moving to be transformed?

My fixed image has voxels of: [256 256 24], with voxel size [0.5859 0.5859 3.9994]
My moving image has voxels of: [512 512 74], with voxel size [0.3125 0.3125 1.3000]

I'd like my transformed moving image to have the voxel size of [0.3125 0.3125 1.3000], and right now my transformed moving image has the voxel size of [0.5859 0.5859 3.9994].

This is the command my program runs:
c:/elastix/elastix.exe -f C:\temp\input\fixed.000.mhd -m moving.000.mhd -out C:\temp\output -p C:\temp\input\parameter.0.txt -p C:\temp\input\parameter.1.txt'

parameter.0.txt file is:
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingImageDimension 3)
(Transform "EulerTransform")
(Registration "MultiResolutionRegistration")
(FixedImagePyramid "FixedRecursiveImagePyramid")
(MovingImagePyramid "MovingRecursiveImagePyramid")
(ImageSampler "Random")
(Interpolator "BSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(Optimizer "AdaptiveStochasticGradientDescent")
(NumberOfSpatialSamples 2048)
(NewSamplesEveryIteration "true")
(BSplineInterpolationOrder 1)
(HowToCombineTransforms "Compose")
(MaximumNumberOfIterations 300)
(UseRandomSampleRegion "false")
(SampleRegionSize 50 50 50)
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(NumberOfResolutions 4)
(ErodeMask "true")
(FinalBSplineInterpolationOrder 3)
(ResultImagePixelType "short")
(DefaultPixelValue 0)
(WriteTransformParametersEachIteration "false")
(WriteTransformParametersEachResolution "false")
(WriteResultImageAfterEachResolution "false")
(UseDirectionCosines "true")
(AutomaticScalesEstimation "true")
(AutomaticTransformInitialization "true")
(NumberOfHistogramBins 32)
(MaximumuNumberOfIterations 500)
(MaximumNumberOfSamplingAttempts 10)
(MaximumStepLength 0.25)

and parameter1.txt file is:
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingImageDimension 3)
(Transform "BSplineTransform")
(Registration "MultiResolutionRegistration")
(FixedImagePyramid "FixedRecursiveImagePyramid")
(MovingImagePyramid "MovingRecursiveImagePyramid")
(ImageSampler "Random")
(Interpolator "BSplineInterpolator")
(Metric "AdvancedMattesMutualInformation")
(Optimizer "AdaptiveStochasticGradientDescent")
(NumberOfSpatialSamples 2048)
(NewSamplesEveryIteration "true")
(BSplineInterpolationOrder 1)
(HowToCombineTransforms "Compose")
(MaximumNumberOfIterations 300)
(UseRandomSampleRegion "false")
(SampleRegionSize 50 50 50)
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(NumberOfResolutions 4)
(ErodeMask "true")
(FinalBSplineInterpolationOrder 3)
(ResultImagePixelType "short")
(DefaultPixelValue 0)
(WriteTransformParametersEachIteration "false")
(WriteTransformParametersEachResolution "false")
(WriteResultImageAfterEachResolution "false")
(UseDirectionCosines "true")
(AutomaticScalesEstimation "true")
(AutomaticTransformInitialization "true")
(NumberOfHistogramBins 32)
(MaximumuNumberOfIterations 500)
(MaximumNumberOfSamplingAttempts 10)
(MaximumStepLength 0.25)
(FinalGridSpacingInPhysicalUnits 16)

Thank you for your help!

-Matt

Reply all
Reply to author
Forward
0 new messages