comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » 3D registration
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
3D registration [message #53222] Thu, 29 March 2007 04:44 Go to next message
Bita is currently offline  Bita
Messages: 4
Registered: March 2007
Junior Member
Hi,
I am looking for examples of the implementation for 3D registration by
Roger Woods.
My problem: how should I start the iteration and how can I calculate
the next iteration step.

Thanks
Bita
Re: 3D registration [message #53289 is a reply to message #53222] Fri, 30 March 2007 07:46 Go to previous messageGo to next message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Mar 29, 7:44 am, "Bita" <rahm...@sbox.tugraz.at> wrote:
> Hi,
> I am looking for examples of the implementation for 3D registration by
> Roger Woods.
> My problem: how should I start the iteration and how can I calculate
> the next iteration step.

I've done woods-like registration, as well as mutual information based
registration with IDL. To drive the fitting process I use tnmin
(http://cow.physics.wisc.edu/~craigm/idl/fitting.html). I calculate
the objective functions using my own volume-to-volume interpolation
routines which are essentially just wrappers using t3d and IDL's
interpolation routines. This is simple in IDL, but not particularly
fast. Extracting image values at common points either takes lots of
memory (N points by (x,y,z,c) homogeneous coordinates) or lots of CPU
(which is still slow because of the need to loop within IDL). I've
settled on doing it slice by slice, which allows me to run in less
than many Gbytes of RAM, but it is a bit slow because of looping over
slices.

I've noticed a couple of things - the first is independent of whether
the algorithm is implemented in IDL or C or whatever. That is that
3D registration requires a pretty good starting point. In practice I
have always had to do an approximate hand registration to get
started. The Woods algorithm is also quite sensitive to thresholds,
depending on the relative noise level in the image.

Second, I've found that tnmin seems to easily get good results for
translation parameters, but the MI algorithm that I'm using seems to
be rather insensitive to rotations. I don't know why that is, but
I've been looking at it this week, so I thought I'd mention it. It
may be a simple scaling issue, but I suspect it has more to do with
choice of origin and voxel size. I have not investigated this with
woods, nor have I implemented Woods' multiple histogram bins.

Here's how I use tnmin for this:

parinfo = replicate( { value:0.D, $
fixed: 0, $
limited: [0,0], $
limits: [0.D, 0.D], $
step: 0.0D, $
mpside: 2 }, $
9 )
;; Specify initial values from manual registration:
parinfo[*].value = [dx, dy, dz, xrot, yrot, zrot, xscale, yscale,
zscale]

result = tnmin('obj_fnc', parinfo[*].value, $
functargs={img1:img1, img2:img2}, $
iterargs={iva:iva}, $
parinfo=parinfo, $
iterproc='obj_iterproc', $
/maximize, $
autoderivative=1)

Here, img1 and img2 are image objects that I pass in that handle the
interpolation and obj_fnc is the routine that calculates the objective
function that I'm maximizing (or minimizing as the case may be).

Mike
Re: 3D Registration [message #56239 is a reply to message #53222] Wed, 10 October 2007 07:49 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Oct 9, 11:48 am, Bita <rahm...@sbox.tugraz.at> wrote:
> I am looking for examples of the implementation of 3D registration by
> Roger Woods.
> I would like to implement it with Ratio Image Uniformity (RIU Cost
> Function) of woods in IDL.
>
> So far I have tried it with other methods but it didn't work out.
> Could you please check where the fault lies and eventually suggest a
> solution?

Could you be more specific about what didn't "work out"?

I use that objective function often for registering neuroimaging data,
but I do it by writing out my data and running AIR on it, rather than
reimplementing AIR in IDL. I've fiddled with using it for
registration with IDL, using tnmin (from mpfit) to minimize a number
of different cost functions, including Woods and mutual information,
but I still haven't put much effort into it. The complex part is not
the objective function, but the minimization.

My experience with the C version of AIR is that it can be quite
sensitive to the choice of thresholds and number of partitions - plus
you'll need good starting values for your registration parameters.
Here's how I'd code the objective function for a single partition in
each data set:

v1 = data set one, calculated using registration parameters
v2 = data set two, calculated using registration parameters
t1 = data set one threshold
t2 = data set two threshold

indeces = where((v1 gt t1) and (v2 gt t2), count)
if count gt 1 then begin
ratio = v1[indeces]/v2[indeces]
result = stdev(ratio)
endif else begin
ratio = 0
endelse


Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Simple text file reading question
Next Topic: Re: Simple text file reading question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:13:37 PDT 2025

Total time taken to generate the page: 0.00509 seconds