[Insight-users] resampling and linear interpolation
Luis Ibanez
luis . ibanez at kitware . com
Thu, 21 Aug 2003 18:04:21 -0400
Hi Michael,
What you did is an interesting test.
However, since the second column is the result
of the registration process, it is hard to separate
how much of the effect is due to the resampling process
(pre-registration), and how much to the metric evaluation
and the internal effect of the interpolator in the metric.
I would suggest you to do a test similar to what Petra
did (in her recent posting to the list) which is just
evaluate the metric instead of running the regisration.
In theory the metric values should follow a monotonic
variation.
If you still find this jump in the metric values, one
possible suspect is the "last-row" effect on the iterpolators,
which is related to the IsInside() evaluation.
The interpolator has a criterion to establish is a point
is in the domain of the image.
By continuously scaling (downsampling) the images you may
be running into the effect when at a particular scale, there
is a moment in which a full row of the image comes into the
domain of the other image. one easy way to avoid the last-row
effect is to slightly rotate one image with respect to the other
(e.g. 5 to 10 degrees). In this way, the increase in image size
will only affect a couple of pixels at a time
Another way to test how much of this is due to the linear
interpolator is to replace it with the BSpline interpolator.
Note that registration will slow down a lot in that case, but
this being an experiment, it should probably be worth to try.
Regards,
Luis
----------------------
Michael Kuhn wrote:
> Hi,
>
> I'm doing 3D registration. Unfortunately, my data sizes are too big to
> do a registration on the original data. Therefore I'm using a resample
> image filter to downscale my images. I assign it a linear interpolate
> image function and an affine transform. The idea of the affine transform
> is to
>
> 1) transform the output spacing into unit spacing (along all axis)
> 2) resample the output image at a less dense grid than the grid of the
> input image
>
> This basically means, a scaling matrix has to be set for the affine
> transform, and unit spacing has to be set as the output spacing for the
> resample image filter.
>
> The transform itself seems to work fine. However, when doing a
> registration of the pre transformed (downscaled, unit spacing) images,
> it turns out that the resulting (meansquares) metric value is always
> lower for non integer downscale factors than for integer ones (see
> sample below). I wonder if there is a mathematical or numerical cause
> for this problem (I thought about the linear interpolation that does not
> need to do any interpolation in the integer case).
>
> Thanks,
>
> Michael
>
> Sample:
> (1st column: downscale factor, 2nd column best meansquare metric value
> achieved for a registration run)
> 3 671076
> 3.01 493154
> 3.02 507410
> 3.03 519153
> 3.04 526705
> 3.05 530006
> 3.06 519486
> 3.07 506158
> 3.08 525221
> 3.09 511372
> 3.1 507557
> 3.11 501830
> 3.12 503091
> 3.13 514344
> 3.14 508190
> 3.15 504942
> 3.16 502145
> 3.17 508199
> 3.18 508164
> 3.19 509470
> 3.2 512111
> 3.21 499700
> 3.22 491668
> 3.23 510329
> 3.24 498813
> 3.25 502576
> 3.26 490604
> 3.27 494706
> 3.28 511005
> 3.29 510030
> 3.3 494550
> 3.31 496548
> 3.32 482143
> 3.33 471736
> 3.34 488468
> 3.35 494607
> 3.36 487787
> 3.37 480632
> 3.38 479595
> 3.39 499615
> 3.4 497371
> 3.41 493534
> 3.42 485106
> 3.43 481086
> 3.44 480180
> 3.45 488807
> 3.46 482753
> 3.47 481374
> 3.48 473041
> 3.49 466220
> 3.5 497818
> 3.51 468225
> 3.52 479928
> 3.53 466164
> 3.54 472708
> 3.55 461543
> 3.56 469550
> 3.57 457421
> 3.58 473226
> 3.59 469654
> 3.6 467439
> 3.61 460392
> 3.62 458992
> 3.63 457589
> 3.64 473349
> 3.65 462462
> 3.66 457830
> 3.67 453209
> 3.68 452390
> 3.69 462715
> 3.7 450983
> 3.71 466169
> 3.72 468178
> 3.73 459741
> 3.74 467537
> 3.75 463755
> 3.76 453383
> 3.77 451812
> 3.78 459649
> 3.79 461948
> 3.8 461665
> 3.81 454432
> 3.82 450894
> 3.83 444630
> 3.84 447712
> 3.85 455920
> 3.86 466395
> 3.87 456363
> 3.88 449726
> 3.89 452826
> 3.9 454229
> 3.91 446022
> 3.92 434137
> 3.93 440316
> 3.94 453348
> 3.95 447570
> 3.96 448920
> 3.97 447767
> 3.98 412571
> 3.99 432648
> 4 596577
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>