users > RE: Registering masked data?
Apr 8, 2014  04:04 PM | Torsten Rohlfing
RE: Registering masked data?
Hi Ashley -

CMTK's registration tools allow you to designate one value in your image as "padding" marker. The relevant paremeters for registration(x) and warp(x) are "--pad-ref VAL" for the reference (fixed) image and "--pad-flt VAL" for the floating (moving) image. In either case, "VAL" is a value to be considered as "missing" data rather than as a data value itself.

In images stored as floating points, infinite values ("Inf") are always considered "missing."

The effect of using padding is that the pixels with the given passing value are truly excluded from all computations, i.e., they do not go into any interpolations (when used in the floating image) and they are removed from the set of pixel pairs considered for similarity computation (when used in the fixed image).

As for selecting the padding value for a given image, it is usually a good option to simply use "-1", assuming your images don't have any negative values to begin with. (If your image is already the result of, say, a cubic spline or sinc interpolation, then you may have introduced negative values that way, so beware).

Now here's the problem though - using padding to exclude image regions *may* improve your registrations, but it is by no means guaranteed to. It usually works rather well with linear (affine, rigid) registration, but in my experience doesn't help much when used in nonlinear registration. The problem is that by excluding data, you create opportunities for the registration algorithm to make "inconvenient" data disappear by moving it into areas mapped to/from padded pixels. Unfortunately, the registration appears to consider essentially all data "inconvenient", so often things simply disappear altogether.

Further notes - other CMTK tools also support padding, e.g., "convertx" will fill masked-out areas with the padding value ("--set-padding VAL"), and there are also two threshold-to-padding operations. Likewise, "reformatx" allows you to use padding in both the floating image ("--pad-floating") and, separately, in the output image ("--pad-out").

Hope this helps.

Best,
  Torsten

Threaded View

TitleAuthorDate
Ashley Manton Apr 7, 2014
Ashley Manton Apr 9, 2014
Torsten Rohlfing Apr 14, 2014
RE: Registering masked data?
Torsten Rohlfing Apr 8, 2014
Torsten Rohlfing Apr 8, 2014