[elastix] Nonrigid registration of dynamic medical imaging data using nD+t B-splines and a groupwise optimization approach

Coert Metz c.metz at erasmusmc.nl
Mon Aug 15 14:30:01 CEST 2011


Hi Constantine,

However, I have a couple of questions regarding image masks. You
> mentioned segmented versions of heart masks, so did you create masks for
> every time step in the image? And when you say "slightly-dilated" mask,
> what would be the suggested size of dilation?
>

What I did was the following:
- I first performed the 4D registrstion without applying any masks.
- I created a mask for one time-point using atlas based segmentation.
- I transformed the 3D mask to all other time-points.
- I re-ran the registration while using the masks.

The mask images should indeed have the same size (and origin) as the input
images.
If you don't have any segmentation software you could perform a manual
segmentation, for example with a software package as MeVisLab (free
download). I used a radius of 4-5 mm for the dilation.

Kind regards,
Coert Metz


>
> In general, I'm unclear on using masks with elastix, because there's
> only a limited amount of material on masks in the manual. Does the size
> of a mask image have to of the same size as the image? Would you suggest
> an application for creating image masks?
>
> Regards,
> Constantine
>
> > Date: Thu, 11 Aug 2011 16:59:31 +0200
> > From: Coert Metz<c.metz at erasmusmc.nl>
> > Subject: Re: [elastix] Nonrigid registration of dynamic medical
> >          imaging data using nD+t B-splines and a groupwise optimization
> >          approach
> > To: elastix at bigr.nl
> > Message-ID:
> >          <CAGe_aNfd00QEFBdyoi=HvJap-pMBzMPNCU1X6cXqSs=
> U7sp4UQ at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Dear Constantine,
> >
> > Thanks for your interest in our work! I took a look at the images and I
> > think you got already quite good results, but I agree it's not perfect
> yet.
> > Below I'll respond to your questions.
> >
> >   * It seems the code does better with 3 levels instead of 4. With 4
> >> levels there are some non-realistic deformations bubbling up here and
> >> there. Can you please suggest why the paper uses 4 levels?
> >>
> >
> > I am not sure anymore if we really optimized the number of levels and if
> 3
> > would work as well for our data.
> >
> >
> >>   * Since the input is highly anisotropic, I'm restricting movement in Z
> >> direction. Would that affect the deformation in XY in the sense it would
> >> not be possible to recover the whole extent of deformation?
> >>
> >
> > Yes, I think so. Looking at the image, you can see that some structures
> are
> > appearing/disappearing in the 2D slices over time (they are moving in and
> > out of the plane). The registration tries to accomodate this by
> transforming
> > the image in the 2D planes, which results in unwanted transformations.
> Did
> > you actually try to just allow deformation in the Z-direction? That would
> be
> > my first choice. What happens then?
> >
> >
> >>   * Since there are only 12 slices in each stack, I don't downsample
> >> along Z dimensions. Is that a sensible choice? Do the zeros in
> >> (MovingImagePyramidSchedule 3 3 1 0 2 2 1 0 1 1 1 0) have any special
> >> significance? Should it be (MovingImagePyramidSchedule 3 3 1 1 2 2 1 1 1
> >> 1 1 1)?
> >>
> >
> > If you use a value of 1, the image is still convolved with a kernel with
> a
> > standard deviaton of 0.5. If you don't want to smooth in a certain
> > dimension, you should use a value of 0. The software will then
> explicitely
> > skip the smoothing for that dimension. Note that this only works for the
> > SmoothingImagePyramids.
> >
> >
> >>   * In general, are these parameters sensible to recover the in-plane
> >> (XY) deformation only?
> >>
> >
> > Most of them are. Only the anisotropic grid spacing is somewhat strange
> and
> > we would suggest you to use the same spacing in all spatial dimensions.
> It
> > does not really make sense to give the registration more freedom in the
> > z-direction. Note that you are not performing 2D+t registration for all
> > slices independently anyway as you use a 4D B-spline grid and adjacent
> > control points in the z-direction are therefore considered as well when
> > computing the transformation for a voxel in a certain slice.
> >
> >
> >>   * When looking at IterationInfo.*.txt I notice the metric value
> >> remains quite jumpy even close to the end of 2000 iterations. Can you
> >> please comment if that's within reason to have the metric a bit jumpy in
> >> this case?
> >>
> >
> > Some other remarks / questions:
> > - I used a mask for my cardiac registrations as the deformation at the
> > border of the heart are not spatially smooth. The pericardium makes it
> > possible for the heart to partially move indepently from it surroundings.
> I
> > would suggest to try this as well for your data. As the fixed mask I used
> a
> > slightly dilated version of the heart mask and as the moving mask the
> > non-dilated heart mask. This might solve the strange deformations you
> > sometimes get at the border of the heart.
> > - Did you increase the number of spatial samples because of the larger
> field
> > of view?
> >
> > To summarize, what I would try is:
> > - Use 3D transformations
> > - Set isotropic grid spacings
> > - Use a mask
> >
> > Let me know if we can help you any further!
> >
> > Kind regards,
> > Coert Metz
> >
> >
> >
> >>
> >> Looking forward to any comments.
> >>
> >> Best regards,
> >> Constantine
> >>
> >> // *********************
> >> // * ImageTypes
> >> // *********************
> >> (FixedInternalImagePixelType "short")
> >> (FixedImageDimension 4)
> >> (MovingInternalImagePixelType "short")
> >> (MovingImageDimension 4)
> >> (UseDirectionCosines "false")
> >>
> >> // *********************
> >> // * Components
> >> // *********************
> >> (Registration "MultiResolutionRegistration" )
> >> (FixedImagePyramid "FixedSmoothingImagePyramid")
> >> (MovingImagePyramid "MovingSmoothingImagePyramid")
> >> (Interpolator "BSplineInterpolatorFloat")
> >> (BSplineInterpolationOrder 1)
> >> (Metric "VarianceOverLastDimensionMetric")
> >> (Optimizer "AdaptiveStochasticGradientDescent")
> >> (ResampleInterpolator "FinalLinearInterpolator")
> >> (Resampler "DefaultResampler")
> >> (Transform "BSplineTransform")
> >>
> >> // Spline order of B-spline transform
> >> (BSplineTransformSplineOrder 2)
> >> // Enable/disable periodicity constraint of B-spline transformation
> >> (UseCyclicTransform "true")
> >>
> >> // *********************
> >> // * Metric settings
> >> // *********************
> >> (MovingImageDerivativeScales 1.0 1.0 0.0 0.0) //// Prevent deformation
> >> in Z dimension.
> >> (SampleLastDimensionRandomly "true")
> >> (NumSamplesLastDimension 10) //// 10 time points.
> >> (SubtractMean "true")
> >>
> >> // *********************
> >> // * Optimizer settings
> >> // *********************
> >> (NumberOfSamplesForExactGradient 20000)
> >> (NumberOfResolutions 3) ////
> >> (FinalGridSpacingInPhysicalUnits 15.0 15.0 10.0 1.0) ////
> >> (GridSpacingSchedule 3.0 3.0 1.0 1.0 2.0 2.0 1.0 1.0 1.0 1.0 1.0 1.0)
> ////
> >> (MaximumNumberOfIterations 2000 2000 2000) ////
> >> (SP_A 20.0)
> >> (SigmoidInitialTime 0.0)
> >> (AutomaticParameterEstimation "true")
> >>
> >> // *********************
> >> // * Mask settings
> >> // *********************
> >> (ErodeMask "false")
> >> (ErodeFixedMask "false")
> >>
> >> // *********************
> >> // * Transform settings
> >> // *********************
> >> (HowToCombineTransforms "Compose")
> >>
> >> // *********************
> >> // * Pyramid settings
> >> // *********************
> >> (FixedImagePyramidSchedule 0 0 0 0 0 0 0 0 0 0 0 0) ////
> >> (MovingImagePyramidSchedule 3 3 1 0 2 2 1 0 1 1 1 0) ////
> >>
> >> // *********************
> >> // * Sampler parameters
> >> // *********************
> >> // The variance metric is allowed to get random samples, the penalty
> >> term isn't,
> >> // because of the Lagrange multipliers, which should correspond to the
> same
> >> // sample locations in every iteration
> >> (ImageSampler "Random")
> >> (NumberOfSpatialSamples 10000) //// Was 2000.
> >> (CheckNumberOfSamples "true")
> >> (NewSamplesEveryIteration "true")
> >> (MaximumNumberOfSamplingAttempts 50)
> >>
> >> // *********************
> >> // * Output settings
> >> // *********************
> >> (WriteTransformParametersEachIteration "false")
> >> (WriteTransformParametersEachResolution "false")
> >> (WriteResultImage "true") ////
> >> (CompressResultImage "false")
> >> (WriteResultImageAfterEachResolution "true") ////
> >> (ShowExactMetricValue "false")
> >> (DefaultPixelValue 0)
> >>
> >>
> >>
> >> _______________________________________________
> >> elastix mailing list
> >> elastix at bigr.nl
> >> http://lists.bigr.nl/mailman/listinfo/elastix
> >>
> _______________________________________________
> elastix mailing list
> elastix at bigr.nl
> http://lists.bigr.nl/mailman/listinfo/elastix
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bigr.nl/pipermail/elastix/attachments/20110815/249f7bcb/attachment.html>


More information about the Elastix mailing list